DART-MX8M CSI: Difference between revisions
From Variscite Wiki
No edit summary |
|||
Line 12: | Line 12: | ||
This should output below | This should output below | ||
<pre> | <pre> | ||
# v4l2-ctl --list-devices | |||
i.MX6S_CSI (platform:30a90000.csi1_bridge): | i.MX6S_CSI (platform:30a90000.csi1_bridge): | ||
/dev/video0 | /dev/video0 | ||
Line 26: | Line 26: | ||
* 480P 640x480@30fps: | * 480P 640x480@30fps: | ||
# gst-launch-1.0 v4l2src device=/dev/videoX ! video/x-raw,width=640,height=480 ! | # gst-launch-1.0 v4l2src device=/dev/videoX ! video/x-raw,width=640,height=480 ! fpsdisplaysink | ||
* NTSC 720x480@30fps: | * NTSC 720x480@30fps: | ||
# gst-launch-1.0 v4l2src device=/dev/videoX ! video/x-raw,width=720,height=480 ! | # gst-launch-1.0 v4l2src device=/dev/videoX ! video/x-raw,width=720,height=480 ! fpsdisplaysink | ||
* 720P 1280x720@30fps: | * 720P 1280x720@30fps: | ||
# gst-launch-1.0 v4l2src device=/dev/videoX ! video/x-raw,width=1280,height=720 ! | # gst-launch-1.0 v4l2src device=/dev/videoX ! video/x-raw,width=1280,height=720 ! fpsdisplaysink | ||
* 1080P: 1920x1080@30fps: | * 1080P: 1920x1080@30fps: | ||
# gst-launch-1.0 v4l2src device=/dev/videoX ! video/x-raw,width=1920,height=1080 ! | # gst-launch-1.0 v4l2src device=/dev/videoX ! video/x-raw,width=1920,height=1080 ! fpsdisplaysink | ||
* QSXGA 2592x1944@15fps: | * QSXGA 2592x1944@15fps: | ||
# gst-launch-1.0 v4l2src device=/dev/videoX ! video/x-raw,width=2592,height=1944 ! | # gst-launch-1.0 v4l2src device=/dev/videoX ! video/x-raw,width=2592,height=1944 ! fpsdisplaysink | ||
== Testing Camera JPEG Snapshot == | == Testing Camera JPEG Snapshot == | ||
Line 59: | Line 59: | ||
# gst-launch-1.0 v4l2src device=/dev/videoX num-buffers=1 ! video/x-raw,width=2592,height=1944 ! jpegenc ! filesink location=/tmp/test.jpg | # gst-launch-1.0 v4l2src device=/dev/videoX num-buffers=1 ! video/x-raw,width=2592,height=1944 ! jpegenc ! filesink location=/tmp/test.jpg | ||
{{#ifeq: {{#var:HARDWARE_NAME}} | DART-MX8M | | |||
== Using both cameras simultaneously == | == Using both cameras simultaneously == | ||
Line 66: | Line 67: | ||
# gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=100 ! video/x-raw,width=1920,height=1080 ! jpegenc ! avimux ! filesink location=./test0.avi \ | # gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=100 ! video/x-raw,width=1920,height=1080 ! jpegenc ! avimux ! filesink location=./test0.avi \ | ||
v4l2src device=/dev/video1 num-buffers=100 ! video/x-raw,width=1920,height=1080 ! jpegenc ! avimux ! filesink location=./test1.avi | v4l2src device=/dev/video1 num-buffers=100 ! video/x-raw,width=1920,height=1080 ! jpegenc ! avimux ! filesink location=./test1.avi | ||
| | |||
}} |
Revision as of 16:35, 26 February 2019
DART-MX8M - Camera
Testing our MIPI cameras
Before running any of the pipelines below make sure you have camera(s) connected. i.MX family of processors uses gstreamer as multimedia framework. Please refer to https://gstreamer.freedesktop.org/
Camera Probe
Run the following command to see if you have got the camera detected
root@imx8m-var-dart:~# v4l2-ctl --list-devices
This should output below
# v4l2-ctl --list-devices i.MX6S_CSI (platform:30a90000.csi1_bridge): /dev/video0 i.MX6S_CSI (platform:30b80000.csi2_bridge): /dev/video1
As you can see above there are 2 cameras accessible as /dev/video0 and /dev/video1
Testing Camera Preview on Display
In the examples below /dev/videoX is either /dev/video0 or /dev/video1
- 480P 640x480@30fps:
# gst-launch-1.0 v4l2src device=/dev/videoX ! video/x-raw,width=640,height=480 ! fpsdisplaysink
- NTSC 720x480@30fps:
# gst-launch-1.0 v4l2src device=/dev/videoX ! video/x-raw,width=720,height=480 ! fpsdisplaysink
- 720P 1280x720@30fps:
# gst-launch-1.0 v4l2src device=/dev/videoX ! video/x-raw,width=1280,height=720 ! fpsdisplaysink
- 1080P: 1920x1080@30fps:
# gst-launch-1.0 v4l2src device=/dev/videoX ! video/x-raw,width=1920,height=1080 ! fpsdisplaysink
- QSXGA 2592x1944@15fps:
# gst-launch-1.0 v4l2src device=/dev/videoX ! video/x-raw,width=2592,height=1944 ! fpsdisplaysink
Testing Camera JPEG Snapshot
To capture JPEG snapshot run one of the pipelines below depending upon the required picture resolution.
- 480P 640x480:
# gst-launch-1.0 v4l2src device=/dev/videoX num-buffers=1 ! video/x-raw,width=640,height=480 ! jpegenc ! filesink location=/tmp/test.jpg
- NTSC 720x480:
# gst-launch-1.0 v4l2src device=/dev/videoX num-buffers=1 ! video/x-raw,width=720,height=480 ! jpegenc ! filesink location=/tmp/test.jpg
- 720P 1280x720:
# gst-launch-1.0 v4l2src device=/dev/videoX num-buffers=1 ! video/x-raw,width=1280,height=720 ! jpegenc ! filesink location=/tmp/test.jpg
- 1080P 1920x1080:
# gst-launch-1.0 v4l2src device=/dev/videoX num-buffers=1 ! video/x-raw,width=1920,height=1080 ! jpegenc ! filesink location=/tmp/test.jpg
- QSXGA 2592x1944:
# gst-launch-1.0 v4l2src device=/dev/videoX num-buffers=1 ! video/x-raw,width=2592,height=1944 ! jpegenc ! filesink location=/tmp/test.jpg