RTP to RTMP conversion.

Withnell, Richard (withnell) r.withnell at lancaster.ac.uk
Fri Nov 22 10:43:24 PST 2013


I'm trying to convert an incoming RTP stream into RTMP but I only seem to be getting audio through in the flash player (JWPlayer).

I can't see any errors coming from the gstreamer output but if anyone has any pointers as to how to get this to work, it would be greatly appreciated. I've successfully used the rtmpsink without the RTP conversion, so I'm assuming I must be missing some information somewhere. 

Playing out the content directly from the RTP stream using xvimagesink and alsasink  is working perfectly. 

The pipeline to create the live RTP stream;

gst-launch -vvv gstrtpbin name=rtpbin \
        v4l2src device=/dev/video0 do-timestamp=true  ! "video/x-raw-rgb, width=(int)640, height=(int)480, framerate=(fraction)30/1" ! videoscale ! videorate !  ffmpegcolorspace ! x264enc ! rtph264pay ! rtpbin.send_rtp_sink_0 \
                  rtpbin.send_rtp_src_0 ! udpsink port=5000                            \
                  rtpbin.send_rtcp_src_0 ! udpsink port=5001 sync=false async=false    \
                  udpsrc port=5005 ! rtpbin.recv_rtcp_sink_0                           \
        audiotestsrc is-live=true freq=50 wave=7  ! queue ! audioconvert ! audiorate ! rtpL16pay ! rtpbin.send_rtp_sink_1                   \
                  rtpbin.send_rtp_src_1 ! udpsink port=5002                            \
                  rtpbin.send_rtcp_src_1 ! udpsink port=5003 sync=false async=false    \
                  udpsrc port=5007 ! rtpbin.recv_rtcp_sink_1

The conversion pipeline is as follows;

gst-launch -vvv gstrtpbin name=rtpbin               \
    flvmux name=mux streamable=true ! rtmpsink sync=false location=rtmp://194.80.39.66:1935/live/device                         \
    udpsrc do-timestamp=true caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" \
            port=5000 ! rtpbin.recv_rtp_sink_0                                \
        rtpbin. ! rtph264depay ! queue ! h264parse ! mux.                    \
     udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0                               \
     rtpbin.send_rtcp_src_0 ! udpsink port=5005 sync=false async=false        \
    udpsrc do-timestamp=true caps="application/x-rtp, media=(string)audio, clock-rate=(int)44100, encoding-name=(string)L16, encoding-params=(string)1, channels=(int)1, payload=(int)96" \
            port=5002 ! rtpbin.recv_rtp_sink_1                                \
        rtpbin. ! rtpL16depay ! queue ! audioconvert ! audiorate ! audioresample ! mux.                        \
     udpsrc port=5003 ! rtpbin.recv_rtcp_sink_1                               \
     rtpbin.send_rtcp_src_1 ! udpsink port=5007 sync=false async=false


Thanks in advance,

Richard


More information about the gstreamer-devel mailing list