List Info

Thread: Audio over udp




Audio over udp
user name
2006-04-20 22:52:59
Hi,
I am quite new to gstreamer, and I have been struggling to transmit video and audio over udp, with this pipeline

Sender-----
gst-launch filesrc location=MovieTra1950_3.mpeg ! decodebin name=d  ! ffmpegcolorspace ! ffenc_mpeg4 ! udpsink  port=4000 -v d. ! audioconvert ! lame ! udpsink  port=4010 -v

Reciever----
gst-launch udpsrc port=4000 caps="video/mpeg" ! ffdec_mpeg4 ! ffmpegcolorspace ! xvimagesink -v & gst-launch udpsrc port=4010 ! mad ! audioconvert ! osssink -v

But no audio is received  only video.

I also tried using rtp, it worked for video with this pipeline

gst-launch videotestsrc ! video/x-raw-yuv,width=176,height=144 ! ffenc_mpeg4 ! rtpmp4vpay ! rtpmp4vdepay ! ffdec_mpeg4 ! xvimagesink

But for Audio with this pipeline
gst-launch audiotestsrc ! audioconvert  ! audio/x-raw-int, width=16, channels=2, rate=48000 ! lame ! rtpmpapay ! rtpmpadepay  ! ffdec_mp3 ! osssink

gives the following error
ERROR: from element /pipeline0/audiotestsrc0: Internal data flow error.
Additional debug info:
gstbasesrc.c(1416): gst_base_src_loop (): /pipeline0/audiotestsrc0: streaming task paused, reason error

I also tried using a muxer (matroska and multipart) before transmitting over udp but it didn't work. Please how can do this, I really need this help.

Michael








Celebrate Earth Day everyday! Discover 10 things you can do to help slow climate change. Yahoo! Earth Day
Audio over udp
user name
2006-04-21 08:55:43
On Thu, 2006-04-20 at 15:52 -0700, M M wrote:
> Hi,
> I am quite new to gstreamer, and I have been struggling
to transmit
> video and audio over udp, with this pipeline
> 
> Sender-----
> gst-launch filesrc location=MovieTra1950_3.mpeg !
decodebin name=d  !
> ffmpegcolorspace ! ffenc_mpeg4 ! udpsink  port=4000 -v
d. !
> audioconvert ! lame ! udpsink  port=4010 -v
> 
> Reciever----
> gst-launch udpsrc port=4000
caps="video/mpeg" ! ffdec_mpeg4 !
> ffmpegcolorspace ! xvimagesink -v & gst-launch
udpsrc port=4010 !
> mad ! audioconvert ! osssink -v
> 
> But no audio is received  only video.

Well, whilst this might be useful for testing, raw UDP
isn't a very good
solution in practice. Anyway, you should figure out why the
second one
isn't working on its own, without worrying about the video
for now. At a
guess: nothing here states that this stream is mpeg audio.
You probably
want to put a capsfilter in there: udpsrc !
"audio/mpeg, ... " !
mad ! ... (I'm not sure precisely what caps mp3 have)

> 
> I also tried using rtp, it worked for video with this
pipeline

A much better idea. Of course, this is still only really
useful for
testing - you want a proper RTP stack in practice, which
gst-launch
doesn't provide.

> 
> gst-launch videotestsrc !
video/x-raw-yuv,width=176,height=144 !
> ffenc_mpeg4 ! rtpmp4vpay ! rtpmp4vdepay ! ffdec_mpeg4 !
xvimagesink

Note that here, you're not actually doing ANY network
transmission at
all!

> 
> But for Audio with this pipeline
> gst-launch audiotestsrc ! audioconvert  !
audio/x-raw-int, width=16,
> channels=2, rate=48000 ! lame ! rtpmpapay ! rtpmpadepay
 ! ffdec_mp3 !
> osssink
> 

Nor here. Two things to fix: use mad, not ffdec_mp3 (does
that even
work?), and put an audioconvert after it, before the audio
sink. That
might work, if not there's something else that needs
fixing, and you
should use GST_DEBUG to find out what it is.

Mike




-------------------------------------------------------
Using Tomcat but need to do more? Need to support web
services, security?
Get stuff done quickly with pre-integrated technology to
make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
gstreamer-devel mailing list
gstreamer-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstream
er-devel
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )