20240626讓飛凌的OK3588-C開發板在相機使用1080p60分辨率下預覽
2024/6/26 15:15
4.2.1 全編譯測試
在源碼路徑內,提供了編譯腳本 build.sh,運行該腳本對整個源碼進行編譯,需要在終端切換到解壓
出來的源碼路徑,找到 build.sh 文件。
forlinx@ubuntu:~$ cd /home/forlinx/3588/OK3588_Linux_fs
以下操作需要在源碼目錄下操作,全編譯方法:
1、生成編譯所需配置(此時需要 forlinx 用戶密碼,密碼也是 forlinx)
forlinx@ubuntu: ~/3588/OK3588_Linux_fs$ sudo ./build.sh BoardConfig-linuxfs-ok3588.mk
2、進行全編譯
forlinx@ubuntu: ~/3588/OK3588_Linux_fs$ sudo ./build.sh
編譯成功后,使系統鏡像將在 rockdev 文件夾下生成,如下圖:
4.2.2 單獨編譯
用戶在內核源碼路徑下進行操作。
forlinx@ubuntu: ~/3588/OK3588_Linux_fs$ sudo ./build.sh kernel
v4l2-ctl --list-devices
v4l2-ctl --list-formats-ext -d /dev/video0
抖動
gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw, format=NV12, width=1920,height=1080, framerate=30/1 ! waylandsink
出錯
gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw, format=NV12, width=1920,height=1080, framerate=60/1 ! waylandsink
抖動
gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw, format=NV12, width=1920,height=1080 ! waylandsink
root@ok3588:/#?
root@ok3588:/#?
V12, width=1920,height=1080, framerate=30/1 ! waylandsink! video/x-raw, format=NV
Setting pipeline to PAUSED ...
Using mplane plugin for capture?
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:29.580406555
Setting pipeline to NULL ...
Caught SIGSEGV
exec gdb failed: No such file or directory
Spinning. ?Please run 'gdb gst-launch-1.0 1570' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.
^C
root@ok3588:/#?
root@ok3588:/#?
V12, width=1920,height=1080, framerate=60/1 ! waylandsink! video/x-raw, format=NV
Setting pipeline to PAUSED ...
Using mplane plugin for capture?
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.001854125
Setting pipeline to NULL ...
Freeing pipeline ...
root@ok3588:/#?
root@ok3588:/#?
root@ok3588:/#?
root@ok3588:/#?
V12, width=1920,height=1080 ! waylandsinkice=/dev/video0 ! video/x-raw, format=NV
Setting pipeline to PAUSED ...
Using mplane plugin for capture?
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:03.758202503
Setting pipeline to NULL ...
Caught SIGSEGV
exec gdb failed: No such file or directory
Spinning. ?Please run 'gdb gst-launch-1.0 1588' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.
^C
root@ok3588:/#?
錄像時在HDMI OUT可以預覽
gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=100000 ! video/x-raw,format=NV12, width=1920,height=1080 ! tee name=t ! queue ! mpph264enc ! queue ! h264parse ! qtmux ! filesink location=fpga10000-9500.mp4 t. ! queue ! waylandsink
在HDMI OUT預覽時不要保存mp4文件
gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=100000 ! video/x-raw,format=NV12, width=1920,height=1080 ! tee name=t ! queue ! mpph264enc ! queue ! h264parse ! qtmux ?t. ! queue ! waylandsink
在HDMI OUT預覽時,幀數也不要了!
gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=NV12, width=1920,height=1080 ! tee name=t ! queue ! mpph264enc ! queue ! h264parse ! qtmux ?t. ! queue ! waylandsink
root@ok3588:/#?
?! qtmux ?t. ! queue ! waylandsinkame=t ! queue ! mpph264enc ! queue ! h264parse?
Setting pipeline to PAUSED ...
Using mplane plugin for capture?
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 1:00:46.847308499
Setting pipeline to NULL ...
Freeing pipeline ...
root@ok3588:/#?
D:\20240423wyb\20240626>
D:\20240423wyb\20240626>
D:\20240423wyb\20240626>adb pull /fpga10000-9500.mp4
/fpga10000-9500.mp4: 1 file pulled, 0 skipped. 6.0 MB/s (3281516705 bytes in 522.460s)
D:\20240423wyb\20240626>