GStreamer Combining Frames

Using videomixer plugin to combine multiple feeds

  • Video mixer helps us to combine multiple frames into a single frame, which can be encoded and transmitted via UDP
  • Example transmission:
    gst-launch-1.0 videomixer name=mix ! videoconvert ! \
    x264enc tune=zerolatency byte-stream=true  bitrate=3000 threads=2 ! \
    h264parse config-interval=1 ! rtph264pay ! udpsink host=127.0.0.1 port=5001 \
    videotestsrc pattern=13 ! \
    video/x-raw, width=640, height=480 ! \
    videobox border-alpha=0 top=0 left=-640 ! mix. \
    v4l2src device="/dev/video0" !  \
    video/x-raw, width=640, height=480 !  \
    videobox border-alpha=0 top=0 left=0 ! mix.
    
  • Reception:
    gst-launch-1.0 udpsrc port=5001 ! application/x-rtp, encoding-name=H264,payload=96 ! \
    rtph264depay ! h264parse ! avdec_h264 ! \
    videoconvert ! ximagesink sync=false