rtpvrawpay2

Payload raw video frames into RTP packets as per RFC 4175.

Example pipeline

 gst-launch-1.0 videotestsrc ! video/x-raw,width=1280,height=720,framerate=25/1,format=RGB ! timeoverlay font-desc=Sans,22 ! queue ! rtpvrawpay2 chunks-per-frame=10 ! udpsink host=127.0.0.1 port=5555 buffer-size=4194304

This will create and payload a raw video stream in RGB format with a test pattern and send it out via UDP.

Performance and system tuning considerations

Raw uncompressed video can easily take up a lot of memory and generate high data rates and packet rates, and as such is more demanding on the system and network than lower-bitrate compressed video.

This means you may need to tune your system's network configuration and configure udpsink for high datarate streams.

In particular, you may want to increase the maximum allowed buffer size for the kernel-side UDP send buffer, as the default is quite low, and a lot of that may be taken up by kernel-internal data structure overhead already.

On Linux systems you can change the maximum allowed value for the send buffer with e.g.

 sysctl -w net.core.wmem_max=67108864

Alternatively this can also be configured in /etc/sysctl.conf.

Once this is configured kernel-side, you can use udpsink buffer-size=NNN to increase the value to something larger than the default. If the value is too low it's possible that a lot of packets may never get sent out because they will be overwritten by new data before they can all be sent out.

On the payloader side you can set the chunks-per-frame property to make the payloader output RTP packets in batches instead of only when the entire video frame has been payloaded. That way the network stack can already start sending out data while the payloader is payloading the rest of the video data.

Hierarchy

GObject
    ╰──GInitiallyUnowned
        ╰──GstObject
            ╰──GstElement
                ╰──GstRtpBasePay2
                    ╰──rtpvrawpay2

Factory details

Authors: – Tim-Philipp Müller

Classification:Codec/Payloader/Network/RTP

Rank – marginal

Plugin – rsrtp

Package – gst-plugin-rtp

Pad Templates

sink

video/x-raw:
         format: { RGB, RGBA, BGR, BGRA, v308, UYVY, I420, Y41B, UYVP }
          width: [ 1, 32767 ]
         height: [ 1, 32767 ]
      framerate: [ 0/1, 2147483647/1 ]
 interlace-mode: progressive

Presencealways

Directionsink

Object typeGstPad


src

application/x-rtp:
          media: video
     clock-rate: 90000
  encoding-name: RAW
       sampling: { (string)RGB, (string)RGBA, (string)BGR, (string)BGRA, (string)YCbCr-4:4:4, (string)YCbCr-4:2:2, (string)YCbCr-4:2:0, (string)YCbCr-4:1:1 }
          depth: { (string)8, (string)10, (string)12, (string)16 }

Presencealways

Directionsrc

Object typeGstPad


The results of the search are