Skip to content

kldzj/ytdl-dash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generates DASH manifests for YouTube videos using data from ytdl-core.

Installation

Using yarn:

$ yarn add ytdl-core @kldzj/ytdl-dash

Using npm:

$ npm i -S ytdl-core @kldzj/ytdl-dash

Usage

import ytdl from 'ytdl-core';
import { generateDASHFromVideoInfo } from '@kldzj/ytdl-dash';

const video = await ytdl.getInfo('dQw4w9WgXcQ');
const manifest = generateDASHFromVideoInfo(video); // dash-xml string

Options

import ytdl from 'ytdl-core';
import { generateDASHFromVideoInfo } from '@kldzj/ytdl-dash';

const video = await ytdl.getInfo('dQw4w9WgXcQ');
const manifest = generateDASHFromVideoInfo(video, {
  // replace all IPs in the media URLs
  replaceIPs: true,
});

Credits

Thanks to FreeTubeApp for their yt-dash-manifest-generator package.

About

Generates DASH manifests from data gathered by ytdl-core

Resources

License

Stars

Watchers

Forks