Mira130 Linux Driver: Difference between revisions

Line 424: Line 424:


==Using the Driver==
==Using the Driver==
=== GStreamer Examples ===
==== Capture and Display ====
* 1920x1080@30fps RGGB12
<pre style="background:#d6e4f1">
gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, format=NV12, framerate=30/1' ! nvvidconv ! xvimagesink
</pre>
==== Video Encoding ====
<pre style="background:#d6e4f1">
CAPS="video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1"
gst-launch-1.0 nvarguscamerasrc sensor-id=0 num-buffers=500 ! "video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1" ! omxh264enc ! mpegtsmux ! filesink location=test.ts
</pre>
The sensor will capture in the 1920x1080@30fps mode and the pipeline will encode the video and save it into test.ts file.
=== Performance ===
==== ARM Load ====
Tegrastats display the following output when capturing with the sensor driver used in the Jetson Nano platform:
<pre>
RAM 1167/3963MB (lfb 522x4MB) CPU [25%@1132,16%@1132,9%@1132,12%@1132]
RAM 1168/3963MB (lfb 522x4MB) CPU [28%@921,12%@921,9%@921,13%@921]
RAM 1167/3963MB (lfb 522x4MB) CPU [23%@921,12%@921,13%@921,10%@921]
RAM 1167/3963MB (lfb 522x4MB) CPU [28%@921,8%@921,12%@921,12%@921]
RAM 1169/3963MB (lfb 522x4MB) CPU [26%@1479,9%@1479,16%@1479,9%@1479]
RAM 1167/3963MB (lfb 522x4MB) CPU [28%@921,13%@921,9%@921,16%@921]
RAM 1168/3963MB (lfb 522x4MB) CPU [23%@1036,13%@1036,14%@1036,7%@1036]
RAM 1167/3963MB (lfb 522x4MB) CPU [25%@921,12%@921,9%@921,11%@921]
RAM 1168/3963MB (lfb 522x4MB) CPU [25%@921,13%@921,16%@921,12%@921]
RAM 1169/3963MB (lfb 522x4MB) CPU [27%@921,12%@921,8%@921,13%@921]
RAM 1168/3963MB (lfb 522x4MB) CPU [24%@921,8%@921,13%@921,10%@921]
RAM 1169/3963MB (lfb 522x4MB) CPU [29%@921,13%@921,15%@921,6%@921]
</pre>
==== Framerate ====
Using the next pipeline we were able to measure the framerate for single capture with perf element:
<pre style="background:#d6e4f1">
gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1' ! perf  ! fakesink
</pre>
<pre>
GST-PERF-INFO --> timestamp: 0:44:34.324884537; bps: 0,000; mean_bps: 0,000; fps: 0,000; mean_fps: 0,000
GST-PERF-INFO -->  timestamp: 0:44:35.354956530; bps: 24192,000; mean_bps: 8064,000; fps: 30,095; mean_fps: 30,095
GST-PERF-INFO -->  timestamp: 0:44:36.355520992; bps: 241920,000; mean_bps: 66528,000; fps: 29,983; mean_fps: 30,039
GST-PERF-INFO -->  timestamp: 0:44:37.356864989; bps: 241920,000; mean_bps: 101606,400; fps: 29,960; mean_fps: 30,013
GST-PERF-INFO -->  timestamp: 0:44:38.357433006; bps: 241920,000; mean_bps: 124992,000; fps: 29,983; mean_fps: 30,005
GST-PERF-INFO -->  timestamp: 0:44:39.358908010; bps: 241920,000; mean_bps: 141696,000; fps: 29,956; mean_fps: 29,995
GST-PERF-INFO -->  timestamp: 0:44:40.359357860; bps: 241920,000; mean_bps: 154224,000; fps: 29,987; mean_fps: 29,994
GST-PERF-INFO -->  timestamp: 0:44:41.360617558; bps: 241920,000; mean_bps: 163968,000; fps: 29,962; mean_fps: 29,989
GST-PERF-INFO -->  timestamp: 0:44:42.361400607; bps: 241920,000; mean_bps: 171763,200; fps: 29,977; mean_fps: 29,988
GST-PERF-INFO -->  timestamp: 0:44:43.362674329; bps: 241920,000; mean_bps: 178141,091; fps: 29,962; mean_fps: 29,985
GST-PERF-INFO -->  timestamp: 0:44:44.363320878; bps: 241920,000; mean_bps: 183456,000; fps: 29,981; mean_fps: 29,984
GST-PERF-INFO -->  timestamp: 0:44:45.364541434; bps: 241920,000; mean_bps: 187953,231; fps: 29,963; mean_fps: 29,983
GST-PERF-INFO -->  timestamp: 0:44:46.365041950; bps: 241920,000; mean_bps: 191808,000; fps: 29,985; mean_fps: 29,983
GST-PERF-INFO -->  timestamp: 0:44:47.366186373; bps: 241920,000; mean_bps: 195148,800; fps: 29,966; mean_fps: 29,981
GST-PERF-INFO -->  timestamp: 0:44:48.366852845; bps: 241920,000; mean_bps: 198072,000; fps: 29,980; mean_fps: 29,981
GST-PERF-INFO -->  timestamp: 0:44:49.368081920; bps: 241920,000; mean_bps: 200651,294; fps: 29,963; mean_fps: 29,980
GST-PERF-INFO -->  timestamp: 0:44:50.368731947; bps: 241920,000; mean_bps: 202944,000; fps: 29,981; mean_fps: 29,980
GST-PERF-INFO -->  timestamp: 0:44:51.370037391; bps: 241920,000; mean_bps: 204995,368; fps: 29,961; mean_fps: 29,979
GST-PERF-INFO -->  timestamp: 0:44:52.370821395; bps: 241920,000; mean_bps: 206841,600; fps: 29,976; mean_fps: 29,979
GST-PERF-INFO -->  timestamp: 0:44:53.371545430; bps: 241920,000; mean_bps: 208512,000; fps: 29,978; mean_fps: 29,979
GST-PERF-INFO -->  timestamp: 0:44:54.372675500; bps: 241920,000; mean_bps: 210030,545; fps: 29,966; mean_fps: 29,978
GST-PERF-INFO -->  timestamp: 0:44:55.373703465; bps: 241920,000; mean_bps: 211417,043; fps: 29,969; mean_fps: 29,978
</pre>


{{ContactUs}}
{{ContactUs}}


[[Category:Jetson]][[Category:Jetson V4L2 Drivers]][[Category:Sony]]
[[Category:Jetson]][[Category:Jetson V4L2 Drivers]][[Category:Sony]]
208

edits