pipeline to transcode live stream and restream it
Florian Iragne
florian.iragne at viewsurf.com
Wed Jun 15 08:02:58 PDT 2011
Hi,
i'm struggling with a pipeline that takes an rtsp stream as input
(H264+AAC), transcode it into a lower resolution/bitrate for video, and,
if possible, pass the audio stream "as is".
currently, the best shot i have is the following pipeline :
gstrtpbin name=rtpbin uridecodebin
uri="rtsp://10.0.100.3:1935/rtplive/test.stream" name=decode
decode. ! queue ! ffdec_h264 ! ffmpegcolorspace ! videoscale ! queue !
capsfilter
caps="video/x-raw-yuv,width=800,height=450,framerate=(fraction)25/1" !
coglogoinsert location="/root/vs800.png" ! x264enc threads=0 bitrate=300
byte-stream=true ! queue ! rtph264pay pt=97 ! rtpbin.send_rtp_sink_0
rtpbin.send_rtp_src_0 ! queue ! udpsink host=10.0.100.3 port=5020
ts-offset=0
rtpbin.send_rtcp_src_0 ! udpsink host=10.0.100.3 port=5021 sync=false
async=false udpsrc port=5025 ! rtpbin.recv_rtcp_sink_0
decode. ! audioconvert ! audioresample ! faac ! rtpmp4apay pt=96 !
rtpbin.send_rtp_sink_1
rtpbin.send_rtp_src_1 ! queue ! udpsink host=10.0.100.3 port=5022
ts-offset=0
rtpbin.send_rtcp_src_1 ! udpsink host=10.0.100.3 port=5023 sync=false
async=false udpsrc port=5027 ! rtpbin.recv_rtcp_sink_1
As you can see, here i reencode the aac audio input into aac audio output.
If i run the same pipeline without audio, it works
on the receiving side, i have a wowza server, with the following sdp file
v=0
o=- 1208520720 2590316915 IN IP4 0.0.0.0
s=MY FIRST PIPELINE
i=N/A
t=0 0
m=video 5020 RTP/AVP 97
c=IN IP4 0.0.0.0
a=rtpmap:97 H264/90000
m=audio 5022 RTP/AVP 96
a=rtpmap:96 MP4A-LATM/16000
Do you see anything that i did wrong? From the debug messages, the only
thing that seems weird is that i don't see the video encoding part of
the pipeline starting to work, whereas i see the audio encoding part
working.
Thanks for any advice
Florian
More information about the gstreamer-devel
mailing list