[gst-devel] How to write a pipeline to record to mp4 from a rtspsrc?

dxssx dxssx.dxssx at gmail.com
Fri Nov 6 02:32:30 CET 2009


Thanks Florian, I tried to mux only h264 as what you say:
rtspsrc location=rtsp://192.168.1.1:8554/test name=s ! rtph264depay
byte-stream=false ! capsfilter caps="video/x-h264,width=1280, height=720,
framerate=(fraction)30/1" ! queue ! mux. qtmux name=mux ! filesink
location=x.mp4

But it didn't work. Is this a bug of qtmux since you said it works for
ffmux_mp4.

0:00:00.016190484  7051  0x804e078 LOG                    qtmux
gstqtmux.c:2116:gst_qt_mux_register: Registering muxers
0:00:00.016696178  7051  0x804e078 LOG                    qtmux
gstqtmux.c:2145:gst_qt_mux_register: Finished registering muxers
0:00:00.019714795  7051  0x804e078 DEBUG                  qtmux
gstqtmux.c:1924:gst_qt_mux_request_new_pad:<mux> Requested pad: (NULL)
Setting pipeline to PAUSED ...
/GstPipeline:pipeline0/GstRTSPSrc:s/GstRtpBin:rtpbin0: latency = 3000
/GstPipeline:pipeline0/GstRTSPSrc:s/GstUDPSrc:udpsrc1: timeout = 5000000
/GstPipeline:pipeline0/GstRTSPSrc:s/GstUDPSrc:udpsrc4: timeout = 5000000
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
/GstPipeline:pipeline0/GstRTSPSrc:s/GstRtpBin:rtpbin0/GstRtpSession:rtpsession1:
ntp-ns-base = 3466459682817417000
/GstPipeline:pipeline0/GstRTSPSrc:s/GstRtpBin:rtpbin0/GstRtpSession:rtpsession0:
ntp-ns-base = 3466459682817417000
/GstPipeline:pipeline0/GstRTSPSrc:s/GstUDPSrc:udpsrc1: timeout = 0
/GstPipeline:pipeline0/GstRTSPSrc:s/GstUDPSrc:udpsrc4: timeout = 0
New clock: GstSystemClock
/GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0.GstPad:src: caps =
video/x-h264,
codec_data=(buffer)01640028ffe1000b67640028ac1918805005b901000468ee3cb0
/GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0.GstPad:sink: caps =
application/x-rtp, media=(string)video, payload=(int)96,
clock-rate=(int)90000, encoding-name=(string)H264,
profile-level-id=(string)640028,
sprop-parameter-sets=(string)\"Z2QAKKwZGIBQBbk\\=\\,aO48sA\\=\\=\",
a-tool=(string)GStreamer, a-type=(string)broadcast,
clock-base=(guint)4039834199, seqnum-base=(guint)57747,
npt-start=(guint64)0, npt-stop=(guint64)176309005737, play-speed=(double)1,
play-scale=(double)1
/GstPipeline:pipeline0/GstRTSPSrc:s.GstGhostPad:recv_rtp_src_1_2807690748_96:
caps = application/x-rtp, media=(string)video, payload=(int)96,
clock-rate=(int)90000, encoding-name=(string)H264,
profile-level-id=(string)640028,
sprop-parameter-sets=(string)\"Z2QAKKwZGIBQBbk\\=\\,aO48sA\\=\\=\",
a-tool=(string)GStreamer, a-type=(string)broadcast,
clock-base=(guint)4039834199, seqnum-base=(guint)57747,
npt-start=(guint64)0, npt-stop=(guint64)176309005737, play-speed=(double)1,
play-scale=(double)1
/GstPipeline:pipeline0/GstRTSPSrc:s.GstGhostPad:recv_rtp_src_1_2807690748_96.GstProxyPad:proxypad7:
caps = application/x-rtp, media=(string)video, payload=(int)96,
clock-rate=(int)90000, encoding-name=(string)H264,
profile-level-id=(string)640028,
sprop-parameter-sets=(string)\"Z2QAKKwZGIBQBbk\\=\\,aO48sA\\=\\=\",
a-tool=(string)GStreamer, a-type=(string)broadcast,
clock-base=(guint)4039834199, seqnum-base=(guint)57747,
npt-start=(guint64)0, npt-stop=(guint64)176309005737, play-speed=(double)1,
play-scale=(double)1
/GstPipeline:pipeline0/GstRTSPSrc:s/GstRtpBin:rtpbin0.GstGhostPad:recv_rtp_src_1_2807690748_96.GstProxyPad:proxypad6:
caps = application/x-rtp, media=(string)video, payload=(int)96,
clock-rate=(int)90000, encoding-name=(string)H264,
profile-level-id=(string)640028,
sprop-parameter-sets=(string)\"Z2QAKKwZGIBQBbk\\=\\,aO48sA\\=\\=\",
a-tool=(string)GStreamer, a-type=(string)broadcast,
clock-base=(guint)4039834199, seqnum-base=(guint)57747,
npt-start=(guint64)0, npt-stop=(guint64)176309005737, play-speed=(double)1,
play-scale=(double)1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps =
video/x-h264,
codec_data=(buffer)01640028ffe1000b67640028ac1918805005b901000468ee3cb0,
width=(int)1280, height=(int)720, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps =
video/x-h264,
codec_data=(buffer)01640028ffe1000b67640028ac1918805005b901000468ee3cb0
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-h264,
codec_data=(buffer)01640028ffe1000b67640028ac1918805005b901000468ee3cb0,
width=(int)1280, height=(int)720, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = video/x-h264,
codec_data=(buffer)01640028ffe1000b67640028ac1918805005b901000468ee3cb0,
width=(int)1280, height=(int)720, framerate=(fraction)30/1
0:00:00.068833031  7051  0x80b5018 DEBUG                  qtmux
gstqtmux.c:1686:gst_qt_mux_video_sink_set_caps:<mux> mux:pad0,
caps=video/x-h264,
codec_data=(buffer)01640028ffe1000b67640028ac1918805005b901000468ee3cb0,
width=(int)1280, height=(int)720, framerate=(fraction)30/1
0:00:00.068907314  7051  0x80b5018 DEBUG                  qtmux
gstqtmux.c:1720:gst_qt_mux_video_sink_set_caps:<mux> Rate of video track
selected: 3000
/GstPipeline:pipeline0/GstQTMux:mux.GstPad:pad0: caps = video/x-h264,
codec_data=(buffer)01640028ffe1000b67640028ac1918805005b901000468ee3cb0,
width=(int)1280, height=(int)720, framerate=(fraction)30/1
0:00:00.069019065  7051  0x80b5018 DEBUG                  qtmux
gstqtmux.c:1140:gst_qt_mux_start_file:<mux> starting file
0:00:00.069060505  7051  0x80b5018 DEBUG                  qtmux
gstqtmux.c:1110:gst_qt_mux_send_ftyp:<mux> Sending ftyp atom
0:00:00.069090323  7051  0x80b5018 LOG                    qtmux
gstqtmux.c:1119:gst_qt_mux_send_ftyp:<mux> Pushing ftyp
0:00:00.069109441  7051  0x80b5018 LOG                    qtmux
gstqtmux.c:802:gst_qt_mux_send_buffer:<mux> sending buffer size 20
0:00:00.069125781  7051  0x80b5018 LOG                    qtmux
gstqtmux.c:815:gst_qt_mux_send_buffer:<mux> downstream
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps =
video/quicktime, variant=(string)apple
0:00:00.070485105  7051  0x80b5018 DEBUG                  qtmux
gstqtmux.c:920:gst_qt_mux_send_mdat_header:<mux> Sending mdat's atom header,
size 0
0:00:00.070578336  7051  0x80b5018 LOG                    qtmux
gstqtmux.c:944:gst_qt_mux_send_mdat_header:<mux> Pushing mdat start
0:00:00.070641742  7051  0x80b5018 LOG                    qtmux
gstqtmux.c:802:gst_qt_mux_send_buffer:<mux> sending buffer size 16
0:00:00.070703335  7051  0x80b5018 LOG                    qtmux
gstqtmux.c:815:gst_qt_mux_send_buffer:<mux> downstream
0:00:00.070776685  7051  0x80b5018 LOG                    qtmux
gstqtmux.c:1415:gst_qt_mux_collected:<mux> selected pad pad0 with time
0:00:00.003299172
0:00:00.070846558  7051  0x80b5018 LOG                    qtmux
gstqtmux.c:1217:gst_qt_mux_add_buffer:<mux> Pad pad0 has no previous buffer
stored, storing now
0:00:00.070925679  7051  0x80b5018 LOG                    qtmux
gstqtmux.c:1415:gst_qt_mux_collected:<mux> selected pad pad0 with time
0:00:00.003299172
0:00:00.071011560  7051  0x80b5018 WARN                   qtmux
gstqtmux.c:1347:gst_qt_mux_add_buffer:<mux> error: Failed to determine time
to mux.
ERROR: from element /GstPipeline:pipeline0/GstQTMux:mux: Could not multiplex
stream.
Additional debug info:
gstqtmux.c(1347): gst_qt_mux_add_buffer ():
/GstPipeline:pipeline0/GstQTMux:mux:
Failed to determine time to mux.
Execution ended after 6209475 ns.
Setting pipeline to PAUSED ...

2009/11/5 florian iragne <florian.iragne at viewsurf.com>

> dxssx a écrit :
> > gstqtmux.c:1862:gst_qt_mux_video_sink_set_caps:<mux> pad pad0 refused
> > caps video/x-h264
>
> according to your log h264 and audio pads are refusing default caps
>
> i would add something like :
>
> rtph264depay byte-stream=false ! capsfilter
> caps="video/x-h264,width=XXX,height=YYY,framerate=(fraction)YouFrameRate/1"
>
> at least, i've had to add this to record h264 from rtspsrc with ffmux_mp4
>
> Florian
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20091106/7b9b2283/attachment.htm>


More information about the gstreamer-devel mailing list