Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#1454 closed defect (invalid)

FFMPEG Volume not working as documented

Reported by: ramitb Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug: What's the right syntax for -vol

When I run ffmpeg -h the documentation says:

-vol volume change audio volume (256=normal)

So if I want to double the volume should I use 512 and to half should I use 128?

The website: http://ffmpeg.org/ffmpeg.html#volume
Says:

If vol is expressed as a decimal number, the output audio volume is given by the relation:
output_volume = vol * input_volume
If vol is expressed as a decimal number followed by the string "dB", the value represents the requested change in decibels of the input audio power, and the output audio volume is given by the relation:
output_volume = 10(vol/20) * input_volume
Otherwise vol is considered an expression and its evaluated value is used for computing the output audio volume according to the first relation.
Default value for vol is 1.0.

I tried dB but it doesn't work, I tried a decimal it does work.
I'm confused, what the right way to use it?

Which documentation is correct and how should it be used to double or half the volume? Are there any limits? (should be decimal, integer, max/min, mulitples of 2 etc?)

Change History (4)

comment:1 by ramitb, 12 years ago

Sorry, I missed the version: ffmpeg version N-41578-ga5c1a0c

in reply to:  description comment:2 by Carl Eugen Hoyos, 12 years ago

Replying to ramitbhalla:

I tried dB but it doesn't work

Command line and complete, uncut console output missing.

in reply to:  description comment:3 by Clément Bœsch, 12 years ago

Resolution: invalid
Status: newclosed

Replying to ramitbhalla:

Summary of the bug: What's the right syntax for -vol

When I run ffmpeg -h the documentation says:

-vol volume change audio volume (256=normal)

So if I want to double the volume should I use 512 and to half should I use 128?

The website: http://ffmpeg.org/ffmpeg.html#volume

Careful, this is the audio volume filter, not the -vol option (the -vol option will transparently insert a volume audio filter, the option is just kept for backward compatibility, and as a simpler way of changing the volume).

-vol 512 should indeed double the volume.

If you want to use the volume audio filter, use -af volume=2.0 (for example).

Please re-open this ticket if you believe something is still wrong, or open another one if you think something can be improved in the documentation.

[...]

comment:4 by ramitb, 12 years ago

Thanks that helps explain it.

Note: See TracTickets for help on using tickets.