I have an MKV video file (H264 video, AC3 audio) whose volume I need to normalize. Unfortunately, there doesn't seem to be any lossless way of normalizing the AC3 audio track. So I found out the general (lossy) way of normalizing the audio track of any video file is:
> ffmpeg -i input.mkv -vol nnn -vcodec copy output.mkv
nnn = 256 (no change)
nnn = 128 (half the volume)
nnn = 512 (double the volume)
etc.
This should work for any video file format that ffmpeg recognizes.
In addition, I can use the -map commands to remove any unwanted subtitles.
> ffmpeg -i input.mkv -map 0:0 -map 0:1 -ac 2 -vol nnn -vcodec copy output.mkv
This tells ffmpeg to only include track 0 (video) and 1 (audio) in the output file and ignore the rest.
> ffmpeg -i input.mkv -vol nnn -vcodec copy output.mkv
nnn = 256 (no change)
nnn = 128 (half the volume)
nnn = 512 (double the volume)
etc.
This should work for any video file format that ffmpeg recognizes.
In addition, I can use the -map commands to remove any unwanted subtitles.
> ffmpeg -i input.mkv -map 0:0 -map 0:1 -ac 2 -vol nnn -vcodec copy output.mkv
This tells ffmpeg to only include track 0 (video) and 1 (audio) in the output file and ignore the rest.
Comments
Post a Comment