{{WarningMessage|text=This application note was validated against specific versions of the kit only. It may not work with other versions. Supported versions are listed in the ''History'' section.}}
As known, i.MX6UL SoC has not an IPU cell allowing strong performances on video acquisition. However, using an USB camera it is possible to capture a raw data video playing it on LCD controller.
[ 7.191864] USB Video Class driver (1.1.1)
[ 7.439394] usb_audio: Warning! Unlikely big volume range (=6144), cval->res is probably wrong.
[ 7.489486] usb_audio: [3] FU [Mic Capture Volume] ch = 1, val = 5120/11264/1[ 7.546073] usbcore: registered new interface driver snd-usb-audio
root@sbc-lynx:~# gst-launch-1.0 -v v4l2src device=/dev/video1 ! 'video/x-raw, format=YUY2, width=640, height=480, framerate=30/1' ! imxv4l2sink force-aspect-ratio=true====== IMXV4L2SINK: 4.0.8 build on Aug 25 2016 18:01:57. ======Setting pipeline to PAUSED ...display(/dev/fb0) resolution is (800x480).Pipeline is live and does not need PREROLL ...Setting pipeline to PLAYING ...New clock: GstSystemClock/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)640\,\ height\=\(int\)480\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1"/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)640\,\ height\=\(int\)480\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1"/GstPipeline:pipeline0/GstImxV4l2Sink:imxv4l2sink0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)640\,\ height\=\(int\)480\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1"/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)640\,\ height\=\(int\)480\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1"v4l2sink need allocate 3 buffers.
</pre>
* top process shows that cpu is running at 20%
<pre class="board-terminal">
root@sbc-lynx:~# gst-launch-1.0 -v v4l2src device=/dev/video1 ! 'video/x-raw, format=YUY2, width=320, height=240, framerate=30/1' ! imxv4l2sink overlay-top=120 overlay-left=240 overlay-width=320 overlay-height=240 force-aspect-ratio=true====== IMXV4L2SINK: 4.0.8 build on Aug 25 2016 18:01:57. ======Setting pipeline to PAUSED ...display(/dev/fb0) resolution is (800x480).Pipeline is live and does not need PREROLL ...Setting pipeline to PLAYING ...New clock: GstSystemClock/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1"/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1"/GstPipeline:pipeline0/GstImxV4l2Sink:imxv4l2sink0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1"/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1"v4l2sink need allocate 3 buffers.</pre> * top process shows that cpu is running at 13% <pre class="board-terminal">Mem: 176956K used, 70208K free, 356K shrd, 3896K buff, 116504K cachedCPU: 0% usr 9% sys 0% nic 71% idle 0% io 0% irq 19% sirqLoad average: 0.27 0.35 0.36 1/64 683 PID PPID USER STAT VSZ %VSZ %CPU COMMAND 676 378 root S 35512 14% 13% gst-launch-1.0 -v v4l2src device=/dev/
</pre>
In this use case the PXP iMX6UL hardware cell is performing an image rotation on the screen using the <code>imxvideoconvert_pxp</code> <b>NXP</b> gstreamer plugin
<pre class="board-terminal">
root@sbc-lynx:~# gst-launch-1.0 -v v4l2src device=/dev/video1 ! capsfilter caps="video/x-raw, width=640, height=480, framerate=30/1" ! imxvideoconvert_pxp rotation=1 ! imxv4l2sink force-aspect-ratio=true====== IMXV4L2SINK: 4.0.8 build on Aug 25 2016 18:01:57. ======Setting pipeline to PAUSED ...display(/dev/fb0) resolution is (800x480).Pipeline is live and does not need PREROLL ...Setting pipeline to PLAYING ...New clock: GstSystemClock/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)640\,\ height\=\(int\)480\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1"/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)640\,\ height\=\(int\)480\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1"/GstPipeline:pipeline0/imxvideoconvert_pxp:imxvideoconvert_pxp0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)BGRx\,\ width\=\(int\)640\,\ height\=\(int\)480\,\ framerate\=\(fraction\)30/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive"/GstPipeline:pipeline0/GstImxV4l2Sink:imxv4l2sink0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)BGRx\,\ width\=\(int\)640\,\ height\=\(int\)480\,\ framerate\=\(fraction\)30/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive"/GstPipeline:pipeline0/imxvideoconvert_pxp:imxvideoconvert_pxp0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)640\,\ height\=\(int\)480\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1"/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)640\,\ height\=\(int\)480\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1"v4l2sink need allocate 3 buffers.
</pre>
==Demo on youtube==
{| class="wikitable" | width="100%"
| {{#ev:youtube|hUb2Gx6D-cE|500|center|Video capturing and streaming on NXP i MX6 UL |frame}}