Changes between Version 43 and Version 44 of Concatenate


Ignore:
Timestamp:
Apr 3, 2020, 1:19:51 AM (6 months ago)
Author:
cus
Comment:

Add a new example of changing clips on the fly

Legend:

Unmodified
Added
Removed
Modified
  • Concatenate

    v43 v44  
    7878for i in {1..10}; do printf "file '%s'\n" input.mkv >> mylist.txt; done
    7979ffmpeg -f concat -i mylist.txt -c copy output.mkv
     80}}}
     81
     82==== Changing playlist files on the fly ====
     83
     84The concat demuxer opens the referenced files only when they are needed. This allows us to swap the referenced files atomically behind the demuxers back to be able to use the concat demuxer as a changeable live source. Check out the following example file list.txt:
     85
     86{{{
     87ffconcat version 1.0
     88file dummy.mxf
     89file dummy.mxf
     90}}}
     91
     92dummy.mxf is referenced twice to make sure the concat demuxer reopens the file when it reaches it. Combine this with infinite looping and you are done:
     93
     94{{{
     95ffmpeg -re -stream_loop -1 -i list.txt -flush_packets 0 -f mpegts udp://127.0.0.1:5000?pkt_size=1316
     96}}}
     97
     98Now you can change the looping clip by a simple move command:
     99
     100{{{
     101mv next_clip.mxf dummy.mxf
    80102}}}
    81103