gstreamer_h264_nalunit.yml

device-connector-intdashとともにインストールされる /etc/dc_conf/gstreamer_h264_nalunit.yml は、GStreamerから出力されるH.264の動画を、iSCPで定義されているH.264 NAL Unitデータ型を使って送信するためのパイプライン設定ファイルです。

tasks:
  - id: 1
    element: process-src
    conf:
      # Example of vaapih264enc: gst-launch-1.0 -q v4l2src device=/dev/video0 ! videorate ! image/jpeg,width=1920,height=1080,framerate=15/1 ! queue ! vaapijpegdec ! queue ! vaapipostproc ! queue ! vaapih264enc rate-control=2 bitrate=3000 max-bframes=0 keyframe-period=15 num-slices=32 ! fdsink fd=1
      # Example of omxh264enc: gst-launch-1.0 -q v4l2src device=/dev/video0 ! videorate ! image/jpeg,width=1920,height=1080,framerate=15/1 ! jpegdec ! omxh264enc control-rate=2 iframeinterval=15 bitrate=3000000 bit-packetization=true slice-header-spacing=1200 insert-sps-pps=true insert-vui=true ! video/x-h264,stream-format=byte-stream ! queue ! h264parse ! queue ! fdsink fd=1
      command: $(DC_PROCESS_SRC_CONF_COMMAND)
  - id: 2
    element: h264-nalunit-split-filter
    from: [ [1] ]
    conf:
      clock_id: CLOCK_MONOTONIC
      delay_ms: $(DC_H264_NALUNIT_SPLIT_FILTER_CONF_DELAY_MS)

  - id: 3
    element: print-log-filter
    from: [ [2] ]
    conf:
      interval_ms: 10000
      tag: $(DC_PRINT_LOG_FILTER_CONF_TAG)
      output: stderr

  - id: 4
    element: file-sink
    from: [ [3] ]
    conf:
      flush_size: 100
      path: $(DC_FILE_SINK_CONF_PATH)