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@mhs:~/Desktop/June$ 1e1463000001b24c61766335322e32302e30, payload=(int)96mrplus@mhs:~/Desktop/June$ lock-base=(guint)1988216335, seqnum-base=(guint)35136mrplus@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 ------------------------------------------------------------------------------ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Hi farah ! ------------------------------------------------------------------------------ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Thanks a lot Irfan, for the help. Ok, one correction: I was wrong about it being an h264 stream. I just checked and all this problem is coming with an mpeg-4 stream. Sorry, i got it wrong initially. >> May be i guess since already you have demuxed the mp4 file, it is no longer in mp4 container file format. Streaming of mp4 files is generally supported if it has hint tracks. ==> You're right. It's not in mp4 format when it's received but an mpeg4 stream but that's why we are using "ffmux_mp4" muxer in the pipeline before putting it in a file. Part of pipeline: "! rtpmp4vdepay ! ffmux_mp4 ! filesink location=test.mp4" Shouldnt that work? Is there something more I should do to put it in an mp4 file? Can you gimme a simple pipeline that takes an mpeg-4 stream to be stored as an .mp4 container? (And adds hint tracks to it? Shoudnt they still be there since it was already in an mp4 file from where we streamed it in the first place?) I thought a muxer in gstreamer would do that. I have used MP4Box to add hint tracks to h264 files and even used some other softwares to do the conversion from h264 file to mp4 file. These files play fine but I'm not able to do it using gstreamer. Also, >> rtpmp4vpay is rtp packetizer for mpeg4 video. As you told you have h264 video stream, You cannot >>packetize with rtp mpeg4 paketizer. As I said, I just checked that I'm wrong on that. It was an mpeg-4 stream all along! I did the same thing with an mpeg-4 stream AGAIN and the problem remains the same. Though, if the packetizer was the problem, should my stream PLAY fine? Coz it does play fine using the same encoder and decoder and rtp payloaders. Caps given to the receiver are those generated by the sender. I think it is in these caps that the receiver finds the stream information (MP4V-ES). So, I dont think the packetizer is the problem with the file being saved. Let me copy the sender and receiver pipelines here. This is the case where they PLAY fine. I only replace the last part of the receiver : "! rtpmp4vdepay ! ffdec_mpeg4 ! xvimagesink" with "! rtpmp4vdepay ! ffmux_mp4 ! filesink location=test.mp4" and that way, it doesnt work. The file is empty, 0 bytes and I have to press Ctrl+c to terminate the receiver. The sender exits having received EOS from its own side. Sender: gst-launch-0.10 -v filesrc location=Filename1.mp4 ! qtdemux ! rtpmp4vpay pt=96 ! udpsink host=127.0.0.1 port=42040 sync=false Receiver: gst-launch-0.10 -v udpsrc port=42040 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)444569327, clock-base=(guint)144078977, seqnum-base=(guint)4650" ! rtpmp4vdepay ! ffdec_mpeg4 ! xvimagesink |
In reply to this post by Farah
On Sun, May 30, 2010 at 9:15 AM, Farah Akhtar <[hidden email]> wrote:
> > 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: I have no idea if this is your only problem - but do not use ffmux_mp4 for any purpose, ever. The ffmpeg muxers in general are poor quality. You should use mp4mux (from gst-plugins-bad) instead. Mike ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |