<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>The change I made to gst_ffmpeg_caps_with_codec_id is:<div><div>--- gstavcodecmap.c.old<span class="Apple-tab-span" style="white-space:pre"> </span>2012-10-23 07:03:13 +0800</div><div>+++ gstavcodecmap.c<span class="Apple-tab-span" style="white-space:pre"> </span>2013-06-21 10:52:47 +0800</div><div>@@ -2638,6 +2638,7 @@</div><div> case CODEC_ID_ADPCM_G726:</div><div> {</div><div> const gchar *layout;</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span> gint bitrate;</div><div> </div><div> if ((layout = gst_structure_get_string (str, "layout"))) {</div><div> if (!strcmp (layout, "g721")) {</div><div>@@ -2646,6 +2647,14 @@</div><div> context->bit_rate = 32000;</div><div> }</div><div> }</div><div>+ if (gst_structure_get_int (str, "bitrate", &bitrate))</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span> context->bit_rate = bitrate;</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span> else</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span> context->bit_rate = 32000; // default to 32000</div><div>+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span> context->sample_rate = 8000;</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span> context->channels = 1;</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span> context->bits_per_coded_sample = context->bit_rate / context->sample_rate;</div><div> break;</div><div> }</div><div> default:</div><div><br></div>I have tried the pipleine to decode g726-24 audio stream from other devices and it is ok. So I don't know what gets wrong with Axis.</div><div><br></div><div>Thanks.</div><div><br></div><div>Rafael<br><div><hr id="stopSpelling">From: mq_han@hotmail.com<br>To: gstreamer-devel@lists.freedesktop.org<br>Subject: Decoding Axis G726-24 audio<br>Date: Fri, 21 Jun 2013 15:18:01 +0800<br><br>
<style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}
.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}
--></style>
<div dir="ltr">Hi,<div> I am facing an issue when decoding g.726 stream from an Axis encoder. The audio is mono at 8K sample rate, g.726 24kbps encoded, rtsp/rtp streaming.</div><div> The test pipeline : </div><div> gst-launch-1.0.exe -v rtspsrc location=rtsp://10.51.252.189/axis-media/media.amp ! rtpg726depay ! avdec_g726 ! audioconvert ! audioresample ! volume volume=0.1 ! autoaudiosink</div><div><br></div><div> The pipeline works but all is noise.</div><div><br></div><div> If I set Axis audio codec to be g.726, 32kbps, the pipeline works and music can be heard with some noise.</div><div><br></div><div> In both cases, the Axis IE plugin (AMC) works well, no noise at all.</div><div><br></div><div> I am using gstreamer-1.0.2, good-1.0.2, gst-libav-1.0.2, with modifications in gst_ffmpeg_caps_with_codec_id, (bits_per_coded_sample), to make the pipeline work.</div><div><br></div><div> Could anyone help me?</div><div> Thanks!</div><div><br></div><div>Rafael</div> </div></div></div> </div></body>
</html>