1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3<head> 4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 5<title>rgvolume: GStreamer Good Plugins 1.0 Plugins Reference Manual</title> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="index.html" title="GStreamer Good Plugins 1.0 Plugins Reference Manual"> 8<link rel="up" href="ch01.html" title="gst-plugins-good Elements"> 9<link rel="prev" href="gst-plugins-good-plugins-rglimiter.html" title="rglimiter"> 10<link rel="next" href="gst-plugins-good-plugins-rippletv.html" title="rippletv"> 11<meta name="generator" content="GTK-Doc V1.28 (XML mode)"> 12<link rel="stylesheet" href="style.css" type="text/css"> 13</head> 14<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 15<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> 16<td width="100%" align="left" class="shortcuts"> 17<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> 18 <a href="#gst-plugins-good-plugins-rgvolume.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 19 <a href="#gst-plugins-good-plugins-rgvolume.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces"> <span class="dim">|</span> 20 <a href="#gst-plugins-good-plugins-rgvolume.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties"> <span class="dim">|</span> 21 <a href="#gst-plugins-good-plugins-rgvolume.properties" class="shortcut">Properties</a></span> 22</td> 23<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> 24<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> 25<td><a accesskey="p" href="gst-plugins-good-plugins-rglimiter.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> 26<td><a accesskey="n" href="gst-plugins-good-plugins-rippletv.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> 27</tr></table> 28<div class="refentry"> 29<a name="gst-plugins-good-plugins-rgvolume"></a><div class="titlepage"></div> 30<div class="refnamediv"><table width="100%"><tr> 31<td valign="top"> 32<h2><span class="refentrytitle"><a name="gst-plugins-good-plugins-rgvolume.top_of_page"></a>rgvolume</span></h2> 33<p>rgvolume</p> 34</td> 35<td class="gallery_image" valign="top" align="right"></td> 36</tr></table></div> 37<div class="refsect1"> 38<a name="gst-plugins-good-plugins-rgvolume.properties"></a><h2>Properties</h2> 39<div class="informaltable"><table class="informaltable" border="0"> 40<colgroup> 41<col width="150px" class="properties_type"> 42<col width="300px" class="properties_name"> 43<col width="200px" class="properties_flags"> 44</colgroup> 45<tbody> 46<tr> 47<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td> 48<td class="property_name"><a class="link" href="gst-plugins-good-plugins-rgvolume.html#GstRgVolume--album-mode" title="The “album-mode” property">album-mode</a></td> 49<td class="property_flags">Read / Write</td> 50</tr> 51<tr> 52<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a></td> 53<td class="property_name"><a class="link" href="gst-plugins-good-plugins-rgvolume.html#GstRgVolume--fallback-gain" title="The “fallback-gain” property">fallback-gain</a></td> 54<td class="property_flags">Read / Write</td> 55</tr> 56<tr> 57<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a></td> 58<td class="property_name"><a class="link" href="gst-plugins-good-plugins-rgvolume.html#GstRgVolume--headroom" title="The “headroom” property">headroom</a></td> 59<td class="property_flags">Read / Write</td> 60</tr> 61<tr> 62<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a></td> 63<td class="property_name"><a class="link" href="gst-plugins-good-plugins-rgvolume.html#GstRgVolume--pre-amp" title="The “pre-amp” property">pre-amp</a></td> 64<td class="property_flags">Read / Write</td> 65</tr> 66<tr> 67<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a></td> 68<td class="property_name"><a class="link" href="gst-plugins-good-plugins-rgvolume.html#GstRgVolume--result-gain" title="The “result-gain” property">result-gain</a></td> 69<td class="property_flags">Read</td> 70</tr> 71<tr> 72<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a></td> 73<td class="property_name"><a class="link" href="gst-plugins-good-plugins-rgvolume.html#GstRgVolume--target-gain" title="The “target-gain” property">target-gain</a></td> 74<td class="property_flags">Read</td> 75</tr> 76</tbody> 77</table></div> 78</div> 79<a name="GstRgVolume"></a><div class="refsect1"> 80<a name="gst-plugins-good-plugins-rgvolume.other"></a><h2>Types and Values</h2> 81<div class="informaltable"><table class="informaltable" width="100%" border="0"> 82<colgroup> 83<col width="150px" class="name"> 84<col class="description"> 85</colgroup> 86<tbody><tr> 87<td class="datatype_keyword">struct</td> 88<td class="function_name"><a class="link" href="gst-plugins-good-plugins-rgvolume.html#GstRgVolume-struct" title="struct GstRgVolume">GstRgVolume</a></td> 89</tr></tbody> 90</table></div> 91</div> 92<div class="refsect1"> 93<a name="gst-plugins-good-plugins-rgvolume.object-hierarchy"></a><h2>Object Hierarchy</h2> 94<pre class="screen"> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a> 95 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a> 96 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstObject.html#GstObject-struct">GstObject</a> 97 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstElement.html#GstElement-struct">GstElement</a> 98 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBin.html#GstBin-struct">GstBin</a> 99 <span class="lineart">╰──</span> GstRgVolume 100</pre> 101</div> 102<div class="refsect1"> 103<a name="gst-plugins-good-plugins-rgvolume.implemented-interfaces"></a><h2>Implemented Interfaces</h2> 104<p> 105GstRgVolume implements 106 <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstChildProxy.html#GstChildProxy-struct">GstChildProxy</a>.</p> 107</div> 108<div class="refsect1"> 109<a name="gst-plugins-good-plugins-rgvolume.description"></a><h2>Description</h2> 110<p>This element applies volume changes to streams as lined out in the proposed</p> 111<a class="ulink" href="http://replaygain.org" target="_top">ReplayGain standard</a>. It 112<p>interprets the ReplayGain meta data tags and carries out the adjustment (by 113using a volume element internally). The relevant tags are:</p> 114<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 115<li class="listitem"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstTagList.html#GST-TAG-TRACK-GAIN:CAPS"><span class="type">GST_TAG_TRACK_GAIN</span></a></li> 116<li class="listitem"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstTagList.html#GST-TAG-TRACK-PEAK:CAPS"><span class="type">GST_TAG_TRACK_PEAK</span></a></li> 117<li class="listitem"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstTagList.html#GST-TAG-ALBUM-GAIN:CAPS"><span class="type">GST_TAG_ALBUM_GAIN</span></a></li> 118<li class="listitem"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstTagList.html#GST-TAG-ALBUM-PEAK:CAPS"><span class="type">GST_TAG_ALBUM_PEAK</span></a></li> 119<li class="listitem"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstTagList.html#GST-TAG-REFERENCE-LEVEL:CAPS"><span class="type">GST_TAG_REFERENCE_LEVEL</span></a></li> 120</ul></div> 121<p>The information carried by these tags must have been calculated beforehand by 122performing the ReplayGain analysis. This is implemented by the <a class="link" href="gst-plugins-good-plugins-rganalysis.html#GstRgAnalysis">rganalysis</a> element.</p> 123<p>The signal compression/limiting recommendations outlined in the proposed 124standard are not implemented by this element. This has to be handled by 125separate elements because applications might want to have additional filters 126between the volume adjustment and the limiting stage. A basic limiter is 127included with this plugin: The <a class="link" href="gst-plugins-good-plugins-rglimiter.html#GstRgLimiter">rglimiter</a> 128element applies -6 dB hard limiting as mentioned in the ReplayGain standard.</p> 129<div class="refsect2"> 130<a name="id-1.2.129.8.8"></a><h3>Example launch line</h3> 131<div class="informalexample"> 132 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> 133 <tbody> 134 <tr> 135 <td class="listing_lines" align="right"><pre>1 1362</pre></td> 137 <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> filesrc location<span class="gtkdoc opt">=</span>filename<span class="gtkdoc opt">.</span>ext <span class="gtkdoc opt">!</span> decodebin <span class="gtkdoc opt">!</span> audioconvert \ 138 <span class="gtkdoc opt">!</span> rgvolume <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> audioresample <span class="gtkdoc opt">!</span> alsasink</pre></td> 139 </tr> 140 </tbody> 141 </table> 142</div> 143 Playback of a file 144</div> 145<div class="refsynopsisdiv"> 146<h2>Synopsis</h2> 147<div class="refsect2"> 148<a name="id-1.2.129.8.9.1"></a><h3>Element Information</h3> 149<div class="variablelist"><table border="0" class="variablelist"> 150<colgroup> 151<col align="left" valign="top"> 152<col> 153</colgroup> 154<tbody> 155<tr> 156<td><p><span class="term">plugin</span></p></td> 157<td> 158 <a class="link" href="gst-plugins-good-plugins-plugin-replaygain.html#plugin-replaygain">replaygain</a> 159 </td> 160</tr> 161<tr> 162<td><p><span class="term">author</span></p></td> 163<td>René Stadler <mail@renestadler.de></td> 164</tr> 165<tr> 166<td><p><span class="term">class</span></p></td> 167<td>Filter/Effect/Audio</td> 168</tr> 169</tbody> 170</table></div> 171</div> 172<hr> 173<div class="refsect2"> 174<a name="id-1.2.129.8.9.2"></a><h3>Element Pads</h3> 175<div class="variablelist"><table border="0" class="variablelist"> 176<colgroup> 177<col align="left" valign="top"> 178<col> 179</colgroup> 180<tbody> 181<tr> 182<td><p><span class="term">name</span></p></td> 183<td>sink</td> 184</tr> 185<tr> 186<td><p><span class="term">direction</span></p></td> 187<td>sink</td> 188</tr> 189<tr> 190<td><p><span class="term">presence</span></p></td> 191<td>always</td> 192</tr> 193<tr> 194<td><p><span class="term">details</span></p></td> 195<td>audio/x-raw, format=(string){ F32LE, S16LE }, layout=(string){ interleaved, non-interleaved }, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ]</td> 196</tr> 197</tbody> 198</table></div> 199<div class="variablelist"><table border="0" class="variablelist"> 200<colgroup> 201<col align="left" valign="top"> 202<col> 203</colgroup> 204<tbody> 205<tr> 206<td><p><span class="term">name</span></p></td> 207<td>src</td> 208</tr> 209<tr> 210<td><p><span class="term">direction</span></p></td> 211<td>source</td> 212</tr> 213<tr> 214<td><p><span class="term">presence</span></p></td> 215<td>always</td> 216</tr> 217<tr> 218<td><p><span class="term">details</span></p></td> 219<td>audio/x-raw, format=(string){ F32LE, S16LE }, layout=(string){ interleaved, non-interleaved }, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ]</td> 220</tr> 221</tbody> 222</table></div> 223</div> 224</div> 225</div> 226<div class="refsect1"> 227<a name="gst-plugins-good-plugins-rgvolume.functions_details"></a><h2>Functions</h2> 228<p></p> 229</div> 230<div class="refsect1"> 231<a name="gst-plugins-good-plugins-rgvolume.other_details"></a><h2>Types and Values</h2> 232<div class="refsect2"> 233<a name="GstRgVolume-struct"></a><h3>struct GstRgVolume</h3> 234<pre class="programlisting">struct GstRgVolume;</pre> 235<p>Opaque data structure.</p> 236</div> 237</div> 238<div class="refsect1"> 239<a name="gst-plugins-good-plugins-rgvolume.property-details"></a><h2>Property Details</h2> 240<div class="refsect2"> 241<a name="GstRgVolume--album-mode"></a><h3>The <code class="literal">“album-mode”</code> property</h3> 242<pre class="programlisting"> “album-mode” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre> 243<p>Whether to prefer album gain over track gain.</p> 244<p>If set to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, use album gain instead of track gain if both are 245available. This keeps the relative loudness levels of tracks from the same 246album intact.</p> 247<p>If set to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, track mode is used instead. This effectively leads to 248more extensive normalization.</p> 249<p>If album mode is enabled but the album gain tag is absent in the stream, 250the track gain is used instead. If both gain tags are missing, the value 251of the <a class="link" href="gst-plugins-good-plugins-rgvolume.html#GstRgVolume--fallback-gain" title="The “fallback-gain” property"><span class="type">“fallback-gain”</span></a> property is used instead.</p> 252<p>Flags: Read / Write</p> 253<p>Default value: TRUE</p> 254</div> 255<hr> 256<div class="refsect2"> 257<a name="GstRgVolume--fallback-gain"></a><h3>The <code class="literal">“fallback-gain”</code> property</h3> 258<pre class="programlisting"> “fallback-gain” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a></pre> 259<p>Fallback gain [dB] for streams missing ReplayGain tags.</p> 260<p>Flags: Read / Write</p> 261<p>Allowed values: [-60,60]</p> 262<p>Default value: 0</p> 263</div> 264<hr> 265<div class="refsect2"> 266<a name="GstRgVolume--headroom"></a><h3>The <code class="literal">“headroom”</code> property</h3> 267<pre class="programlisting"> “headroom” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a></pre> 268<p>Extra headroom [dB]. This controls the amount by which the output can 269exceed digital full scale.</p> 270<p>Only set this to a value greater than 0.0 if signal compression/limiting of 271a suitable form is applied to the output (or output is brought into the 272correct range by some other transformation).</p> 273<p>This element internally uses a volume element, which also supports 274operating on integer audio formats. These formats do not allow exceeding 275digital full scale. If extra headroom is used, make sure that the raw 276audio data format is floating point (F32). Otherwise, 277clipping distortion might be introduced as part of the volume adjustment 278itself.</p> 279<p>Flags: Read / Write</p> 280<p>Allowed values: [0,60]</p> 281<p>Default value: 0</p> 282</div> 283<hr> 284<div class="refsect2"> 285<a name="GstRgVolume--pre-amp"></a><h3>The <code class="literal">“pre-amp”</code> property</h3> 286<pre class="programlisting"> “pre-amp” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a></pre> 287<p>Additional gain to apply globally [dB]. This controls the trade-off 288between uniformity of normalization and utilization of available dynamic 289range.</p> 290<p>Note that the default value is 0 dB because the ReplayGain reference value 291was adjusted by +6 dB (from 83 to 89 dB). At the time of this writing, the</p> 292<a class="ulink" href="http://replaygain.org" target="_top">webpage</a> is still outdated and 293<p>does not reflect this change however. Where the original proposal states 294that a proper default pre-amp value is +6 dB, this translates to the used 0 295dB.</p> 296<p>Flags: Read / Write</p> 297<p>Allowed values: [-60,60]</p> 298<p>Default value: 0</p> 299</div> 300<hr> 301<div class="refsect2"> 302<a name="GstRgVolume--result-gain"></a><h3>The <code class="literal">“result-gain”</code> property</h3> 303<pre class="programlisting"> “result-gain” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a></pre> 304<p>Applied gain [dB]. This gain is applied to processed buffer data.</p> 305<p>This is set to the <a class="link" href="gst-plugins-good-plugins-rgvolume.html#GstRgVolume--target-gain" title="The “target-gain” property"><span class="type">“target-gain”</span></a> if amplification by that amount 306can be applied safely. "Safely" means that the volume adjustment does not 307inflict clipping distortion. Should this not be the case, the result gain 308is set to an appropriately reduced value (by applying peak normalization). 309The proposed standard calls this "clipping prevention".</p> 310<p>The difference between target and result gain reflects the necessary amount 311of reduction. Applications can make use of this information to temporarily 312reduce the <a class="link" href="gst-plugins-good-plugins-rgvolume.html#GstRgVolume--pre-amp" title="The “pre-amp” property"><span class="type">“pre-amp”</span></a> for subsequent streams, as recommended by 313the ReplayGain standard.</p> 314<p>Note that target and result gain differing for a great majority of streams 315indicates a problem: What happens in this case is that most streams receive 316peak normalization instead of amplification by the ideal replay gain. To 317prevent this, the <a class="link" href="gst-plugins-good-plugins-rgvolume.html#GstRgVolume--pre-amp" title="The “pre-amp” property"><span class="type">“pre-amp”</span></a> has to be lowered and/or a limiter 318has to be used which facilitates the use of <a class="link" href="gst-plugins-good-plugins-rgvolume.html#GstRgVolume--headroom" title="The “headroom” property"><span class="type">“headroom”</span></a>.</p> 319<p>Flags: Read</p> 320<p>Allowed values: [-120,120]</p> 321<p>Default value: 0</p> 322</div> 323<hr> 324<div class="refsect2"> 325<a name="GstRgVolume--target-gain"></a><h3>The <code class="literal">“target-gain”</code> property</h3> 326<pre class="programlisting"> “target-gain” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a></pre> 327<p>Applicable gain [dB]. This gain is supposed to be applied.</p> 328<p>Depending on the value of the <a class="link" href="gst-plugins-good-plugins-rgvolume.html#GstRgVolume--album-mode" title="The “album-mode” property"><span class="type">“album-mode”</span></a> property and the 329presence of ReplayGain tags in the stream, this is set according to one of 330these simple formulas:</p> 331<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 332<li class="listitem"> 333<a class="link" href="gst-plugins-good-plugins-rgvolume.html#GstRgVolume--pre-amp" title="The “pre-amp” property"><span class="type">“pre-amp”</span></a> + album gain of the stream</li> 334<li class="listitem"> 335<a class="link" href="gst-plugins-good-plugins-rgvolume.html#GstRgVolume--pre-amp" title="The “pre-amp” property"><span class="type">“pre-amp”</span></a> + track gain of the stream</li> 336<li class="listitem"> 337<a class="link" href="gst-plugins-good-plugins-rgvolume.html#GstRgVolume--pre-amp" title="The “pre-amp” property"><span class="type">“pre-amp”</span></a> + <a class="link" href="gst-plugins-good-plugins-rgvolume.html#GstRgVolume--fallback-gain" title="The “fallback-gain” property"><span class="type">“fallback-gain”</span></a> 338</li> 339</ul></div> 340<p>Flags: Read</p> 341<p>Allowed values: [-120,120]</p> 342<p>Default value: 0</p> 343</div> 344</div> 345<div class="refsect1"> 346<a name="gst-plugins-good-plugins-rgvolume.see-also"></a><h2>See Also</h2> 347<p><a class="link" href="gst-plugins-good-plugins-rglimiter.html#GstRgLimiter"><span class="type">GstRgLimiter</span></a>, <a class="link" href="gst-plugins-good-plugins-rganalysis.html#GstRgAnalysis"><span class="type">GstRgAnalysis</span></a></p> 348</div> 349</div> 350<div class="footer"> 351<hr>Generated by GTK-Doc V1.28</div> 352</body> 353</html>