[FFmpeg-devel] File concatenation

Robert Swain robert.swain
Mon Jun 4 19:35:00 CEST 2007


Hello good peoples,

We appear to have a missing feature in terms of file input  
functionality. It is not possible (as far as I am aware) to specify  
multiple input files and use FFmpeg to concatenate the streams.

The usual suggestion is to use `cat file1 file2 file3 > infile;  
ffmpeg -i infile ...` but this does not always work properly or work  
at all in some cases.

Using -map to select the desired streams may also be useful but will  
probably add complexity to the problem and in such cases one could  
use another ffmpeg instance to copy and rewrite the desired streams  
from such an input file.

Also, it may be that people would like to specify multiple input  
files using a mixture of concatenation and stream selection, for  
example if two video streams are to be joined and multiplexed with  
one audio stream.

I see three sections:

- Concatenating streams internally, writing timestamps correctly in  
the muxers etc.
- Selecting streams from input files to be used for concatenation.
- Specifying that some input streams be concatenated and some be  
processed as separate streams in the output.

How should any of these be done? (Specifically the first as the other  
two points are enhancements.)

Regards,
Rob




More information about the ffmpeg-devel mailing list