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

dxssx dxssx.dxssx at gmail.com
Thu Nov 5 13:57:55 CET 2009


I use gst-rtsp-server to stream a mp4 file.

pipeline:
filesrc location=x.mp4 ! qtdemux name=demux demux.audio_00 ! queue !
rtpmp4apay pt=96 name=pay0 demux.vid
eo_00 ! queue ! rtph264pay pt=96 name=pay1

Now, I want to record it to a mp4 in another machine, the following pipeline
doesn't work.
rtspsrc location=rtsp://192.168.1.1:8554/test name=s ! rtph264depay ! queue
! mux. s. ! rtpmp4adepay ! queue ! mux. qtmux name=mux ! filesink
location=x.mp4

I got 0bytes of x.mp4.

LOG:
0:00:00.147911273 22396  0x804e078 LOG                    qtmux
gstqtmux.c:2116:gst_qt_mux_register: Registering muxers
0:00:00.148565619 22396  0x804e078 LOG                    qtmux
gstqtmux.c:2145:gst_qt_mux_register: Finished registering muxers
0:00:00.151868676 22396  0x804e078 DEBUG                  qtmux
gstqtmux.c:1924:gst_qt_mux_request_new_pad:<mux> Requested pad: (NULL)
0:00:00.152305290 22396  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:udpsrc0: timeout = 5000000
/GstPipeline:pipeline0/GstRTSPSrc:s/GstUDPSrc:udpsrc2: 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 = 3466414130560463000
/GstPipeline:pipeline0/GstRTSPSrc:s/GstRtpBin:rtpbin0/GstRtpSession:rtpsession0:
ntp-ns-base = 3466414130560463000
/GstPipeline:pipeline0/GstRTSPSrc:s/GstUDPSrc:udpsrc0: timeout = 0
/GstPipeline:pipeline0/GstRTSPSrc:s/GstUDPSrc:udpsrc2: timeout = 0
New clock: GstSystemClock
/GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0.GstPad:src: caps =
video/x-h264
/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)3796410317, seqnum-base=(guint)2802, 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_2322064246_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)3796410317, seqnum-base=(guint)2802, 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_2322064246_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)3796410317, seqnum-base=(guint)2802, 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_2322064246_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)3796410317, seqnum-base=(guint)2802, npt-start=(guint64)0,
npt-stop=(guint64)176309005737, play-speed=(double)1, play-scale=(double)1
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-h264
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = video/x-h264
0:00:01.074393625 22396  0x809dfd8 DEBUG                  qtmux
gstqtmux.c:1686:gst_qt_mux_video_sink_set_caps:<mux> mux:pad0,
caps=video/x-h264
0:00:01.092811020 22396  0x809dfd8 WARN                   qtmux
gstqtmux.c:1862:gst_qt_mux_video_sink_set_caps:<mux> pad pad0 refused caps
video/x-h264
/GstPipeline:pipeline0/GstRtpMP4ADepay:rtpmp4adepay0.GstPad:src: caps =
audio/mpeg, mpegversion=(int)4, framed=(boolean)true, channels=(int)2,
codec_data=(buffer)1210
/GstPipeline:pipeline0/GstRtpMP4ADepay:rtpmp4adepay0.GstPad:sink: caps =
application/x-rtp, media=(string)audio, payload=(int)96,
clock-rate=(int)44100, encoding-name=(string)MP4A-LATM,
profile-level-id=(string)2, cpresent=(string)0, config=(string)40002420,
a-tool=(string)GStreamer, a-type=(string)broadcast,
clock-base=(guint)1618789542, seqnum-base=(guint)16943,
npt-start=(guint64)0, npt-stop=(guint64)176309005737, play-speed=(double)1,
play-scale=(double)1
/GstPipeline:pipeline0/GstRTSPSrc:s.GstGhostPad:recv_rtp_src_0_4271355660_96:
caps = application/x-rtp, media=(string)audio, payload=(int)96,
clock-rate=(int)44100, encoding-name=(string)MP4A-LATM,
profile-level-id=(string)2, cpresent=(string)0, config=(string)40002420,
a-tool=(string)GStreamer, a-type=(string)broadcast,
clock-base=(guint)1618789542, seqnum-base=(guint)16943,
npt-start=(guint64)0, npt-stop=(guint64)176309005737, play-speed=(double)1,
play-scale=(double)1
/GstPipeline:pipeline0/GstRTSPSrc:s.GstGhostPad:recv_rtp_src_0_4271355660_96.GstProxyPad:proxypad9:
caps = application/x-rtp, media=(string)audio, payload=(int)96,
clock-rate=(int)44100, encoding-name=(string)MP4A-LATM,
profile-level-id=(string)2, cpresent=(string)0, config=(string)40002420,
a-tool=(string)GStreamer, a-type=(string)broadcast,
clock-base=(guint)1618789542, seqnum-base=(guint)16943,
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_0_4271355660_96.GstProxyPad:proxypad8:
caps = application/x-rtp, media=(string)audio, payload=(int)96,
clock-rate=(int)44100, encoding-name=(string)MP4A-LATM,
profile-level-id=(string)2, cpresent=(string)0, config=(string)40002420,
a-tool=(string)GStreamer, a-type=(string)broadcast,
clock-base=(guint)1618789542, seqnum-base=(guint)16943,
npt-start=(guint64)0, npt-stop=(guint64)176309005737, play-speed=(double)1,
play-scale=(double)1
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = audio/mpeg,
mpegversion=(int)4, framed=(boolean)true, channels=(int)2,
codec_data=(buffer)1210
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:src: caps = audio/mpeg,
mpegversion=(int)4, framed=(boolean)true, channels=(int)2,
codec_data=(buffer)1210
0:00:01.273315038 22396  0x80baf78 DEBUG                  qtmux
gstqtmux.c:1455:gst_qt_mux_audio_sink_set_caps:<mux> mux:pad1,
caps=audio/mpeg, mpegversion=(int)4, framed=(boolean)true, channels=(int)2,
codec_data=(buffer)1210
0:00:01.273362133 22396  0x80baf78 WARN                   qtmux
gstqtmux.c:1631:gst_qt_mux_audio_sink_set_caps:<mux> pad pad1 refused caps
audio/mpeg, mpegversion=(int)4, framed=(boolean)true, channels=(int)2,
codec_data=(buffer)1210
/GstPipeline:pipeline0/GstRTSPSrc:s/GstRtpBin:rtpbin0/GstRtpSession:rtpsession1.GstPad:sync_src:
caps = application/x-rtcp
/GstPipeline:pipeline0/GstRTSPSrc:s/GstRtpBin:rtpbin0/GstRtpSsrcDemux:rtpssrcdemux1.GstPad:rtcp_sink:
caps = application/x-rtcp
/GstPipeline:pipeline0/GstRTSPSrc:s/GstRtpBin:rtpbin0/GstRtpSsrcDemux:rtpssrcdemux1.GstPad:rtcp_src_-1972903050:
caps = application/x-rtcp
/GstPipeline:pipeline0/GstRTSPSrc:s/GstRtpBin:rtpbin0/GstRtpJitterBuffer:rtpjitterbuffer0.GstPad:sink_rtcp:
caps = application/x-rtcp
/GstPipeline:pipeline0/GstRTSPSrc:s/GstRtpBin:rtpbin0.GstGhostPad:send_rtcp_src_0:
caps = application/x-rtcp
/GstPipeline:pipeline0/GstRTSPSrc:s/GstRtpBin:rtpbin0/GstRtpSession:rtpsession0.GstPad:send_rtcp_src:
caps = application/x-rtcp
/GstPipeline:pipeline0/GstRTSPSrc:s/GstUDPSink:udpsink1.GstPad:sink: caps =
application/x-rtcp
/GstPipeline:pipeline0/GstRTSPSrc:s/GstRtpBin:rtpbin0.GstGhostPad:send_rtcp_src_0.GstProxyPad:proxypad2:
caps = application/x-rtcp
/GstPipeline:pipeline0/GstRTSPSrc:s/GstRtpBin:rtpbin0/GstRtpSession:rtpsession0.GstPad:sync_src:
caps = application/x-rtcp
/GstPipeline:pipeline0/GstRTSPSrc:s/GstRtpBin:rtpbin0/GstRtpSsrcDemux:rtpssrcdemux0.GstPad:rtcp_sink:
caps = application/x-rtcp
/GstPipeline:pipeline0/GstRTSPSrc:s/GstRtpBin:rtpbin0/GstRtpSsrcDemux:rtpssrcdemux0.GstPad:rtcp_src_-23611636:
caps = application/x-rtcp
/GstPipeline:pipeline0/GstRTSPSrc:s/GstRtpBin:rtpbin0/GstRtpJitterBuffer:rtpjitterbuffer1.GstPad:sink_rtcp:
caps = application/x-rtcp
/GstPipeline:pipeline0/GstRTSPSrc:s/GstRtpBin:rtpbin0.GstGhostPad:send_rtcp_src_1:
caps = application/x-rtcp
/GstPipeline:pipeline0/GstRTSPSrc:s/GstRtpBin:rtpbin0/GstRtpSession:rtpsession1.GstPad:send_rtcp_src:
caps = application/x-rtcp
/GstPipeline:pipeline0/GstRTSPSrc:s/GstUDPSink:udpsink3.GstPad:sink: caps =
application/x-rtcp
/GstPipeline:pipeline0/GstRTSPSrc:s/GstRtpBin:rtpbin0.GstGhostPad:send_rtcp_src_1.GstProxyPad:proxypad5:
caps = application/x-rtcp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20091105/884df8f7/attachment.htm>


More information about the gstreamer-devel mailing list