"Device Drivers -> Multimedia support -> Media Controller API"
"Device Drivers -> Multimedia support -> V4L2 sub-device userspace API"
"Device Drivers -> Multimedia support -> Autoselect ancillary drivers (tuners, sensors, i2c, frontends)"
"Device Drivers -> Multimedia support -> I2C Encoders, decoders, sensors and other helper chips"
"Package Selection for the target -> Graphic libraries and applications -> fswebcam"
.
#!/bin/sh VIDEO_DEV=/dev/video0 SKIP_FRAMES=20 # test preview channel fswebcam -S ${SKIP_FRAMES} -d ${VIDEO_DEV} -p RGB565 -r 640x480 rgb565.jpg fswebcam -S ${SKIP_FRAMES} -d ${VIDEO_DEV} -p RGB565 -r 320x240 rgb565_defactor.jpg # test codec channel fswebcam -S ${SKIP_FRAMES} -d ${VIDEO_DEV} -p YUYV -r 640x480 yuyv.jpg fswebcam -S ${SKIP_FRAMES} -d ${VIDEO_DEV} -p YUYV -r 800x600 yuyv_800x600.jpg fswebcam -S ${SKIP_FRAMES} -d ${VIDEO_DEV} -p UYVY -r 640x480 uyvy.jpg fswebcam -S ${SKIP_FRAMES} -d ${VIDEO_DEV} -p UYVY -r 800x600 uyvy_800x600.jpg # test codec channel, without any processing, GREY, or Bayer RGB. fswebcam -S ${SKIP_FRAMES} -d ${VIDEO_DEV} -p BAYER -r 640x480 bayer_bggr8.jpg fswebcam -S ${SKIP_FRAMES} -d ${VIDEO_DEV} -p SGRBG8 -r 640x480 bayer_grbg8.jpg
-S
: frames that need to skip.
-d /dev/video0
: specify the ISI as the input source.
-p
: pixel format, can be RGB565, YUYV, UYVY, BAYER, SGRBGB8 and etc.
-r
: resolution.
"Package Selection for the target -> Audio and video applications -> ffmpeg"
.
ffmpeg -r 25 -s vga -t 20 -pix_fmt yuyv422 -f video4linux2 -i /dev/video0 video.avi
-r
: frame rate
-s
: resolution, it can be qcif, cif, qvga, vga, svga, xga, uxga
.
-t
: time duration in second.
-pix_fmt
: pixel format, only support yuyv422.
-f video4linux2
: specify the format. Use ffmpeg -formats
will show all supported formats.
-i /dev/video0
: specify the ISI as the input source. Run following command to check the source name: # cat /sys/class/video4linux/video0/name isi-camera
video.avi
: output video file name
vcodec
specified, it use mpeg4
as default.
Tips: Run ffmpeg -pix_fmts
can show all the supported pixel formats.
ffmpeg -f video4linux2 -r 1 -s vga -t 4 -i /dev/video0 -pix_fmt yuyv422 -f image2 -vcodec png image%d.png
-r
: frame rate
-s
: resolution, it can be qcif, cif, qvga, vga, svga, xga, uxga
.
-t
: time duration in second.
-i /dev/video0
: specify the ISI as the input source. Run following command to check the source name: # cat /sys/class/video4linux/video0/name isi-camera
-pix_fmt
: pixel format, only support yuyv422.
-f image2
: image2 sequence format. Use ffmpeg -formats
will show all supported formats.
-vcodec png
: specify output format is png. Use ffmpeg -codecs
will show all supported codec.
image%d.png
: output file name is image1.png, image2.png and etc.
"Package Selection for the target -> Audio and video applications -> gstreamer"
and the plugins that you needed.
# gstreamer 1.0 gst-launch-1.0 v4l2src device="/dev/video1" ! video/x-raw,width=640,height=480 ! videoconvert ! kmssink
v4l2src
: a plugin to support v4l2 device as a source device="/dev/video1"
: specify the ISI as the v4l2 input device. cat /sys/class/video4linux/video1/name
video/x-raw,width=640,height=480
: For gstreamer 1.0, specify the v4l2 output video format and size.
kmssink
: a plugin to render to KMS (kernel mode setting) device
gst-inspect
will show all installed plugins.
Tips: run gst-inspect [plugin name]
will show all supported parameters for this plugins.
"Package Selection for the target -> Libraries -> Graphics -> zxing"
.
make zxing
to generate the barcode application: zxing_barcode
. zxing_barcode
is located on outpout/target/use/bin/
.
zxing_barcode *.jpg
i2c i2c-0: OV2640 Probed ... ov5642 0-003c: reg_read: i2c read error, reg: 300a ov5642: probe of 0-003c failed with error -121In above example, the message shows an OV2640 sensor is probed. But probe of OV5642 failed as we only support one camera module slot in the board.
# ls /sys/class/video4linux/video* /sys/class/video4linux/video0: debug dev index name power subsystem uevent /sys/class/video4linux/video1: debug device name subsystem dev index power uevent # cat /sys/class/video4linux/video0/name # cat /sys/class/video4linux/video1/name isi-cameraIn above example, we can find the
video1
is the isi-camera
device.
.dts, .dtsi .dtso
): WebFaqBaseForm | |
---|---|
Boards | Sam9x60EK, Sama5d3xek, AT91sam9x5-ek |
Components | Kernel, linux-4.14-at91, linux-4.19-at91, linux-5.4-at91, linux-5.10-at91, linux-5.15-mchp, linux-6.1-mchp |
Summary | Using ISI with Linux4sam 6.0 and Kernel 4.14 and later |
|
|||||||||||||||||||||||||||||
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
Microchip and others, are registered trademarks or trademarks of Microchip Technology Inc. and its subsidiaries.
Arm® and others are registered trademarks or trademarks of Arm Limited (or its affiliates). Other terms and product names may be trademarks of others.
Ideas, requests, contributions ? Connect to LinksToCommunities page.