Gstreamer 1.0 (gst-launch-1.0) で RTSP サーバー ストリームをセットアップしたい。
私の「サーバー」は現在このようになっています
gst-launch-1.0.exe videotestsrc ! x264enc ! rtph264pay ! udpsink host=localhost port=5000
そして、私のクライアントは次のようになります
gst-launch-1.0.exe udpsrc port=5000 ! rtpmp2tdepay ! decodebin ! autovideosink
どちらのコマンドもエラーなしで実行されますが、「クライアント」にビデオが表示されません。さらに、コマンドが H.264 でエンコードされたビデオを RTP 経由で UDP ポートにストリーミングしているだけであることも認識しています。
UDP ポート 5000 でいくつかのデータが送信されているのが見えるので、送信側の部分は正しいと思います。
私の質問:
- 受信側で何が間違っていますか?
- RTSP ストリーム (メタ情報 .sdp ファイルを含む) を提供するように gst-launch-1.0 をセットアップするにはどうすればよいですか?
編集 (2014-03-24): 送信側のデバッグ出力:
gst-launch-1.0.exe -v videotestsrc ! x264enc ! rtph264pay ! udpsink host=localhost port=5000
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = video/x-raw, framerate=(fraction)30/1, width=(int)320, height=(int)240, format=(string)I420, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:sink: caps = video/x-raw, framerate=(fraction)30/1, width=(int)320, height=(int)240, format=(string)I420, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive
Redistribute latency...
/GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:src: caps = video/x-h264, codec_data=(buffer)01640014ffe1001967640014acd94141fb0110000003001000000303c8f142996001000568ebecb22c, stream-format=(string)avc, alignment=(string)au, level=(string)2, profile=(string)high, width=(int)320, height=(int)240, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:src: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, sprop-parameter-sets=(string)"Z2QAFKzZQUH7ARAAAAMAEAAAAwPI8UKZYA\=\=\,aOvssiw\=", payload=(int)96, ssrc=(uint)383435573, timestamp-offset=(uint)786392204, seqnum-offset=(uint)781
/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, sprop-parameter-sets=(string)"Z2QAFKzZQUH7ARAAAAMAEAAAAwPI8UKZYA\=\=\,aOvssiw\=", payload=(int)96, ssrc=(uint)383435573, timestamp-offset=(uint)786392204, seqnum-offset=(uint)781
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:sink: caps = video/x-h264, codec_data=(buffer)01640014ffe1001967640014acd94141fb0110000003001000000303c8f142996001000568ebecb22c, stream-format=(string)avc, alignment=(string)au, level=(string)2, profile=(string)high, width=(int)320, height=(int)240, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: timestamp = 786392204
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: seqnum = 781
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
受信側:
gst-launch-1.0.exe -vvv udpsrc port=5000 ! "application/x-rtp, media=video, clock-rate=90000, encoding-name=H264, payload=96" ! queue ! rtph264depay ! queue ! decodebin ! autovideosink sync=false
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ありがとう!