diff --git a/index.html b/index.html index 7151417..8bae9ae 100644 --- a/index.html +++ b/index.html @@ -450,14 +450,14 @@
ffmpeg -i input_file.wav -write_id3v1 1 -id3v2_version 3 -dither_method rectangular -out_sample_rate 48k -qscale:a 1 output_file.mp3
ffmpeg -i input_file.wav -write_id3v1 1 -id3v2_version 3 -dither_method triangular -out_sample_rate 48k -qscale:a 1 output_file.mp3
This will convert your WAV files to MP3s.
-b:a 320k
to set to the maximum bitrate allowed by the MP3 format. For more detailed discussion on variable vs constant bitrates see here.ffmpeg -i input_file -i input_file_to_append -filter_complex "[0:a:0]asplit=2[a][b];[b]afifo[bb];[1:a:0][bb]concat=n=2:v=0:a=1[concatout]" -map "[a]" -codec:a libmp3lame -dither_method modified_e_weighted -qscale:a 2 output_file.mp3 -map "[concatout]" -codec:a libmp3lame -dither_method modified_e_weighted -qscale:a 2 output_file_appended.mp3
ffmpeg -i input_file -i input_file_to_append -filter_complex "[0:a:0]asplit=2[a][b];[b]afifo[bb];[1:a:0][bb]concat=n=2:v=0:a=1[concatout]" -map "[a]" -codec:a libmp3lame -dither_method triangular -qscale:a 2 output_file.mp3 -map "[concatout]" -codec:a libmp3lame -dither_method triangular -qscale:a 2 output_file_appended.mp3
This script allows you to generate two derivative audio files from a master while appending audio from a separate file (for example a copyright or institutional notice) to one of them.
concat
is used to join files. n=2
tells the filter there are two inputs. v=0:a=1
Tells the filter there are 0 video outputs and 1 audio output. This command appends the audio from the second input to the beginning of stream "bb" and names the output "concatout"ffmpeg -i input_file.wav -c:a aac -b:a 128k -dither_method rectangular -ar 44100 output_file.mp4
ffmpeg -i input_file.wav -c:a aac -b:a 128k -dither_method triangular -ar 44100 output_file.mp4
This will convert your WAV file to AAC/MP4.
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 "[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 "[audio_out]" -c:a libmp3lame -dither_method modified_e_weighted -qscale:a 2
-map "[audio_out]" -c:a libmp3lame -dither_method triangular -qscale:a 2
To concatenate files of different resolutions, you need to resize the videos to have matching resolutions prior to concatenation. The most basic way to do this is by using a scale filter and giving the dimensions of the file you wish to match:
-vf scale=1920:1080:flags=lanczos