[FFmpeg-user] Pipe while loop output

Jonathan Baecker jonbae77 at gmail.com
Sat Dec 30 23:34:37 EET 2017


Hello everybody,

I play at the moment a bit with piping multiple files to the same ffmpeg 
instance. In shell it would look like:

    for i in "$list_of_multiple_files"; do ffmpeg -i "$i" [...] -f
    mpegts -; done | pv -q -B 50M | ffmpeg +igndts -i pipe:0 -fflags
    +genpts [...] -f flv rtmp://output

Instead of pv you could also use mbuffer.

I know concat, but I want to be more flexible, that is why I try this 
way. I did some test and they all look good for me, but until now I have 
not make any test over multiple hours.

My question is, do you think this can work with many clips over hours? 
Or can run this out of sync? My worry is, because of ignoring the dts 
the audio can go out of sync with time, specially when in some clips the 
audio and video line have not the same length.

Regards

Jonathan





More information about the ffmpeg-user mailing list