Recording from CAM-OV5645 with gstreamer on iMX6

Difficulty Levels: Advanced
Date added: June 27, 2018
Affected Products: EDM1-CF-IMX6 , EDM2-IMX6PLUS , PICO-IMX6 , WBDUAL , WBQUAD , WBSOLO

Summary

This guide shows how to display a camera view on a display, take a photograph, or how to record the camera input to a file.

Procedure

Some handy commands are:

To display camera on the screen
gst-launch-1.0 imxv4l2src device=/dev/video0 ! 'video/x-raw, format=(string)UYVY,width=640,height=480,framerate=(fraction)30/1' ! imxv4l2sink

To record a movie clip
gst-launch-1.0 imxv4l2src device=/dev/video0 ! avimux ! filesink location=/tmp/clip.avi

To take a picture
gst-launch-1.0 imxv4l2src device=/dev/video0 num_buffers=1 ! video/x-raw,format=UYVY,width=1920,height=1080,framerate=30/1 ! jpegenc quality=100 idct-method=2 ! filesink location=/tmp/picture.jpeg

Replace /dev/video0 with your V4L2 device, if needed.

Stay up to date with all the latest TechNexion news...

Sign-up for our Newsletter