![]() |
![]() |
![]() |
GStreamer Good Plugins 0.10 Plugins Reference Manual | ![]() |
---|---|---|---|---|
This element analyzes raw audio sample data in accordance with the proposed ReplayGain standard for calculating the ideal replay gain for music tracks and albums. The element is designed as a pass-through filter that never modifies any data. As it receives an EOS event, it finalizes the ongoing analysis and generates a tag list containing the results. It is sent downstream with a tag event and posted on the message bus with a tag message. The EOS event is forwarded as normal afterwards. Result tag lists at least contain the tags GST_TAG_TRACK_GAIN, GST_TAG_TRACK_PEAK and GST_TAG_REFERENCE_LEVEL.
Because the generated metadata tags become available at the end of streams, downstream muxer and encoder elements are normally unable to save them in their output since they generally save metadata in the file header. Therefore, it is often necessary that applications read the results in a bus event handler for the tag message. Obtaining the values this way is always needed for album processing since the album gain and peak values need to be associated with all tracks of an album, not just the last one.
gst-launch -t audiotestsrc wave=sine num-buffers=512 ! rganalysis ! fakesink
gst-launch -t filesrc location=filename.ext ! decodebin \ ! audioconvert ! audioresample ! rganalysis ! fakesink
gst-launch -t gnomevfssrc location=http://replaygain.hydrogenaudio.org/ref_pink.wav \ ! wavparse ! rganalysis ! fakesink
The above launch line yields a result gain of +6 dB (instead of the expected +0 dB). This is not in error, refer to the "reference-level" property documentation for more information.
This element is based on code used in the vorbisgain program and many others. The relevant parts are copyrighted by David Robinson, Glen Sawyer and Frank Klemm.
plugin |
replaygain |
author |
René Stadler <mail@renestadler.de> |
class |
Filter/Analyzer/Audio |
name |
sink |
direction |
sink |
presence |
always |
details |
audio/x-raw-float, width=(int)32, endianness=(int)1234, channels=(int){ 1, 2 }, rate=(int){ 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 } |
audio/x-raw-int, width=(int)16, depth=(int)[ 1, 16 ], signed=(boolean)true, endianness=(int)1234, channels=(int){ 1, 2 }, rate=(int){ 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 } |
name |
src |
direction |
source |
presence |
always |
details |
audio/x-raw-float, width=(int)32, endianness=(int)1234, channels=(int){ 1, 2 }, rate=(int){ 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 } |
audio/x-raw-int, width=(int)16, depth=(int)[ 1, 16 ], signed=(boolean)true, endianness=(int)1234, channels=(int){ 1, 2 }, rate=(int){ 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 } |