Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#1454 closed defect (invalid)

FFMPEG Volume not working as documented

Reported by: ramitbhalla 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 Changed 4 years ago by ramitbhalla

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

comment:2 in reply to: ↑ description Changed 4 years ago by cehoyos

Replying to ramitbhalla:

I tried dB but it doesn't work

Command line and complete, uncut console output missing.

comment:3 in reply to: ↑ description Changed 4 years ago by ubitux

  • Resolution set to invalid
  • Status changed from new to closed

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 Changed 4 years ago by ramitbhalla

Thanks that helps explain it.

Note: See TracTickets for help on using tickets.