[FFmpeg-user] What does "-vol" parameter mean in ffmpeg?

Nicolas George nicolas.george at normalesup.org
Wed May 18 15:11:03 CEST 2011


L'octidi 28 floréal, an CCXIX, littlebat a écrit :
> I can't understand how to use "-vol" parameter to increase volume in
> ffmpeg. I know "-vol 256" mean keep volume unchanged. But I don't know
> how to choose a proper number for a video file to increase volume. For
> example, does "-vol 512" mean volume intensity is twice as original
> file?

Just try it for yourself:

perl -e 'print pack("s*", 3000, 2000, 1000, 0, -1000, -2000)' |
ffmpeg -f s16le -i - -vol 512 -f s16le - 2> /dev/null |
perl -e '$/=\2; while(<>) { print unpack("s", $_), "\n" }'

Of course, you can do exactly the same with any GUI PCM editor.

By looking at the result, you can see that obviously each sample is
multiplied by vol/256.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20110518/c0534635/attachment.asc>


More information about the ffmpeg-user mailing list