How to store videos received by rtp/udp?

Diego Silva dpsilvaengcomp at gmail.com
Tue Apr 10 10:05:59 PDT 2012


The commands I use are below.
When i use 'xvimagesink' instead of 'filesink location=filesink
location=received.yuv' in the client. The video has a poor quality and when
i run 'ffmpeg -s received.yuv received.mp4' the mp4 has a quality even
worse.
I am using the loopback interface (127.0.0.1).

What i need to change in this commands to store the received (rtp/udp)
videos?

Server:

#!/bin/bash

DEST=127.0.0.1

gst-launch -v gstrtpbin name=rtpbin \
filesrc location=filesrc location=sample-480p.mp4 ! decodebin name=dec \
dec. ! queue ! x264enc tune=zerolatency byte-stream=true ! rtph264pay !
rtpbin.send_rtp_sink_0 \
rtpbin.send_rtp_src_0 ! udpsink port=5000 host=$DEST ts-offset=0
name=vrtpsink \
rtpbin.send_rtcp_src_0 ! udpsink port=5001 host=$DEST sync=false
async=false name=vrtcpsink \
udpsrc port=5005 name=vrtpsrc ! rtpbin.recv_rtcp_sink_0 \
dec. ! queue ! audioresample ! audioconvert ! alawenc ! rtppcmapay !
rtpbin.send_rtp_sink_1 \
rtpbin.send_rtp_src_1 ! udpsink port=5002 host=$DEST ts-offset=0
name=artpsink \
rtpbin.send_rtcp_src_1 ! udpsink port=5003 host=$DEST sync=false
async=false name=artcpsink \
udpsrc port=5007 name=artpsrc ! rtpbin.recv_rtcp_sink_1

_________________________

Client:

#!/bin/bash

DEST=127.0.0.1

gst-launch -v gstrtpbin name=rtpbin latency=0 \
udpsrc
caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264"
port=5000 ! rtpbin.recv_rtp_sink_0 \
rtpbin. ! rtph264depay ! decodebin ! filesink location=filesink
location=received.yuv \
udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0 \
rtpbin.send_rtcp_src_0 ! udpsink port=5005 host=$DEST sync=false
async=false \
udpsrc
caps="application/x-rtp,media=(string)audio,clock-rate=(int)8000,encoding-name=(string)PCMA"
port=5002 ! rtpbin.recv_rtp_sink_1 \
rtpbin. ! rtppcmadepay ! decodebin ! audioconvert ! audioresample !
alsasink \
udpsrc port=5003 ! rtpbin.recv_rtcp_sink_1 \
rtpbin.send_rtcp_src_1 ! udpsink port=5007 host=$DEST sync=false async=false
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20120410/6d5b7e82/attachment.htm>


More information about the gstreamer-devel mailing list