Decoding Axis G726-24 audio

mingqian Han mq_han at hotmail.com
Fri Jun 21 00:26:26 PDT 2013


The change I made to gst_ffmpeg_caps_with_codec_id is:--- gstavcodecmap.c.old	2012-10-23 07:03:13 +0800+++ gstavcodecmap.c	2013-06-21 10:52:47 +0800@@ -2638,6 +2638,7 @@     case CODEC_ID_ADPCM_G726:     {       const gchar *layout;+	  gint bitrate;        if ((layout = gst_structure_get_string (str, "layout"))) {         if (!strcmp (layout, "g721")) {@@ -2646,6 +2647,14 @@           context->bit_rate = 32000;         }       }+      if (gst_structure_get_int (str, "bitrate", &bitrate))+		  context->bit_rate = bitrate;+	  else+		  context->bit_rate = 32000; // default to 32000++	  context->sample_rate = 8000;+	  context->channels = 1;+	  context->bits_per_coded_sample = context->bit_rate / context->sample_rate;       break;     }     default:
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.
Thanks.
Rafael
From: mq_han at hotmail.com
To: gstreamer-devel at lists.freedesktop.org
Subject: Decoding Axis G726-24 audio
Date: Fri, 21 Jun 2013 15:18:01 +0800




Hi,    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.    The test pipeline :     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
     The pipeline works but all is noise.
     If I set Axis audio codec to be g.726, 32kbps, the pipeline works and music can be heard with some noise.
     In both cases, the Axis IE plugin (AMC) works well, no noise at all.
     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.
     Could anyone help me?     Thanks!
Rafael 		 	   		   		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130621/21b8cd72/attachment.html>


More information about the gstreamer-devel mailing list