2

バックグラウンド:

  • Bosch VideoJet x40 ネットワーク ビデオ エンコーダーからビデオをストリーミングしています。最大 4 つのアナログ カメラ入力を読み取り、RTP ストリームを出力します。
  • 古い VCR (プライベート ライアンを救え!) からテスト映像を提供し、ネットワーク エンコーダーの入力に接続するために 1 本の黄色のビデオ コンポジット ケーブルを使用しています。
  • これらのRTP ストリームは、UDP/RTP パケットで H.264 エンコードされたビデオとして送信されます。YUV I420 色空間でエンコードされたビデオ データ。

私の gstreamer パイプラインは RTP パケットを読み取り、YUV から生の RGB に変換してから保存します。これまでのところ、その点で正しく動作します:

gst-launch --gst-debug=2 -vv udpsrc caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264" port=33314 ! rtph264depay ! h264parse ! ffdec_h264 ! ffmpegcolorspace ! "video/x-raw-rgb, bpp=(int)24, depth=(int)24, framerate=(fraction)25/1, interlaced=(boolean)false" ! filesink location="privateryan.rgb"

これは、ほぼ正しく機能し、RAW RGB ビデオ出力を保存するコマンドのデバッグ出力です。このファイルは、ほんの数秒で(予想どおり)巨大になるため、次のコマンドを実行する場合は注意してください。

Setting pipeline to PAUSED ...
/GstPipeline:pipeline0/GstUDPSrc:udpsrc0.GstPad:src: caps = application/x-rtp, media=(string)video, payload=(int)96, clock-rate=(int)90000, encoding-name=(string)H264
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0.GstPad:src: caps = video/x-h264
/GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0.GstPad:sink: caps = application/x-rtp, media=(string)video, payload=(int)96, clock-rate=(int)90000, encoding-name=(string)H264
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, parsed=(boolean)true, stream-format=(string)byte-stream, alignment=(string)au
/GstPipeline:pipeline0/ffdec_h264:ffdec_h2640.GstPad:sink: caps = video/x-h264, parsed=(boolean)true, stream-format=(string)byte-stream, alignment=(string)au
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, width=(int)704, height=(int)240, parsed=(boolean)true, stream-format=(string)byte-stream, alignment=(string)au
/GstPipeline:pipeline0/ffdec_h264:ffdec_h2640.GstPad:sink: caps = video/x-h264, width=(int)704, height=(int)240, parsed=(boolean)true, stream-format=(string)byte-stream, alignment=(string)au
/GstPipeline:pipeline0/ffdec_h264:ffdec_h2640.GstPad:src: caps = video/x-raw-yuv, width=(int)704, height=(int)240, framerate=(fraction)25/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)5/11
/GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:src: caps = video/x-raw-rgb, bpp=(int)24, depth=(int)24, framerate=(fraction)25/1, interlaced=(boolean)false, width=(int)704, height=(int)240, pixel-aspect-ratio=(fraction)5/11, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, endianness=(int)4321
/GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:sink: caps = video/x-raw-yuv, width=(int)704, height=(int)240, framerate=(fraction)25/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)5/11
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw-rgb, bpp=(int)24, depth=(int)24, framerate=(fraction)25/1, interlaced=(boolean)false, width=(int)704, height=(int)240, pixel-aspect-ratio=(fraction)5/11, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, endianness=(int)4321
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw-rgb, bpp=(int)24, depth=(int)24, framerate=(fraction)25/1, interlaced=(boolean)false, width=(int)704, height=(int)240, pixel-aspect-ratio=(fraction)5/11, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, endianness=(int)4321
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/x-raw-rgb, bpp=(int)24, depth=(int)24, framerate=(fraction)25/1, interlaced=(boolean)false, width=(int)704, height=(int)240, pixel-aspect-ratio=(fraction)5/11, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, endianness=(int)4321

録音後、Vooya RAW シーケンス プレーヤーを使用してファイルを検査し、再生します。ただし、ビデオがインターレースされていることを Vooya に通知しないと、ファイルは正しく再生されません。

コンピューター ビジョン アプリケーション用に後で抽出できる平面パッケージ フレームが必要です。

ここでは、間違ったビデオ形式 (インターレース) ではありますが、ビデオの再生を確認できます。

http://i.imgur.com/QDZSWdJ.png

ここでは、設定を必要なものに変更すると、ビデオが再生されないことがわかります。

http://i.imgur.com/zSrOvFj.png

そのため、インターレース解除プラグインをパイプラインに追加しようとしましたが、成功しませんでした。私は何が間違っているのでしょうか?

これが私の新しいパイプラインで、ファイルシンクの直前にデインターレースがあります:

gst-launch --gst-debug=1 -v udpsrc caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264,frame-rate=(fraction)25/1" port=33314 ! rtph264depay ! ffdec_h264 ! ffmpegcolorspace ! "video/x-raw-rgb, bpp=(int)24, depth=(int)24, framerate=(fraction)25/1, interlaced=(boolean)false" ! deinterlace ! filesink location="privateryan.rgb"
0:00:00.096569700 12969       0x607080 ERROR           GST_PIPELINE ./grammar.y:614:gst_parse_perform_link: could not link ffmpegcsp0 to deinterlace0
WARNING: erroneous pipeline: could not link ffmpegcsp0 to deinterlace0

すべての処理を行った後でもビデオがインターレースされているように見えるのはなぜですか? また、インターレース プラグインに関して何が間違っている可能性がありますか?

VCR または B&W カメラがビデオをインターレースしている可能性があると思いますが、確かではありません。たとえそうであっても、それを変更することはできず、インターレースを解除する必要があります。

ありがとう!

4

0 に答える 0