[gst-devel] MP4 file streaming over RTP

Irfan Shaikh irfanshaikh at tataelxsi.co.in
Mon May 31 07:34:08 CEST 2010


Hi farah  ! 

I am trying to stream an mp4 file (h264 encoded, no audio) over RTP. When I use the pipeline to play the streamed file at the receiver using xvimagesink, it plays fine. However, when I try to save the same stream to an .mp4 file, an error for lack of library support is given. The pipelines and output are given here:

-->> May be i gues since already you have demuxed the mp4 file, it is no longer in mp4 container file format. Streaming of mp4 files is generaaly supported if it has hint tracks.


-------------------------------------------------------------------------------------------------------------------------------------
Sender:
gst-launch-0.10 -v  filesrc location=Filename1.mp4 ! qtdemux ! rtpmp4vpay pt=96 ! udpsink host=127.0.0.1 port=42050 sync=false

-->> rtpmp4vpay is rtp packetizer for mpeg4 video. As you told you have h264 video stream, You cannot packetize with rtp mpeg4 paketizer.
 

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/pipeline0/rtpmp4vpay0.src: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP4V-ES, profile-level-id=(string)1, config=(string)000001b001000001b58913000001000000012000c48d885dad0a041e1463000001b24c61766335322e32302e30, payload=(int)96, ssrc=(guint)2296541465, clock-base=(guint)2758550644, seqnum-base=(guint)56968
/pipeline0/rtpmp4vpay0.sink: caps = video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, codec_data=(buffer)000001b001000001b58913000001000000012000c48d885dad0a041e1463000001b24c61766335322e32302e30, width=(int)320, height=(int)240, framerate=(fraction)2997/125
/pipeline0/udpsink0.sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP4V-ES, profile-level-id=(string)1, config=(string)000001b001000001b58913000001000000012000c48d885dad0a041e1463000001b24c61766335322e32302e30, payload=(int)96, ssrc=(guint)2296541465, clock-base=(guint)2758550644, seqnum-base=(guint)56968
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 8642131 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
/pipeline0/udpsink0.sink: caps = NULL
/pipeline0/rtpmp4vpay0.sink: caps = NULL
/pipeline0/rtpmp4vpay0.src: caps = NULL
/pipeline0/qtdemux0.audio_00: caps = NULL
/pipeline0/qtdemux0.video_00: caps = NULL
Setting pipeline to NULL ...
FREEING pipeline ...

Receiver:
gst-launch-0.10 -v  udpsrc port=42050 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP4V-ES, profile-level-id=(string)1, config=(string)000001b001000001b58913000001000000012000c48d885dad0a041e1463000001b24c61766335322e32302e30, payload=(int)96, ssrc=(guint)2271548884, clock-base=(guint)1988216335, seqnum-base=(guint)35136" ! rtpmp4vdepay ! ffdec_mpeg4 ! xvimagesinkmrplus at mhs:~/Desktop/June$ 1e1463000001b24c61766335322e32302e30, payload=(int)96mrplus at mhs:~/Desktop/June$ lock-base=(guint)1988216335, seqnum-base=(guint)35136mrplus at mhs:~/Desktop/June$ sudo gst-launch-0.10 -v  udpsrc port=42050 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP4V-ES, profile-level-id=(string)1, config=(string)000001b001000001b58913000001000000012000c48d885dad0a041e1463000001b24c61766335322e32302e30, payload=(int)96, ssrc=(guint)2271548884, clock-base=(guint)1988216335,
 seqnum-base=(guint)35136" ! rtpmp4vdepay ! ffmux_mp4 ! filesink location=test9.mp4
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/pipeline0/rtpmp4vdepay0.src: caps = video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, codec_data=(buffer)000001b001000001b58913000001000000012000c48d885dad0a041e1463000001b24c61766335322e32302e30
/pipeline0/rtpmp4vdepay0.sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP4V-ES, profile-level-id=(string)1, config=(string)000001b001000001b58913000001000000012000c48d885dad0a041e1463000001b24c61766335322e32302e30, payload=(int)96, ssrc=(guint)2271548884, clock-base=(guint)1988216335, seqnum-base=(guint)35136
/pipeline0/ffmux_mp40.video_0: caps = video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, codec_data=(buffer)000001b001000001b58913000001000000012000c48d885dad0a041e1463000001b24c61766335322e32302e30
ERROR: from element /pipeline0/ffmux_mp40: Could not configure supporting library.
Additional debug info:
gstffmpegmux.c(476): gst_ffmpegmux_collected (): /pipeline0/ffmux_mp40:
Failed to write file header - check codec settings
Execution ended after 12383494375 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
/pipeline0/ffmux_mp40.video_0: caps = NULL
/pipeline0/rtpmp4vdepay0.src: caps = NULL
/pipeline0/rtpmp4vdepay0.sink: caps = NULL
/pipeline0/udpsrc0.src: caps = NULL
Setting pipeline to NULL ...
FREEING pipeline ...
--------------------------------------------------------------------------------------------------------------------------------------------

I got a somewhat similar problem in a list here:
http://gstreamer-devel.966125.n4.nabble.com/Saving-a-live-stream-tc972117.html#a972117

and applied the same solution using capsfilters as suggested here. Then, the pipeline doesnt end and I dont get any errors but the output file is always 0 bytes (no data) and I have to Ctrl+C to end the pipeline.

Please help! 
Thanks.






gst-launch-0.10 -v  udpsrc port=42050 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP4V-ES, profile-level-id=(string)1, config=(string)000001b001000001b58913000001000000012000c48d885dad0a041e1463000001b24c61766335322e32302e30, payload=(int)96, ssrc=(guint)2271548884, clock-base=(guint)1988216335, seqnum-base=(guint)35136" ! rtpmp4vdepay ! capsfilter caps="video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, codec_data=(buffer)000001b001000001b58913000001000000012000c48d885dad0a041e1463000001b24c61766335322e32302e30, width=(int)320, height=(int)240, framerate=(fraction)2997/125" ! ffmux_mp4 ! filesink location=test9.mp4


      


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


More information about the gstreamer-devel mailing list