[Ffmpeg-devel] ReplayGain for Vorbis decoder

Måns Rullgård mru
Fri May 20 23:43:03 CEST 2005

matthieu castet <castet.matthieu at free.fr> writes:

> Hi,
> Milan Cutka wrote:
>>>castet.matthieu at free.fr writes:
>>>>Selon Milan Cutka <milan_cutka at yahoo.com>:
>>>>>I'm adding VorbisGain tag support to Vorbis decoder. It requires
>>>>>parsing of comments header which I implemented already. Right now
>>>>>I'm deciding whether to directly multiply decoded samples in
>>>>>vorbis_decode_frame or add new field to AVCodecContext, fill it
>>>>>with found multiplier and let the application to perform the
>>>>>multiplication. I'd like to know your opinions. Thanks.
>>>>Well it is quite ugly to pass option to vorbis decoder via comment which are
>>>>normaly decoded in ogg demuxer...
>>>I agree.  A better idea might be to have the demuxer fill in some
>>>field in an appropriate place, and let the application deal with it.
>>>ID3v2 tags can have similar things in them, if we'll ever support
>> When using libavcodec vorbis decoder in ffdshow I have to parse
>> comment on my own, because I don't get information such as
>> replaygain from demuxer. Of course I could parse the headers in my
>> application and don't put it to libavcodec, but I guess it could be
>> useful for other applications using libavcodec but not
>> libavformat. And in my opinion replaygain is different from other
>> comments like author, song name,... because it directly affects
>> playback.
> I there are other formats (mp3 ?) that support it, you should extend
> libavformat to pass gain info to the application.

ID3v2 tags can specify a gain to be applied.

> When when you said it could be useful for other applications using
> libavcodec but not libavformat, I believe it is wrong because the
> behaviour won't be the same if they use libvorbis or libavcodec ?

Agree.  A decoder should do nothing but decode, at least not unless
explicitly requested.

M?ns Rullg?rd
mru at inprovide.com

More information about the ffmpeg-devel mailing list