Streaming In

Multimedia User Guide (UG1449)

Document ID
UG1449
Release Date
2022-04-21
Revision
1.4 English
  • Static pipelines for stream-in using Gstreamer-1.0
    • For video stream in only:

      The following pipeline can be used to receive the video stream from another device (server), to the host device on the same network.

      gst-launch-1.0 udpsrc port=5004 buffer-size=60000000 \
      caps="application/x-rtp, clock-rate=90000" ! \
      rtpjitterbuffer latency=1000 ! rtpmp2tdepay ! tsparse ! \
      video/mpegts ! tsdemux name=demux ! queue ! h265parse ! \
      video/x-h265, profile=main, alignment=au ! \
      omxh265dec internal-entropy-buffers=5 low-latency=0 ! \
      queue max-size-bytes=0 ! kmssink bus-id="a0070000.v_mix"

      In this example, the encoded video format is H265. Stream in at client device occurs on port 5004 over the UDP protocol.

    • For video and audio stream in:

      Use the following pipeline to receive video and audio stream from another device (server), to the host device on the same network.

      gst-launch-1.0 udpsrc port=5004 buffer-size=60000000 \
      caps="application/x-rtp, clock-rate=90000" ! rtpjitterbuffer \
      latency=1000 ! rtpmp2tdepay ! tsparse ! video/mpegts \
      ! tsdemux name=demux demux. ! queue ! h265parse ! video/x-h265, \
      profile=main, alignment=au ! omxh265dec internal-entropy-buffers=5 \
      low-latency=0 ! queue max-size-bytes=0 \
      ! kmssink bus-id="a0070000.v_mix" demux. ! queue \
      ! opusparse ! opusdec ! audioconvert ! audioresample \
      ! audio/x-raw, rate=48000, channels=2, \
      format=S24_32LE ! alsasink device="hw:2,0"

      In this example, the encoded video format is H265. Stream in at client device occurs on port 5004 over the UDP protocol. Audio playback device is hw:2,0. For video stream-in, the pipeline remains the same as in the previous example.

  • Dynamic pipelines for stream-in using Gstreamer-1.0
    • For video stream-in:
      gst-launch-1.0 uridecodebinuri=udp://192.168.25.89:5004 ! kmssink bus-id=a0070000.v_mix
    • For both video and audio stream-in:
      gst-launch-1.0 uridecodebinuri=udp://192.168.25.89:5004 name=demuxdemux. ! \
      queue ! kmssink bus-id=a0070000.v_mix demux. ! queue ! \
      audioconvert ! audioresample ! \
      audio/x-raw, rate=48000, channnels=2, format=S24_32LE ! \
      alsasink device="hw:2,0"