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.
- 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
- You can find the source code here: Source code