diff --git a/index.html b/index.html index 849e0fc..5d1721d 100644 --- a/index.html +++ b/index.html @@ -333,7 +333,7 @@

Convert DVD to H.264

-

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.

@@ -347,13 +347,13 @@
output_file.mp4
path and name of the output file

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

-crf 18
sets the constant rate factor to a visually lossless value. Libx264 defaults to a crf of 23, considered medium quality; a smaller CRF value produces a larger and higher quality video.
-preset veryslow
A slower preset will result in better compression and therefore a higher-quality file. The default is medium; slower presets are slow, slower, and veryslow.

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

-map 0:v
encodes all video streams
-map 0:a
encodes all audio streams
@@ -914,7 +914,7 @@

Join files together

-

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 @@
:
separator
a=1
sets the number of output audio streams.
Note that this must be equal to the number of audio streams selected from each segment.
-
[videoOut]
name of the concatenated output video stream. This is a variable name which you define, so you could call it something different, like “vOut”, “outv”, or “banana”.
-
[audioOut]
name of the concatenated output audio stream. Again, this is a variable name which you define.
+
[video_out]
name of the concatenated output video stream. This is a variable name which you define, so you could call it something different, like “vOut”, “outv”, or “banana”.
+
[audio_out]
name of the concatenated output audio stream. Again, this is a variable name which you define.
"
quotation mark to end filtergraph
-
-map "[videoOut]"
map the concatenated video stream into the output file by referencing the variable defined above
-
-map "[audioOut]"
map the concatenated audio stream into the output file by referencing the variable defined above
+
-map "[video_out]"
map the concatenated video stream into the output file by referencing the variable defined above
+
-map "[audio_out]"
map the concatenated audio stream into the output file by referencing the variable defined above
output_file
path, name and extension of the output file

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.

-