

Note: if I change the command to use f01.mp4 for both source 0 and source 1, the command completes as expected in under 5 minutes: % # example that works: Note: the inputs are only a few minutes each, so individually re-encoding the inputs would take only a few minutes each. If I leave my computer running for 24 hours, ffmpeg is still using max available CPU (200-300%). After a short duration (several seconds to a minute or so, seems to be prortional to the duration of the first video) I start seeing messages like this: More than 1000 frames duplicated This is my understanding of the form of this command from references such as FFmpeg Filters Documentation: concat and Concatenate Videos Together Using FFMPEG!.įfmpeg gives a lot of output as it checks the metadata for each stream and then begins processing. What I am executing: % ffmpeg -i f01.mp4 -i f02.mp4 -filter_complex "concat=n=2:v=1:a=1" -map "" -map "" output.mp4

All video files in question are between 4 and 20 minutes in length. I am attempting to use the concat filter directly for reasons independent from this question (so -i list.txt is not a valid solution). The audio is reversed creating and finally the two streams ( + ) will merge and output as a new file, output.mp3: $ ffmpeg -i input.mp3 -filter_complex "asplit areverse amix=inputs=2" -map "" output.mp3ĭon’t worry if the above code looks intimidating, distinct linear chains are easy once the more you use them and get used to the syntax.I am trying to concatenate mp4 files into a single file. The input.mp3,, will split into a temporary stream. Below is an example of a distinct linear chain. Below is an example of a linear chain horizontally flipping a video and then inverting the colors: $ ffmpeg -i input.mp4 -vf "hflip,negate" output.mp4ĭistinct linear chains use secondary inputs or create temporary streams before creating the final output. Linear chains are filtering done on the input stream or virtual temporary streams but do not require an additional temporary stream before creating the output file. Linear chains are separated by commas while distinct linear chains are separated by semicolons. There are two types of filter chaining in FFMPEG Linear chains and distinct linear chains.

It is possible to apply one filter at a time constantly referencing the last output file but ideally, chains are used to efficiently apply multiple filters. As you use FFMPEG one command might get the job done but at times applying multiple filters to a video is needed.
