diff --git a/index.html b/index.html index 849e0fc..5d1721d 100644 --- a/index.html +++ b/index.html @@ -333,7 +333,7 @@
ffmpeg -i concat:input_file1\|input_file2\|input_file3 -c:v libx264 -c:a aac output_file.mp4
ffmpeg -i concat:input_file_1\|input_file_2\|input_file_3 -c:v libx264 -c:a aac output_file.mp4
This command allows you to create an H.264 file from a DVD source that is not copy-protected.
Before encoding, you’ll need to establish which of the .VOB files on the DVD or .iso contain the content that you wish to encode. Inside the VIDEO_TS directory, you will see a series of files with names like VTS_01_0.VOB, VTS_01_1.VOB, etc. Some of the .VOB files will contain menus, special features, etc, so locate the ones that contain target content by playing them back in VLC.
It’s also possible to adjust the quality of your output by setting the -crf and -preset values:
-ffmpeg -i concat:input_file1\|input_file2\|input_file3 -c:v libx264 -crf 18 -preset veryslow -c:a aac output_file.mp4
ffmpeg -i concat:input_file_1\|input_file_2\|input_file_3 -c:v libx264 -crf 18 -preset veryslow -c:a aac output_file.mp4
Bear in mind that by default, libx264 will only encode a single video stream and a single audio stream, picking the ‘best’ of the options available. To preserve all video and audio streams, add -map parameters:
-ffmpeg -i concat:input_file1\|input_file2 -map 0:v -map 0:a -c:v libx264 -c:a aac output_file.mp4
ffmpeg -i concat:input_file_1\|input_file_2 -map 0:v -map 0:a -c:v libx264 -c:a aac output_file.mp4
ffmpeg -i input1.avi -i input2.mp4 -filter_complex "[0:v:0][0:a:0][1:v:0][1:a:0]concat=n=2:v=1:a=1[videoOut][audioOut]" -map "[videoOut]" -map "[audioOut]" output_file
ffmpeg -i input1.avi -i input2.mp4 -filter_complex "[0:v:0][0:a:0][1:v:0][1:a:0]concat=n=2:v=1:a=1[video_out][audio_out]" -map "[video_out]" -map "[audio_out]" output_file
This command takes two or more files of the different file types and joins them together to make a single file.
However, it only works properly if the files to be combined have the same dimensions (e.g., 720x576).
Some aspects of the input files will be normalised: for example, if an input file contains a video track and an audio track that do not have exactly the same duration, the shorter one will be padded. In the case of a shorter video track, the last frame will be repeated in order to cover the missing video; in the case of a shorter audio track, the audio stream will be padded with silence.
@@ -937,24 +937,23 @@If no characteristics of the output files are specified, ffmpeg will use the default encodings associated with the given output file type. To specify the characteristics of the output stream(s), add flags after each -map "[out]"
part of the command.
For example, to ensure that the video stream of the output file is visually lossless H.264 with a 4:2:0 chroma subsampling scheme, the command above could be amended to include the following:
- -map "[videoOut]" -c:v libx264 -pix_fmt yuv420p -preset veryslow -crf 18
-map "[video_out]" -c:v libx264 -pix_fmt yuv420p -preset veryslow -crf 18
Likewise, to encode the output audio stream as mp3, the command could include the following:
- -map "[audioOut]" -c:a libmp3lame -dither_method modified_e_weighted -qscale:a 2
-map "[audio_out]" -c:a libmp3lame -dither_method modified_e_weighted -qscale:a 2
For more information, see the FFmpeg wiki page on concatenating files of different types.