Changes between Version 11 and Version 12 of Concatenate


Ignore:
Timestamp:
Jan 5, 2013, 3:15:11 AM (5 years ago)
Author:
evilsoup
Comment:

Added in usage for the concat filter, and did my bit against the dreaded link rot

Legend:

Unmodified
Added
Removed
Modified
  • Concatenate

    v11 v12  
    66== Description == 
    77 
    8 The concat demuxer was added to ffmpeg 1.1 . You can read about it in the [http://ffmpeg.org/ffmpeg.html#concat documentation] 
     8The concat demuxer was added to ffmpeg 1.1 . You can read about it in the [http://ffmpeg.org/ffmpeg-formats.html#concat documentation] 
    99 
    1010== Instructions == 
    1111 
    12 Creat a file "mylist.txt" with all the files you want to have concatenated in the following form ( Lines starting with a dash are ignored ) : 
     12Create a file "mylist.txt" with all the files you want to have concatenated in the following form ( Lines starting with a dash are ignored ) : 
    1313{{{ 
    1414# this is a comment 
     
    2525 
    2626= 2. Concatenation of files with different codecs = 
     27 
     28== Description == 
     29 
     30The concat filter is available in recent versions of ffmpeg. [http://ffmpeg.org/ffmpeg-filters.html#concat Here] is the official documentation. 
     31 
     32== Instructions == 
     33 
     34This is easiest to explain using an example: 
     35 
     36{{{ 
     37ffmpeg -i input1.mp4 -i input2.webm \ 
     38-filter_complex '[0:0] [0:1] [1:0] [1:1] concat=n=2:v=1:a=1 [v] [a]' \ 
     39-map '[v]' -map '[a]' <encoding options> output.mkv 
     40}}} 
     41 
     42On the -filter_complex line, the following: 
     43 
     44{{{ 
     45'[0:0] [0:1] [1:0] [1:1] 
     46}}} 
     47 
     48tells ffmpeg what streams to send to the concat filter; in this case, streams 0 and 1 from input 0 (input1.mp4 in this example), and streams 0 and 1 from input 1 (input2.webm). 
     49 
     50{{{ 
     51concat=n=2:v=1:a=1 [v] [a]' 
     52}}} 
     53 
     54This is the concat filter itself. n=2 is telling the filter that there are two input files; v=1 is telling it that there will be one video stream; a=1 is telling it that there will be one audio stream. [v] and [a] are names for the output streams, to allow the rest of the ffmpeg line to use the output of the concat filter. 
     55 
     56Note that the single quotes ' ' around the whole filter section are required. 
     57 
     58{{{ 
     59-map '[v]' -map '[a]' 
     60}}} 
     61 
     62This tells ffmpeg to use the results of the concat filter rather than the streams directly from the input files. 
     63 
     64Note that filters are incompatible with stream copying; you can't use -c copy with this method. Also, I'm not sure whether softsubs are supported. 
     65 
     66As you can infer from this example, multiple types of input are supported, anything readable by ffmpeg should work. The inputs have to be of the same frame size, and a handful of other attributes have to match. 
     67 
     68= 3. Concatenation of files with different codecs using an external script = 
    2769 
    2870== Description ==