G729 annex B not being stored properly.

Olivier CrĂȘte olivier.crete at collabora.com
Thu Dec 27 16:58:55 UTC 2018


Hi,

As Annex B frames as 2 bytes (unlike the normal ones which are 10
bytes), you need some kind of container to know where the frame
boundaries are. The only such container that I see supported by
GStreamer is the "BIT" container, so you should add "avmux_bit" between
the depayloader and the filesink to create such a file.

Olivier

On Wed, 2018-12-26 at 04:47 -0600, sameer_evon wrote:
> Hello All,
> 
> I am using Gstreamer pipeline to record audio from rtp. Following is the
> pipeline:
> 
> gst-launch udpsrc port=5002
> caps="application/x-rtp,channels=(int)1,media=(string)audio,payload=(int)18,clock-rate=(int)8000,encoding-name=(string)G729"
> ! rtpg729depay ! filesink location=rawaudio.g729
> 
> This pipeline is storing proper data for G729 codec but for G729 annex B,
> the audio is not playing clearly after conversion. Conversion is done using
> ffmpeg.
> 
> Please let me know if I am doing anything wrong.
> 
> Following is a part of the logs from gst.
> 
> pu                                 shing buffer of size 20
> 0:01:53.334212652 28676      0x25e9940 LOG                   udpsrc
> gstudpsrc.c:538:gst_udpsrc_create:<udpsrc0> doing select, timeout -                                
> 1
> 0:01:53.354079519 28676      0x25e9940 LOG                   udpsrc
> gstudpsrc.c:625:gst_udpsrc_create:<udpsrc0> read packet of 32 bytes
> 0:01:53.354133114 28676      0x25e9940 LOG             rtpg729depay
> gstrtpg729depay.c:191:gst_rtp_g729_depay_process:<rtpg729depay0> pa                                
> yload len 20
> 0:01:53.354181229 28676      0x25e9940 LOG             rtpg729depay
> gstrtpg729depay.c:209:gst_rtp_g729_depay_process:<rtpg729depay0> pu                                
> shing buffer of size 20
> 0:01:53.354268835 28676      0x25e9940 LOG                   udpsrc
> gstudpsrc.c:538:gst_udpsrc_create:<udpsrc0> doing select, timeout -                                
> 1
> 0:01:53.374607788 28676      0x25e9940 LOG                   udpsrc
> gstudpsrc.c:625:gst_udpsrc_create:<udpsrc0> read packet of 24 bytes
> 0:01:53.374660548 28676      0x25e9940 LOG             rtpg729depay
> gstrtpg729depay.c:191:gst_rtp_g729_depay_process:<rtpg729depay0> pa                                
> yload len 12
> 0:01:53.374702863 28676      0x25e9940 LOG             rtpg729depay
> gstrtpg729depay.c:194:gst_rtp_g729_depay_process:<rtpg729depay0> G7                                
> 29 payload contains CNG frame
> 0:01:53.374751133 28676      0x25e9940 LOG             rtpg729depay
> gstrtpg729depay.c:209:gst_rtp_g729_depay_process:<rtpg729depay0> pu                                
> shing buffer of size 12
> 0:01:53.374832849 28676      0x25e9940 LOG                   udpsrc
> gstudpsrc.c:538:gst_udpsrc_create:<udpsrc0> doing select, timeout -                                
> 1
> 0:01:53.394247944 28676      0x25e9940 LOG                   udpsrc
> gstudpsrc.c:625:gst_udpsrc_create:<udpsrc0> read packet of 32 bytes
> 0:01:53.394304285 28676      0x25e9940 LOG             rtpg729depay
> gstrtpg729depay.c:191:gst_rtp_g729_depay_process:<rtpg729depay0> pa                                
> yload len 20
> 0:01:53.394354320 28676      0x25e9940 LOG             rtpg729depay
> gstrtpg729depay.c:209:gst_rtp_g729_depay_process:<rtpg729depay0> pu                                
> shing buffer of size 20
> 0:01:53.394442040 28676      0x25e9940 LOG                   udpsrc
> gstudpsrc.c:538:gst_udpsrc_create:<udpsrc0> doing select, timeout -                                
> 1
> 0:01:53.415260289 28676      0x25e9940 LOG                   udpsrc
> gstudpsrc.c:625:gst_udpsrc_create:<udpsrc0> read packet of 32 bytes
> 0:01:53.415316715 28676      0x25e9940 LOG             rtpg729depay
> gstrtpg729depay.c:191:gst_rtp_g729_depay_process:<rtpg729depay0> pa                                
> yload len 20
> 0:01:53.415366785 28676      0x25e9940 LOG             rtpg729depay
> gstrtpg729depay.c:209:gst_rtp_g729_depay_process:<rtpg729depay0> pu                                
> shing buffer of size 20
> 0:01:53.415457460 28676      0x25e9940 LOG                   udpsrc
> gstudpsrc.c:538:gst_udpsrc_create:<udpsrc0> doing select, timeout -                                
> 1
> 0:01:53.425390471 28676      0x25e9940 LOG                   udpsrc
> gstudpsrc.c:625:gst_udpsrc_create:<udpsrc0> read packet of 14 bytes
> 0:01:53.425443921 28676      0x25e9940 LOG             rtpg729depay
> gstrtpg729depay.c:191:gst_rtp_g729_depay_process:<rtpg729depay0> pa                                
> yload len 2
> 0:01:53.425486616 28676      0x25e9940 LOG             rtpg729depay
> gstrtpg729depay.c:194:gst_rtp_g729_depay_process:<rtpg729depay0> G7                                
> 29 payload contains CNG frame
> 0:01:53.425534671 28676      0x25e9940 LOG             rtpg729depay
> gstrtpg729depay.c:209:gst_rtp_g729_depay_process:<rtpg729depay0> pu                                
> shing buffer of size 2
> 0:01:53.425616552 28676      0x25e9940 LOG                   udpsrc
> gstudpsrc.c:538:gst_udpsrc_create:<udpsrc0> doing select, timeout -                                
> 1
> 0:01:53.455497387 28676      0x25e9940 LOG                   udpsrc
> gstudpsrc.c:625:gst_udpsrc_create:<udpsrc0> read packet of 32 bytes
> 0:01:53.455550182 28676      0x25e9940 LOG             rtpg729depay
> gstrtpg729depay.c:191:gst_rtp_g729_depay_process:<rtpg729depay0> pa                                
> yload len 20
> 0:01:53.455600417 28676      0x25e9940 LOG             rtpg729depay
> gstrtpg729depay.c:209:gst_rtp_g729_depay_process:<rtpg729depay0> pu                                
> shing buffer of size 20
> 0:01:53.455689327 28676      0x25e9940 LOG                   udpsrc
> gstudpsrc.c:538:gst_udpsrc_create:<udpsrc0> doing select, timeout -                                
> 1
> 
> 
> 
> 
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-- 
Olivier CrĂȘte
olivier.crete at collabora.com



More information about the gstreamer-devel mailing list