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 ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
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: [hidden email] To: [hidden email] 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 ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by john oliver-5
From: [hidden email]
To: [hidden email] 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. From: [hidden email] To: [hidden email] Subject: RE: [gst-devel] alsasrc ! alawenc ! rtppcmapay ! udpsink - can receive, record then playback, but not playback live. Date: Mon, 5 Oct 2009 14:58:43 +0100 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 I think the problem could be that the client pipeline needs an element to buffer the incoming stream. ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by john oliver-5
Hi,
I dont think there is any bug in gstreamer.
I have successfully run "audio capture - UDP send" on one board and "UDP receive - audio playout" on other board.
But we didnt specify ssrc, clock-base, seqnum-base etc.. parameters for udpsrc.
Try this once (your command with minimal udpsrc parameters)
gst-launch-0.10 -v udpsrc port=1234 caps="application/x-rtp, media=(string)audio, clock-rate=(int)8000, encoding-name=(string)PCMA" ! rtppcmadepay ! audio/x-alaw, rate=8000, channels=1 ! alawdec ! alsasink
Regards, Viraj
On Mon, Oct 5, 2009 at 7:28 PM, john oliver <[hidden email]> wrote:
-- - Viraj Reality is merely an illusion, albeit a very persistent one. ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Date: Mon, 5 Oct 2009 19:56:50 +0530 From: [hidden email] To: [hidden email] Subject: Re: [gst-devel] alsasrc ! alawenc ! rtppcmapay ! udpsink - can receive, record then playback, but not playback live. Hi,
I dont think there is any bug in gstreamer.
I have successfully run "audio capture - UDP send" on one board and "UDP receive - audio playout" on other board.
But we didnt specify ssrc, clock-base, seqnum-base etc.. parameters for udpsrc.
Try this once (your command with minimal udpsrc parameters)
gst-launch-0.10 -v udpsrc port=1234 caps="application/x-rtp, media=(string)audio, clock-rate=(int)8000, encoding-name=(string)PCMA" ! rtppcmadepay ! audio/x-alaw, rate=8000, channels=1 ! alawdec ! alsasink Thanks Viraj, however I am still only hearing sporadic bursts with that pipeline at the client end. I should have also mentioned that when I successfully streamed to vlc, on the server end I was time-stamping from a filesrc, but I had hacked gstfilesrc.c to sleep between frames for the sample length equivelent to my frame size. John ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
John,
When you play from filesrc, the alsasink will make sure that the pipeline runs realtime. So actually no hacking is required. Did you face any issues without hacking filesrc? Reason for sporadic bursts could be loss of packets while pipeline is busy in playing out. Try putting a queue before alsasink. That will decouple the udp receive and alsasink playout and should avoid packets loss. But I could work without any queue. - Viraj On Mon, Oct 5, 2009 at 8:38 PM, john oliver <[hidden email]> wrote:
-- - Viraj Reality is merely an illusion, albeit a very persistent one. ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Hi Viraj,
I was able to play the the filesrc and aslasink in the same pipeline - the problem was when they were separated by an rtp link. However I have things going now with a customised file src which seems to send things out at a rate which vlc recognises. I don't need to receive it in gst-inspect anymore so I'm not going to persevere with this line of enquiry. But I appreciate your help on this. Thanks, John Date: Mon, 5 Oct 2009 23:50:18 +0530 From: [hidden email] To: [hidden email] Subject: Re: [gst-devel] alsasrc ! alawenc ! rtppcmapay ! udpsink - can receive, record then playback, but not playback live. John, When you play from filesrc, the alsasink will make sure that the pipeline runs realtime. So actually no hacking is required. Did you face any issues without hacking filesrc? Reason for sporadic bursts could be loss of packets while pipeline is busy in playing out. Try putting a queue before alsasink. That will decouple the udp receive and alsasink playout and should avoid packets loss. But I could work without any queue. - Viraj On Mon, Oct 5, 2009 at 8:38 PM, john oliver <[hidden email]> wrote:
-- - Viraj Reality is merely an illusion, albeit a very persistent one. ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |