3.5. 画像を表示する#

注意

このページに記載されている設定は受信側(ホストコンピュータ)側で行う必要があります。

このドキュメントでは、GStreamer を使用して画像を出力しますが、RTP パケット (RFC 4175) を受信できる任意のアプリケーションを使用可能です。

3.5.1. 準備#

GStreamer がまだインストールされていない場合はインストールしてください。GStreamer をインストールするには、GStreamer の公式手順 に従ってください。

注釈

デフォルトでは、カメラ (C1/C2) は フリーラン モード で動作します。フレーム同期モードを切り替えるには、トリガー信号の設定 を参照してください。

参考

各カメラの同期に関する仕様の詳細については、C1 のフレーム同期モードおよびC2 のフレーム同期モードを参照してください。

3.5.2. 1台のカメラを表示#

ポート 5008 にアサインされている C1 カメラの画像を表示するには、以下の GStreamer コマンドを使用してください。

gst-launch-1.0 udpsrc caps='application/x-rtp, sampling=YCbCr-4:2:2, depth=(string)8, width=(string)1920, height=(string)1280' port=5008 ! rtpvrawdepay ! videoconvert ! queue ! fpsdisplaysink video-sink=autovideosink text-overlay=true sync=false

ポート 5004 にアサインされている C2 カメラの画像を表示するには、以下の GStreamer コマンドを使用してください。

gst-launch-1.0 udpsrc caps='application/x-rtp, sampling=YCbCr-4:2:2, depth=(string)8, width=(string)2880, height=(string)1860' port=5004 ! rtpvrawdepay ! videoconvert ! queue ! fpsdisplaysink video-sink=autovideosink text-overlay=true sync=false

3.5.3. 4台のカメラを表示#

4つのカメラの画像を表示するには、以下の GStreamer コマンドを使用してください。

  • C1 カメラ、ポート 5004 - 5007

gst-launch-1.0 \
udpsrc caps='application/x-rtp, sampling=YCbCr-4:2:2, depth=(string)8, width=(string)1920, height=(string)1280' port=5004 ! rtpvrawdepay ! videoconvert ! queue ! fpsdisplaysink video-sink=autovideosink text-overlay=true sync=false \
udpsrc caps='application/x-rtp, sampling=YCbCr-4:2:2, depth=(string)8, width=(string)1920, height=(string)1280' port=5005 ! rtpvrawdepay ! videoconvert ! queue ! fpsdisplaysink video-sink=autovideosink text-overlay=true sync=false \
udpsrc caps='application/x-rtp, sampling=YCbCr-4:2:2, depth=(string)8, width=(string)1920, height=(string)1280' port=5006 ! rtpvrawdepay ! videoconvert ! queue ! fpsdisplaysink video-sink=autovideosink text-overlay=true sync=false \
udpsrc caps='application/x-rtp, sampling=YCbCr-4:2:2, depth=(string)8, width=(string)1920, height=(string)1280' port=5007 ! rtpvrawdepay ! videoconvert ! queue ! fpsdisplaysink video-sink=autovideosink text-overlay=true sync=false
  • C1 カメラ、ポート 5008 - 5011

gst-launch-1.0 \
udpsrc caps='application/x-rtp, sampling=YCbCr-4:2:2, depth=(string)8, width=(string)1920, height=(string)1280' port=5008 ! rtpvrawdepay ! videoconvert ! queue ! fpsdisplaysink video-sink=autovideosink text-overlay=true sync=false \
udpsrc caps='application/x-rtp, sampling=YCbCr-4:2:2, depth=(string)8, width=(string)1920, height=(string)1280' port=5009 ! rtpvrawdepay ! videoconvert ! queue ! fpsdisplaysink video-sink=autovideosink text-overlay=true sync=false \
udpsrc caps='application/x-rtp, sampling=YCbCr-4:2:2, depth=(string)8, width=(string)1920, height=(string)1280' port=5010 ! rtpvrawdepay ! videoconvert ! queue ! fpsdisplaysink video-sink=autovideosink text-overlay=true sync=false \
udpsrc caps='application/x-rtp, sampling=YCbCr-4:2:2, depth=(string)8, width=(string)1920, height=(string)1280' port=5011 ! rtpvrawdepay ! videoconvert ! queue ! fpsdisplaysink video-sink=autovideosink text-overlay=true sync=false
  • C2 カメラ、ポート 5004 - 5007

gst-launch-1.0 \
udpsrc caps='application/x-rtp, sampling=YCbCr-4:2:2, depth=(string)8, width=(string)2880, height=(string)1860' port=5004 ! rtpvrawdepay ! videoconvert ! queue ! fpsdisplaysink video-sink=autovideosink text-overlay=true sync=false \
udpsrc caps='application/x-rtp, sampling=YCbCr-4:2:2, depth=(string)8, width=(string)2880, height=(string)1860' port=5005 ! rtpvrawdepay ! videoconvert ! queue ! fpsdisplaysink video-sink=autovideosink text-overlay=true sync=false \
udpsrc caps='application/x-rtp, sampling=YCbCr-4:2:2, depth=(string)8, width=(string)2880, height=(string)1860' port=5006 ! rtpvrawdepay ! videoconvert ! queue ! fpsdisplaysink video-sink=autovideosink text-overlay=true sync=false \
udpsrc caps='application/x-rtp, sampling=YCbCr-4:2:2, depth=(string)8, width=(string)2880, height=(string)1860' port=5007 ! rtpvrawdepay ! videoconvert ! queue ! fpsdisplaysink video-sink=autovideosink text-overlay=true

注釈

v8 までのイメージでは、C2カメラは10fpsモードだけがサポートされています。他のフレームレート設定はサポートされていません。

3.5.4. 8台のカメラを表示#

8つのカメラの画像を表示するには、以下の GStreamer コマンドを使用してください。

注釈

C1 カメラ8台をフリーラン モード (30fps) で駆動すると、画像が乱れる可能性があります。C1 カメラ8台の画像を表示するには、カメラをフレーム同期モードに設定し (詳細については トリガー信号の設定 を参照)、フレーム同期周波数を低く設定してください。詳細はフレームレートの制限に関する注意を参照して下さい。

gst-launch-1.0 \
udpsrc caps='application/x-rtp, sampling=YCbCr-4:2:2, depth=(string)8, width=(string)1920, height=(string)1280' port=5004 ! rtpvrawdepay ! videoconvert ! queue ! fpsdisplaysink video-sink=autovideosink text-overlay=true sync=false \
udpsrc caps='application/x-rtp, sampling=YCbCr-4:2:2, depth=(string)8, width=(string)1920, height=(string)1280' port=5005 ! rtpvrawdepay ! videoconvert ! queue ! fpsdisplaysink video-sink=autovideosink text-overlay=true sync=false \
udpsrc caps='application/x-rtp, sampling=YCbCr-4:2:2, depth=(string)8, width=(string)1920, height=(string)1280' port=5006 ! rtpvrawdepay ! videoconvert ! queue ! fpsdisplaysink video-sink=autovideosink text-overlay=true sync=false \
udpsrc caps='application/x-rtp, sampling=YCbCr-4:2:2, depth=(string)8, width=(string)1920, height=(string)1280' port=5007 ! rtpvrawdepay ! videoconvert ! queue ! fpsdisplaysink video-sink=autovideosink text-overlay=true sync=false \
udpsrc caps='application/x-rtp, sampling=YCbCr-4:2:2, depth=(string)8, width=(string)1920, height=(string)1280' port=5008 ! rtpvrawdepay ! videoconvert ! queue ! fpsdisplaysink video-sink=autovideosink text-overlay=true sync=false \
udpsrc caps='application/x-rtp, sampling=YCbCr-4:2:2, depth=(string)8, width=(string)1920, height=(string)1280' port=5009 ! rtpvrawdepay ! videoconvert ! queue ! fpsdisplaysink video-sink=autovideosink text-overlay=true sync=false \
udpsrc caps='application/x-rtp, sampling=YCbCr-4:2:2, depth=(string)8, width=(string)1920, height=(string)1280' port=5010 ! rtpvrawdepay ! videoconvert ! queue ! fpsdisplaysink video-sink=autovideosink text-overlay=true sync=false \
udpsrc caps='application/x-rtp, sampling=YCbCr-4:2:2, depth=(string)8, width=(string)1920, height=(string)1280' port=5011 ! rtpvrawdepay ! videoconvert ! queue ! fpsdisplaysink video-sink=autovideosink text-overlay=true sync=false
../../_images/8cams.gif

図 3.9 Displaying 8camera images at 20fps#