Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@freetube/yt-dash-manifest-generator

Package Overview
Dependencies
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@freetube/yt-dash-manifest-generator

This NodeJS library generates a DASH Manifest file for a YouTube video in order to allow a playback with 1080p+ resolutions. It is developed for and tailored towards easy usage in the [FreeTube](https://github.com/FreeTubeApp/FreeTube-Vue) rewrite but can

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

YouTube Dash Manifest Generator NodeJS Documentation

This NodeJS library generates a DASH Manifest file for a YouTube video in order to allow a playback with 1080p+ resolutions. It is developed for and tailored towards easy usage in the FreeTube rewrite but can be used with any other project as well. It takes the adaptive formats of the response string as input. If this library should not work at some point, please create an issue and let me know so that I can take a look into it. Pull requests are also welcomed in this case.

Installation

yt-dash-manifest-generator

##Usage const ytdashgen = require("yt-dash-manifest-generator")

API

generate_dash_file_from_json_data(JsonStringData, VideoLengthInSeconds)

Takes a JSON file as string and the length of the video in seconds. Usable when the data from ytdl.getInfo() is already available

const xml_string = generate_dash_file_from_json_data(JsonString, VideoLengthInSeconds)

async generate_dash_file_from_json_data_from_id(VideoId, VideoLength)

Takes the length of the video in seconds as well as the ID of the video as input and gets the json data itself with yt-dl-core

generate_dash_file_from_json_data_from_id(VideoId, VideoLength).then((xmlData) => {
    doSomethingWithXML();
}).catch((error) =>{
    console.error(error)
})

generate_dash_file_from_formats(VideoFormats, VideoLength)

Takes an array of formats in the way which yt-dl-core provides it as well as the video length in seconds and generates the xml file

const xml_string = generate_dash_file_from_formats(VideoFormats, VideoLength)

Keywords

FAQs

Package last updated on 09 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc