Changes

Jump to navigation Jump to search
Line 470: Line 470:     
<code>gst-launch-1.0 v4l2src num-buffers=1 ! "video/x-raw,format=(string)UYVY, width=(int)1920, height=(int)1080" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! nvjpegenc ! filesink location=jpgname.jpg</code>
 
<code>gst-launch-1.0 v4l2src num-buffers=1 ! "video/x-raw,format=(string)UYVY, width=(int)1920, height=(int)1080" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! nvjpegenc ! filesink location=jpgname.jpg</code>
 +
 +
===== VEYE-MIPI-IMX335 gstreamer example =====
 +
Since VEYE-MIPI-IMX335 supports only a few specific resolution modes, its driver we use use_sensor_mode_id mode.
 +
{| class="wikitable"
 +
|+VEYE-MIPI-IMX335 mode
 +
!./veye5_mipi_i2c.sh video mode
 +
!v4l2-ctl sensor_mode
 +
!video format
 +
|-
 +
|1
 +
|0
 +
|2592x1944@20fps
 +
|-
 +
|2
 +
|1
 +
|2592x1944@12.5fps
 +
|-
 +
|3
 +
|2
 +
|2560x1440@25fps
 +
|-
 +
|4
 +
|3
 +
|2560x1440@30fps
 +
|}
 +
 +
* prepare
 +
 +
<code>sudo apt-get install v4l-utils</code>
 +
 +
Refer to the following section and download the veye5_mipi_i2c.sh tool.
 +
 +
* 2592x1944@20fps mode preview, framerate statistics
 +
 +
<code>v4l2-ctl -d /dev/video0 --set-ctrl sensor_mode=0</code>
 +
 +
<code>./veye5_mipi_i2c.sh -w -f videomode -p1 1</code>
 +
 +
<code>v4l2-ctl -d /dev/video0 --set-ctrl preferred_stride=5376</code>
 +
 +
Preview
 +
 +
<code>gst-launch-1.0 nvv4l2camerasrc device=/dev/video0 ! "video/x-raw(memory:NVMM), width=(int)2592, height=(int)1944" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! nvoverlaysink sync=false</code>
 +
 +
Framerate statistics
 +
 +
<code>gst-launch-1.0 nvv4l2camerasrc device=/dev/video0 ! "video/x-raw(memory:NVMM),format=(string)UYVY,width=(int)2592,height=(int)1944" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! fpsdisplaysink video-sink=fakesink -v</code>
 +
 +
* 2560x1440@30fps mode video encode and capture
 +
 +
<code>v4l2-ctl -d /dev/video0 --set-ctrl sensor_mode=3</code>
 +
 +
<code>./veye5_mipi_i2c.sh -w -f videomode -p1 4</code>
 +
 +
<code>v4l2-ctl -d /dev/video0 --set-ctrl preferred_stride=5120</code>
 +
 +
Video encode
 +
 +
<code>gst-launch-1.0 nvv4l2camerasrc num-buffers=300 ! "video/x-raw(memory:NVMM),format=(string)UYVY, width=(int)2560, height=(int)1440" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)NV12" ! nvv4l2h264enc control-rate=0 bitrate=10000000 ! h264parse ! qtmux ! filesink location=filename.mp4 -e</code>
 +
 +
Video Replay
 +
 +
<code>gst-launch-1.0 filesrc location=filename.mp4 ! qtdemux ! queue ! h264parse ! nvv4l2decoder ! nvoverlaysink -e</code>
 +
 +
Capture
 +
 +
<code>gst-launch-1.0 v4l2src num-buffers=1 ! "video/x-raw,format=(string)UYVY, width=(int)2560, height=(int)1440" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! nvjpegenc ! filesink location=jpgname.jpg</code>
 +
 
====Video Control Toolkits Manual====
 
====Video Control Toolkits Manual====
  

Navigation menu