Changes between Version 9 and Version 10 of How to concatenate (join, merge) media files
- Timestamp:
- 12/20/2012 01:30:45 PM (5 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
How to concatenate (join, merge) media files
v9 v10 1 = Description = 1 If you have media files with exactly the same codec and codec parameters you can concatenate them as described in "1. Concatenation of files with same codecs". If you have media with different codecs you can concatenate them as described in "2. Concatenation of files with different codecs" below. 2 3 4 = 1. Concatenation of files with same codecs = 5 6 == Description == 7 8 The concat demuxer was added to ffmpeg 1.1 . You can read about it in the [http://ffmpeg.org/ffmpeg.html#concat documentation] 9 10 == Instructions == 11 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 ) : 13 {{{ 14 # this is a comment 15 file /path/to/file1 16 file /path/to/file2 17 file /path/to/file3 18 }}} 19 20 then you can encode your files with: 21 {{{ 22 ffmpeg -f concate -i mylist.txt -c copy output 23 }}} 24 25 26 = 2. Concatenation of files with different codecs = 27 28 == Description == 29 2 30 The following script can be used to concatenate multiple input media files (containing audio/video streams) into one output file (just like as if all the inputs were played in a playlist, one after another). It is based on this FAQ item: [http://ffmpeg.org/faq.html#How-can-I-concatenate-video-files_003f How can I join video files], which also contains other useful information. 3 31 4 32 If you find any bugs, feel free to correct the script, add yourself to the list of contributors and change the version string to reflect your change(s) or email the author with your patch, whatever you find more convenient. 5 33 6 = Instructions=34 == Instructions == 7 35 8 36 Save the script in a file named "mmcat" (or some other name), make it executable (chmod +x mmcat) and run it, using the syntax: … … 17 45 that could mean that you don't have correct permissions set on /tmp directory (or whatever you set in TMP variable) or that decoding of your input media has failed for some reason. In this case, it would be the best to turn on the logging (described in the script's comments) 18 46 19 = Script=47 == Script == 20 48 21 49 {{{


