[FFmpeg-devel] [PATCH] audio dialog level

Justin Ruggles justinruggles
Sun Dec 16 21:30:07 CET 2007


Here is a more generic patch to handle the dialog level.  I've tried to
make it not AC3-specific.

I've changed the default value to 1.0.  Positive numbers are not valid
for actual values because having dialog above the maximum audio level is
not possible.  Really 0 doesn't make sense in practice, but in theory
the audio could just be really loud dialog at or near 0 dB.  Picking an
arbitrary default or using the one from AC3 isn't ideal either.  So I've
made positive values indicate that the dialog level is not specified.
If that's ok.  If not, I guess I could use the one from AC3 (-31.0 dB).

The patch does not do anything with the value from the decoder in
ffmpeg.c.  The only logical things I can think of that could be done are
to have the user specify a target dialog level and apply gain
accordingly, or pass the value along to the encoder.  I think the first
one is outside the normal scope of ffmpeg...  The 2nd option would be a
mess to implement cleanly when you take into account having to know
whether the user specified the dialog level or if it should be copied
from the decoder (which could change mid-stream).  Also, if the audio
volume is changed in ffmpeg.c, the dialog level will no longer be correct.

That said... here's the patch.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg_dialog_level.diff
Type: text/x-patch
Size: 5681 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071216/73637a3a/attachment.bin>

More information about the ffmpeg-devel mailing list