Showing entries with tag "ffmpeg".

Found 3 entries

FFmpeg: Measure the average loudness of an audio file

If you need to calculate the average volume or loudness of a file you can use FFmpeg with the volumedetect filter:

ffmpeg -i input.mp3 -af volumedetect -f null /dev/null 2>&1 | grep -P '(mean|max)_volume'

This will report the average (mean) and the maximum volume. This information is useful when comparing two files to see if their "loudness" (or quietness) is comparable.

[Parsed_volumedetect_0 @ 0x698a300] mean_volume: -19.7 dB
[Parsed_volumedetect_0 @ 0x698a300] max_volume: -1.0 dB
Leave A Reply

Making ffmpeg truly quiet (non verbose)

ffmpeg is a great program, but can be rather verbose in it's output. This can be problematic if you're trying to use ffmpeg in a script. The best way to make ffmpeg truly silent in it's output is with the following options:

ffmpeg -hide_banner -loglevel error ...

This will hide the startup banner, and any encoding stats. Assuming your encode goes normally you shouldn't get any output at all.

Leave A Reply

FFMPEG: Using VBR encoding for MP3s

I'm a big fan of using VBR for MP3s. I use FFMPEG to convert video (and sometimes audio) files to different formats. If you want to utilize VBR with LAME when you do FFMPEG conversions you need to specify the libmp3lame encoder, and then a given quality level:

ffmpeg -i input.wav -codec:a libmp3lame -qscale:a 2 output.mp3

ffmpeg -i video.mp4 -codec:a libmp3lame -qscale:a 6 /tmp/output.mkv
Leave A Reply