1.0.0 • Published 2 years ago

@kldzj/ytdl-dash v1.0.0

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
2 years ago

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.