gstreamer samples - stereoboy/Study GitHub Wiki

Remote

  • Check Video Format
v4l2-ctl --dev=/dev/video<video_no>  --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
	Index       : 0
	Type        : Video Capture
	Pixel Format: 'MJPG' (compressed)
	Name        : Motion-JPEG
		Size: Discrete 1920x1080
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 1904x1080
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 1280x720
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 640x480
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 320x240
			Interval: Discrete 0.033s (30.000 fps)

	Index       : 1
	Type        : Video Capture
	Pixel Format: 'YUYV'
	Name        : YUYV 4:2:2
		Size: Discrete 640x480
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 336x272
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 320x240
			Interval: Discrete 0.033s (30.000 fps)
  • Sender
gst-launch-1.0 v4l2src device=/dev/video<video_no>  ! \
image/jpeg, width=1920, height=1080, pixel-aspect-ratio=1/1, framerate=30/1 ! \
rtpjpegpay ! udpsink host=192.168.0.212 port=<port_no>
  • Receiver
gst-launch-1.0 udpsrc port=<port_no> ! application/x-rtp,encoding-name=JPEG,payload=26 ! \
rtpjpegdepay ! jpegdec ! autovideosink
⚠️ **GitHub.com Fallback** ⚠️