[gst-devel] MP4 file streaming over RTP

Farah Akhtar farahakhtar_24c at yahoo.com
Sun May 30 18:15:16 CEST 2010


Hi,

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:

-------------------------------------------------------------------------------------------------------------------------------------
Sender:
gst-launch-0.10 -v  filesrc location=Filename1.mp4 ! qtdemux ! rtpmp4vpay pt=96 ! udpsink host=127.0.0.1 port=42050 sync=false
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/20100530/8669d426/attachment.htm>


More information about the gstreamer-devel mailing list