Coder Social home page Coder Social logo

hls-trim's Introduction

HLS Playlist Trimmer

This script allows you to trim an HLS (HTTP Live Streaming) playlist and its associated chunklists based on specified start and end times. It utilizes the hls-parser library to parse and manipulate HLS playlists.

Prerequisites

Before running this script, ensure that you have the following:

  • Node.js installed on your system.

Installation

  1. Clone the repository or download the script file.

  2. Install the required dependencies by running the following command in the project directory:

npm install hls-parser

Usage

To use the HLS Playlist Trimmer script, follow these steps:

  1. Open a terminal or command prompt.

  2. Navigate to the directory containing the script.

  3. Run the script with the following command:

node <script_file>

Replace <script_file> with the filename of the script.

Replace <uri> with the URI (Uniform Resource Identifier) of the HLS playlist you want to trim.

Replace <start> and <end> with the desired start and end times (in seconds) of the trimmed segment.

  1. The script will fetch the playlist, parse it, and trim the specified segment from each variant. It will also save the modified playlists as separate files.

Example

node hls-trimmer.js https://example.com/playlist.m3u8 10 30

In this example, the script will fetch the HLS playlist located at https://example.com/playlist.m3u8, trim the segment from 10 to 30 seconds, and save the modified playlists as separate files.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.