|
Hi, All.
Does the below wrong???????
client:
gst-launch -v gstrtpbin name=rtpbin latency=1000 \
uridecodebin uri=file:///home/xingmin/qianyuqianxun.rmvb name=decoder \
decoder. ! tee name=tee0 \
tee0. ! queue2 ! ffmpegcolorspace ! videoscale ! autovideosink \
tee0. ! queue2 ! ffmpegcolorspace ! x264enc ! rtph264pay pt=96 ! queue2 ! rtpbin.send_rtp_sink_0 \
rtpbin.send_rtp_src_0 ! queue2 ! udpsink host=211.64.20.87 port=5000 async=false \
rtpbin.send_rtcp_src_0 ! queue2 ! udpsink host=211.64.20.87 port=5001 \
udpsrc port=5005 ! queue2 ! rtpbin.recv_rtcp_sink_0 \
\
decoder. ! tee name=tee1 \
tee1. ! queue2 ! audioconvert ! autoaudiosink \
tee1. ! queue2 ! audioconvert ! vorbisenc ! oggmux ! filesink location=fff.ogg \
tee1. ! queue2 ! audioconvert ! vorbisenc ! rtpvorbispay pt=96 ! queue2 ! rtpbin.send_rtp_sink_1 \
rtpbin.send_rtp_src_1 ! queue2 ! udpsink host=211.64.20.87 port=5002 async=false \
rtpbin.send_rtcp_src_1 ! queue2 ! udpsink host=211.64.20.87 port=5003 \
udpsrc port=5007 ! queue2 ! rtpbin.recv_rtcp_sink_1
server:
gst-launch -v gstrtpbin name=rtpbin \
udpsrc caps="application/x-rtp,media=(string)video,payload=(int)96,clock-rate=(int)90000,encoding-name=(string)H264" \
port=5000 ! queue2 ! rtpbin.recv_rtp_sink_0 rtpbin. ! rtph264depay ! ffdec_h264 ! autovideosink \
udpsrc port=5001 ! queue2 ! rtpbin.recv_rtcp_sink_0 \
rtpbin.send_rtcp_src_0 ! queue2 ! udpsink port=5005 async=false \
\
udpsrc caps="application/x-rtp, media=(string)audio,payload=(int)96,clock-rate=(int)44100,encoding-name=(string)VORBIS" \
port=5002 ! queue2 ! rtpbin.recv_rtp_sink_1 rtpbin. ! rtpvorbisdepay ! vorbisdec ! audioconvert ! autoaudiosink \
udpsrc port=5003 ! queue2 ! rtpbin.recv_rtcp_sink_1 \
rtpbin.send_rtcp_src_1 ! queue2 ! udpsink port=5007 async=false
In the server end, if I don't receive the audio stream, I can receive the video stream and playback it normally. But, if I receive the audio at the same time, I can't get the audio and video. It said, vorbis stream can't be decode and could not switch codebooks. According to the gstrtpbin's sample, I replaced vorbis to amr, It works well.
Does the above client/server code have mistakes? I have searched the codebook error, and I copy the client's udpsink's caps to the server's caps, but it also can't work.
Thanks in advance.
|