[FFmpeg-user] appending (or concussing) video on hls

Ricardo Kleemann ricardo at americasnet.com
Mon Oct 19 23:31:28 CEST 2015


I’m going to answer my own question, below…

> On Oct 18, 2015, at 5:50 PM, Ricardo Kleemann <ricardo at americasnet.com> wrote:
> 
> Hi,
> 
> I have two videos that I wanted to concat together. The end result is have the hls representation of the 2.
> 
> I already have one video in hls format, with the m3u8 playlist file and all of the ts files.
> 
> I wanted to append/concat a second video to the m3u8 playlist.
> 
> Is it possible to tell ffmpeg to simply take new ts segments and append to the m3u8 playlist? 
> 
> For example I can take the 2nd video and convert to hls segments, would ffmpeg be able to take the additional segments and just append to the m3u8 playlist?
> 
> thanks
> Ricardo

As long as the m3u8 playlist file has the appropriate durations and file definitions, it is quite easy to append one set of hls ts segments.

For example, I had one hls video with say 130 ts segments, and the corresponding m3u8 playlist file. Then I had another hls video with say 200 ts segments. The 2 m3u8 files can be merged as long as the order and mapping of durations to ts files is appropriate. 

So sort of just concatenating the 2 m3u8 files

Ricardo


More information about the ffmpeg-user mailing list