How to transcode RTP stream
keiichiro kawasaki
yassanet at gmail.com
Thu Mar 28 04:11:32 PDT 2013
Hi, all
I tried transcoding from H264 RTP stream to MP4V-ES RTP stream, or reverse.
first, recode as MP4V-ES incoming RTP of H264 stream in avi file.
it's fine.
gst-launch-1.0 -vvv rtpbin name=rtpbin \
udpsrc caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264,payload=(int)109"
port=5000 ! \
rtpbin.recv_rtp_sink_0 rtpbin. ! rtph264depay ! avdec_h264 !
queue ! videorate ! videoconvert ! \
"video/x-raw,format=(string)I420,framerate=15/1" ! \
avenc_mpeg4 ! avimux ! filesink location=/tmp/testMP4VES.avi
next, output as MP4V-ES RTP stream incoming H264 RTP stream.
it' not work.
gst-launch-1.0 -vvv rtpbin name=rtpbin \
udpsrc caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264,payload=(int)109"
port=5000 ! \
rtpbin.recv_rtp_sink_0 rtpbin. ! rtph264depay ! avdec_h264 !
queue ! videorate ! videoconvert ! \
"video/x-raw,format=(string)I420,framerate=15/1" ! \
avenc_mpeg4 bitrate=2000 ! rtpmp4vpay ! rtpbin.send_rtp_sink_0
rtpbin.send_rtp_src_0 ! udpsink port=5002 host=192.168.1.1 sync=true
async=true name=vrtcpsink
------- log
Setting pipeline to PAUSED ...
(gst-launch-1.0:2741): GStreamer-WARNING **: loop detected in the
graph of bin 'pipeline0'!!
(gst-launch-1.0:2741): GStreamer-WARNING **: loop detected in the
graph of bin 'pipeline0'!!
Pipeline is live and does not need PREROLL ...
/GstPipeline:pipeline0/GstUDPSrc:udpsrc0.GstPad:src: caps =
application/x-rtp, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)H264, payload=(int)109
/GstPipeline:pipeline0/GstRtpBin:rtpbin.GstGhostPad:recv_rtp_sink_0.GstProxyPad:proxypad0:
caps = application/x-rtp, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)H264, payload=(int)109
/GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpSession:rtpsession0.GstPad:recv_rtp_src:
caps = application/x-rtp, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)H264, payload=(int)109
/GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpSsrcDemux:rtpssrcdemux0.GstPad:sink:
caps = application/x-rtp, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)H264, payload=(int)109
/GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpSession:rtpsession0.GstPad:recv_rtp_sink:
caps = application/x-rtp, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)H264, payload=(int)109
/GstPipeline:pipeline0/GstRtpBin:rtpbin.GstGhostPad:recv_rtp_sink_0:
caps = application/x-rtp, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)H264, payload=(int)109
Setting pipeline to PLAYING ...
(gst-launch-1.0:2741): GStreamer-WARNING **: loop detected in the
graph of bin 'pipeline0'!!
New clock: GstSystemClock
/GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpJitterBuffer:rtpjitterbuffer0.GstPad:src:
caps = application/x-rtp, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)H264, payload=(int)109
/GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpPtDemux:rtpptdemux0.GstPad:sink:
caps = application/x-rtp, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)H264, payload=(int)109
/GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpJitterBuffer:rtpjitterbuffer0.GstPad:sink:
caps = application/x-rtp, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)H264, payload=(int)109
/GstPipeline:pipeline0/GstUDPSrc:udpsrc0.GstPad:src: caps =
application/x-rtp, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)H264, payload=(int)109
/GstPipeline:pipeline0/GstRtpBin:rtpbin.GstGhostPad:recv_rtp_sink_0.GstProxyPad:proxypad0:
caps = application/x-rtp, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)H264, payload=(int)109
/GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpSession:rtpsession0.GstPad:recv_rtp_src:
caps = application/x-rtp, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)H264, payload=(int)109
/GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpSsrcDemux:rtpssrcdemux0.GstPad:src_9207125:
caps = application/x-rtp, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)H264, payload=(int)109, ssrc=(uint)9207125
/GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpJitterBuffer:rtpjitterbuffer0.GstPad:src:
caps = application/x-rtp, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)H264, payload=(int)109, ssrc=(uint)9207125
/GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpPtDemux:rtpptdemux0.GstPad:sink:
caps = application/x-rtp, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)H264, payload=(int)109, ssrc=(uint)9207125
/GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpJitterBuffer:rtpjitterbuffer0.GstPad:sink:
caps = application/x-rtp, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)H264, payload=(int)109, ssrc=(uint)9207125
/GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpSsrcDemux:rtpssrcdemux0.GstPad:sink:
caps = application/x-rtp, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)H264, payload=(int)109
/GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpSession:rtpsession0.GstPad:recv_rtp_sink:
caps = application/x-rtp, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)H264, payload=(int)109
/GstPipeline:pipeline0/GstRtpBin:rtpbin.GstGhostPad:recv_rtp_sink_0:
caps = application/x-rtp, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)H264, payload=(int)109
/GstPipeline:pipeline0/GstRtpBin:rtpbin.GstGhostPad:recv_rtp_src_0_9207125_109:
caps = application/x-rtp, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)H264, payload=(int)109, ssrc=(uint)9207125
/GstPipeline:pipeline0/GstRtpBin:rtpbin.GstGhostPad:recv_rtp_src_0_9207125_109.GstProxyPad:proxypad3:
caps = application/x-rtp, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)H264, payload=(int)109, ssrc=(uint)9207125
ERROR: from element /GstPipeline:pipeline0/GstUDPSrc:udpsrc0: Internal
data flow error.
Additional debug info:
gstbasesrc.c(2791): gst_base_src_loop ():
/GstPipeline:pipeline0/GstUDPSrc:udpsrc0:
streaming task paused, reason not-linked (-1)
Execution ended after 4990454798 ns.
Setting pipeline to PAUSED ...
(gst-launch-1.0:2741): GStreamer-WARNING **: loop detected in the
graph of bin 'pipeline0'!!
Setting pipeline to READY ...
(gst-launch-1.0:2741): GStreamer-WARNING **: loop detected in the
graph of bin 'pipeline0'!!
Setting pipeline to NULL ...
(gst-launch-1.0:2741): GStreamer-WARNING **: loop detected in the
graph of bin 'pipeline0'!!
Freeing pipeline ...
-----
I used
Fedora 18 x86_64
gstreamer1-plugins-ugly-devel-docs-1.0.5-1.fc18.noarch
gstreamer1-plugins-good-1.0.5-3.fc18.x86_64
gstreamer1-1.0.5-1.fc18.x86_64
gstreamer1-libav-1.0.5-2.fc18.x86_64
gstreamer1-plugins-ugly-1.0.5-1.fc18.x86_64
gstreamer1-plugins-base-1.0.5-3.fc18.x86_64
gstreamer1-plugins-good-extras-1.0.5-3.fc18.x86_64
gstreamer1-plugins-bad-free-1.0.5-1.fc18.x86_64
Could you tell me right pipeline, or other way?
Thank you for reading
--
Keiichiro Kawasaki
More information about the gstreamer-devel
mailing list