[gst-devel] RTP streaming MPEG-4 video: Bugs?

Wim Taymans wim at fluendo.com
Fri Aug 11 10:08:17 CEST 2006


On Fri, 2006-08-11 at 11:25 +0530, Deeptendu Bikash wrote:
Hi,

> Problem 1)
> I am trying to stream MPEG-4 video (MP4V-ES) using RTP. On the sender
> side I give:
> gst-launch videotestsrc ! ffenc_mpeg4 ! rtpmp4vpay ! udpsink port =
> 1234
> This is producing packets as can be seen from Ethereal packet capture.
> On decoding the packet as RTP, I can see the payload typ as 96.
> 
> On the sender side I type:
> gst-launch udpsrc port=1234 !
> application/x-rtp,clock-rate=90000,pt=96 ! rtpmp4vdepay !
> ffdec_mpeg4 ! xvimagesink
<snip>

This should becoma FAQ. For RTP streaming there is a lot of info that
needs to be passed to the receiver using some out-of-band mechanism such
as SDP. In GStreamer there is a mapping from SDP to GstCaps defined. The
proper procedure to set up an RTP streaming session is:

On the sender:

  gst-launch -v videotestsrc ! ffenc_mpeg4 ! rtpmp4vpay ! udpsink port =
1234

You need the -v option so that you can see the caps set on the sinkp pad
of udpsink. This will then result in output like this:

Setting pipeline to PAUSED ...
/pipeline0/videotestsrc0.src: caps = video/x-raw-yuv,
format=(fourcc)I420, width=(int)320, height=(int)240,
framerate=(fraction)30/1
Pipeline is PREROLLING ...
/pipeline0/ffenc_mpeg40.src: caps = video/mpeg, width=(int)320,
height=(int)240, framerate=(fraction)30/1, mpegversion=(int)4,
systemstream=(boolean)false
/pipeline0/ffenc_mpeg40.sink: caps = video/x-raw-yuv,
format=(fourcc)I420, width=(int)320, height=(int)240,
framerate=(fraction)30/1
/pipeline0/rtpmp4vpay0.sink: caps = video/mpeg, width=(int)320,
height=(int)240, framerate=(fraction)30/1, mpegversion=(int)4,
systemstream=(boolean)false
/pipeline0/rtpmp4vpay0.src: caps = application/x-rtp,
media=(string)video, payload=(int)96, clock-rate=(int)90000,
encoding-name=(string)MP4V-ES, ssrc=(guint)3197754544,
clock-base=(guint)1459048008, seqnum-base=(guint)46431,
profile-level-id=(string)1,
config=(string)000001b001000001b58913000001000000012000c48d8800f6185020f0a21f000001b24c61766335312e392e30
/pipeline0/udpsink0.sink: caps = application/x-rtp, media=(string)video,
payload=(int)96, clock-rate=(int)90000, encoding-name=(string)MP4V-ES,
ssrc=(guint)3197754544, clock-base=(guint)1459048008,
seqnum-base=(guint)46431, profile-level-id=(string)1,
config=(string)000001b001000001b58913000001000000012000c48d8800f6185020f0a21f000001b24c61766335312e392e30
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

Now look at the caps set on /pipeline0/udpsink0.sink. These caps are
typically converted to an SDP message and send to the receiver when a
connection is made. We are not doing any session setup here, just
connecting to the raw RTP stream so we need another way of getting this
info to the receiver. We simply copy the caps over. 

Then on the receiver you do:

gst-launch udpsrc port=1234 caps="application/x-rtp,
media=(string)video, payload=(int)96, clock-rate=(int)90000,
encoding-name=(string)MP4V-ES, ssrc=(guint)3197754544,
clock-base=(guint)1459048008, seqnum-base=(guint)46431,
profile-level-id=(string)1,
config=(string)000001b001000001b58913000001000000012000c48d8800f6185020f0a21f000001b24c61766335312e392e30" ! rtpmp4vdepay ! ffdec_mpeg4 ! xvimagesink

This will then stream the video.

Notice how you need to inform the receiver of the required properties as
defined by RFC 3016 by using the same GstCaps as seen on the sender. 


> -----------------------
> Problem 2)
> Instead of using the videotestsrc, I am trying to use an existing
> MPEG-4 video elementary stream. Here I get a problem on the sender
> side itself. My command is:
> gst-launch filesrc location= test.m4v ! rtpmp4vpay !
> application/x-rtp,clock-rate=90000 ! udpsink port = 1234
> Setting pipeline to PAUSED ...
> Pipeline is PREROLLING ...
> ERROR: from element /pipeline0/rtpmp4vpay0: Element doesn't implement
> handling of this stream. Please file a bug.
> Additional debug info:
> gstbasertppayload.c(420): gst_basertppayload_push
> (): /pipeline0/rtpmp4vpay0:
> subclass did not specify clock_rate
> ERROR: pipeline doesn't want to preroll.
> Setting pipeline to NULL ...
> FREEING pipeline ...

I have no idea what that test.m4v is. We currently don't handle parsing
of arbitrary elementary mpeg4 video streams, though. For streaming of
MPEG4 video in an ISO container you would do the following:

gst-launch -v filesrc location=~/data/sincity.mp4 ! qtdemux !
rtpmp4vpay ! udpsink port = 1234

then grab the caps set on the udpsink and start the receiver with the
same caps as in the first example.

Hope this helps.

Wim

> 
> Can you please help me out?
> 
> Thanks,
> Deeptendu.
> -------------------------------------------------------------------------
> 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-devel at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
-- 
Wim Taymans <wim at fluendo.com>





More information about the gstreamer-devel mailing list