20,290
edits
mNo edit summary |
mNo edit summary |
||
Line 171: | Line 171: | ||
* Reboot the board after the flashing is completed. | * Reboot the board after the flashing is completed. | ||
= Apply the v4l2src patch = | == Apply the v4l2src patch == | ||
In order to capture with v4l2src, a patch needs to be applied to | In order to capture with v4l2src, a patch needs to be applied to GStreamer in order for v4l2src to support a Y10 format output. | ||
'''1.''' Please extract the contents provided in <code> extra_gstreamer_flashing_patches.tar</code> in <code> sources/patches</code> directory: | '''1.''' Please extract the contents provided in <code> extra_gstreamer_flashing_patches.tar</code> in <code> sources/patches</code> directory: | ||
Line 185: | Line 185: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== Apply the v4l2src patch to the Jetson Nano Devkit board == | === Apply the v4l2src patch to the Jetson Nano Devkit board === | ||
1. Transfer the patch to the board: | 1. Transfer the patch to the board: | ||
Line 230: | Line 230: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== Compile and install == | === Compile and install === | ||
1. Compile: | 1. Compile: | ||
Line 254: | Line 254: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
= Using the Driver = | == Using the Driver == | ||
== Capture with v4l2-ctl == | === Capture with v4l2-ctl === | ||
* Install v4l utils: | * Install v4l utils: | ||
Line 312: | Line 312: | ||
'''Note2:''' To see the frame the bit depth needs to be 9 or 10. | '''Note2:''' To see the frame the bit depth needs to be 9 or 10. | ||
== Capture with | === Capture with GStreamer === | ||
'''Important:''' To achieve the maximum performance at 120 fps on the Jetson Nano Devkit board, you need to run the following command on the terminal everytime the board is power on: | '''Important:''' To achieve the maximum performance at 120 fps on the Jetson Nano Devkit board, you need to run the following command on the terminal everytime the board is power on: | ||
Line 320: | Line 320: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Performance statistics === | ==== Performance statistics ==== | ||
<pre style="background:#d6e4f1"> | <pre style="background:#d6e4f1"> | ||
Line 340: | Line 340: | ||
</pre> | </pre> | ||
=== Framerate === | ==== Framerate ==== | ||
Using the next pipeline we were able to measure the framerate for single capture with perf element: | Using the next pipeline we were able to measure the framerate for single capture with perf element: | ||
Line 398: | Line 398: | ||
</pre> | </pre> | ||
=== GStreamer Examples === | ==== GStreamer Examples ==== | ||
'''Important:''' Since Y10 is not supported by v4l2src, GRAY16_LE is used for buffer dequeue, this causes GStreamer to take the full 2 bytes instead of just the 10 bits, which results in a darker image due to a 10bit image being interpreted as a 16bit image. | '''Important:''' Since Y10 is not supported by v4l2src, GRAY16_LE is used for buffer dequeue, this causes GStreamer to take the full 2 bytes instead of just the 10 bits, which results in a darker image due to a 10bit image being interpreted as a 16bit image. | ||
==== Capture and Display ==== | ===== Capture and Display ===== | ||
<syntaxhighlight lang=bash> | <syntaxhighlight lang=bash> | ||
gst-launch-1.0 v4l2src device=/dev/video0 ! "video/x-raw,width=1080,height=1280,framerate=120/1,format=GRAY16_LE" ! queue ! videoconvert ! xvimagesink sync=false | gst-launch-1.0 v4l2src device=/dev/video0 ! "video/x-raw,width=1080,height=1280,framerate=120/1,format=GRAY16_LE" ! queue ! videoconvert ! xvimagesink sync=false | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==== Video Encoding ==== | ===== Video Encoding ===== | ||
<syntaxhighlight lang=bash> | <syntaxhighlight lang=bash> | ||
gst-launch-1.0 v4l2src device=/dev/video0 ! "video/x-raw,width=1080,height=1280,framerate=120/1,format=GRAY16_LE" ! queue ! videoconvert ! queue ! omxh265enc ! h265parse ! qtmux ! filesink location=out.mp4 -e | gst-launch-1.0 v4l2src device=/dev/video0 ! "video/x-raw,width=1080,height=1280,framerate=120/1,format=GRAY16_LE" ! queue ! videoconvert ! queue ! omxh265enc ! h265parse ! qtmux ! filesink location=out.mp4 -e |