Super fast HLS trimming with frame accuracy

Description

This article is an evolution of this code: Trim HLS stream with frame accuracy using ffmpeg and Bash script

  • The implementation gets a group if HLS chunks (.ts) and based on input and output points (timestamps) it creates an mp4 output file frame accuracy trimmed, and with AV perfectly aligned.
  • Thanks to the underlying algorithm it does the trimming in a very small amount of time although the input file can be huge.
  • This code is Javascript (JS). Is a more understandable / organized than the previous one in Bash

Drawing1

Possible usages:

  • On the fly live streaming trimming (Live hightlights)
  • VOD frame accuracy trimming
  • Increase dramatically the speed of video editors (mostly cloud video editors), because it only decodes / encodes the chunk to trim NOT the rest of the file / chunks

Source code:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: