[gst-devel] alsasrc ! alawenc ! rtppcmapay ! udpsink - can receive, record then playback, but not playback live.

john oliver johnwpoliver at hotmail.com
Mon Oct 5 15:58:43 CEST 2009


Hi,

I managed to play back the stream live using VLC ( buffer time 100ms) . On the server I'm using

 gst-launch-0.10 -v filesrc location=./audiotest1.pcma blocksize=800  do-timestamp=true ! audio/x-alaw, rate=8000, channels=1  ! queue ! rtppcmapay   ! udpsink host=x.x.x.x port=1234


Perhaps I can't play it back live using gstreamer because of a bug ?

John
From: johnwpoliver at hotmail.com
To: gstreamer-devel at lists.sourceforge.net
Date: Mon, 5 Oct 2009 00:20:39 +0100
Subject: [gst-devel] alsasrc ! alawenc ! rtppcmapay ! udpsink - can receive, record then playback, but not playback live.








Hi all,

I'm trying to stream a live source encoded as pcm ulaw over rtp over udp. I'm able to send it out on one side using gst-launch,  and on the client side I can save the stream to a file, then play it back. But I'd like to be able to play it back live on the client side, which I'm unable to do. 

My server

 gst-launch-0.10 -v alsasrc   do-timestamp=true  !  audioconvert ! audioresample ! alawenc ! rtppcmapay  ! udpsink host=127.0.0.1 port=1234 

/GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: actual-buffer-time = 200000
/GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: actual-latency-time = 10000
/GstPipeline:pipeline0/GstAlsaSrc:alsasrc0.GstPad:src: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)8000, channels=(int)2
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstAudioSrcClock
[snip]
/GstPipeline:pipeline0/GstRtpPmcaPay:rtppmcapay0.GstPad:sink: caps = audio/x-alaw, rate=(int)8000, channels=(int)1
/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = application/x-rtp, media=(string)audio, clock-rate=(int)8000, encoding-name=(string)PCMA, payload=(int)8, ssrc=(guint)2636653180, clock-base=(guint)4163613013, seqnum-base=(guint)41237

On the client
receive and record:

gst-launch-0.10 -v udpsrc port=1234 caps="application/x-rtp, media=(string)audio, clock-rate=(int)8000, encoding-name=(string)PCMA, payload=(int)8, ssrc=(guint)3682605153, clock-base=(guint)600325920, seqnum-base=(guint)34884" !  rtppcmadepay  ! filesink location=./received.pcma

then playback:
 gst-launch-0.10 -v filesrc location=./received.pcma  !  audio/x-alaw, rate=8000, channels=1 ! alawdec !  alsasink  blocksize=32

The above works ok. 

But when I'm trying to use the following to playback live ..

 gst-launch-0.10 -v udpsrc  do-timestamp=true port=1234 caps="application/x-rtp, media=(string)audio, clock-rate=(int)8000, encoding-name=(string)PCMA, payload=(int)8, ssrc=(guint)3682605153, clock-base=(guint)600325920, seqnum-base=(guint)34884"  ! rtppcmadepay  ! audio/x-alaw, rate=8000, channels=1  ! alawdec  ! alsasink 


I don't hear anything ( apart from the odd glitch) . It tells me .. 

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstRtpPcmaDepay:rtppcmadepay0.GstPad:src: caps = audio/x-alaw, channels=(int)1, rate=(int)8000
/GstPipeline:pipeline0/GstRtpPcmaDepay:rtppcmadepay0.GstPad:sink: caps = application/x-rtp, media=(string)audio, clock-rate=(int)8000, encoding-name=(string)PCMA, payload=(int)8, ssrc=(guint)3682605153, clock-base=(guint)600325920, seqnum-base=(guint)34884
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = audio/x-alaw, channels=(int)1, rate=(int)8000
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = audio/x-alaw, channels=(int)1, rate=(int)8000
/GstPipeline:pipeline0/GstALawDec:alawdec0.GstPad:src: caps = audio/x-raw-int, width=(int)16, depth=(int)16, endianness=(int)1234, signed=(boolean)true, rate=(int)8000, channels=(int)1
/GstPipeline:pipeline0/GstALawDec:alawdec0.GstPad:sink: caps = audio/x-alaw, channels=(int)1, rate=(int)8000
/GstPipeline:pipeline0/GstAlsaSink:alsasink0.GstPad:sink: caps = audio/x-raw-int, width=(int)16, depth=(int)16, endianness=(int)1234, signed=(boolean)true, rate=(int)8000, channels=(int)1

This is the same caps I see when I playback from the recorded file, almost, where the alawdec sink buffer size is 4096 ..



/GstPipeline:pipeline0/GstALawDec:alawdec0.GstPad:sink: caps = audio/x-alaw, rate=(int)8000, channels=(int)1
alawdec: buffer size: 4096
/GstPipeline:pipeline0/GstAlsaSink:alsasink0.GstPad:sink: caps = audio/x-raw-int, width=(int)16, depth=(int)16, endianness=(int)1234, signed=(boolean)true, rate=(int)8000, channels=(int)1

Can anybody spot any glaring mistakes or perhaps give me any pointers, please.

John

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20091005/cd3ca141/attachment.htm>


More information about the gstreamer-devel mailing list