Welcome to Firefly
Switch language
Firefly Docsss
Last Updated: 2026-08-27 07:36:09

Camera Preview

General GStreamer Usage

4.3 Camera Preview

First query the formats and resolutions supported by the video device:

v4l2-ctl -d /dev/video0 --list-formats-ext

Preview with GStreamer:

gst-launch-1.0 v4l2src device=/dev/video0 \
  ! 'video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1' \
  ! autovideosink

If the camera outputs MJPEG, add JPEG decoding:

gst-launch-1.0 v4l2src device=/dev/video0 \
  ! 'image/jpeg,width=1920,height=1080,framerate=30/1' \
  ! jpegparse \
  ! decodebin \
  ! autovideosink

On this page