GStreamer

# Capture a single image and save it in JPEG format.

$ gst-launch v4l2src num-buffers=1 ! jpegenc ! filesink location=/tmp/test.jpg

# Stream video from a webcam.

$ gst-launch v4l2src ! xvimagesink

Ref: https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-plugins/html/gstreamer-plugins-filesink.html
gst-launch-1.0 v4l2src num-buffers=1 ! jpegenc ! filesink location=capture1.jpeg

Last updated

Was this helpful?