[FFmpeg-user] mpeg2 filesize reduction: reduce video, enhance audio, codec selection

Steve Boyer steveboyer85 at gmail.com
Wed May 7 16:08:13 CEST 2014

> The problem is still the sound, however; it's human speech and the volume
> of the speaker fluctuates - sometimes it's very hushed, other times (when
> excited) it's very loud. volume=1.5 is a little low, so I may bump that up
> to 1.8 or so, but I need a method to "normalize to median" or "set all
> frames to xyz dB" the volume on the video (raise the hushed voice, diminish
> or keep same the loud parts).
> Any ideas on how that can be achieved?

My immediate thought on this would be to output the source audio to a
.WAV file (for uncompressed audio), open it in Audacity and use the
compressor filter (http://wiki.audacityteam.org/wiki/Compressor). When
it is as you like it, you could export it, use ffmpeg to encode it via
the fdkaac library, and then mux the audio with the video:

ffmpeg -i video.mp4 -i audio.aac -map 0:0 -map 1:0 -c copy final.mp4

The other option is to use the compand filter
(https://www.ffmpeg.org/ffmpeg-filters.html#compand). I have no
experience with this though - others might be able to weigh in.

Note: commands untested - just my thoughts.


More information about the ffmpeg-user mailing list