Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:vim4:add-ons:new-vim4-mipi-camera

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
products:sbc:vim4:add-ons:new-vim4-mipi-camera [2023/09/24 21:34]
nick
products:sbc:vim4:add-ons:new-vim4-mipi-camera [2024/02/04 01:17]
nick
Line 31: Line 31:
 ``` ```
  
-Enable ''IMX415'': [[gh>/khadas/khadas-linux-kernel-dt-overlays/blob/main/overlays/vim4/5.4/vim4n-os08a10.dts]]+Enable ''IMX415'': [[gh>/khadas/khadas-linux-kernel-dt-overlays/blob/main/overlays/vim4/5.4/vim4n-imx415.dts]]
 ``` ```
 $ cat /boot/dtb/amlogic/kvim4.dtb.overlay.env  $ cat /boot/dtb/amlogic/kvim4.dtb.overlay.env 
Line 42: Line 42:
  
 The video node is ''/dev/media0''. The video node is ''/dev/media0''.
 +
 +==== Record video via gstreamer ====
 +
 +<WRAP important >
 +Only for 5.15 kernel.
 +</WRAP>
 +
 +
 +Record video and perform ''H264'' encoding:
 +
 +```shell
 +gst-launch-1.0 v4l2src device=/dev/media0  io-mode=mmap num-buffers=300 ! video/x-raw,format=NV21,width=1920,height=1080,framerate=30/1 ! amlvenc bitrate=8000 ! h264parse ! qtmux ! filesink location=test-h264.mp4
 +
 +```
 +
 +Record video and perform ''H265'' encoding:
 +
 +
 +```shell
 +gst-launch-1.0 v4l2src device=/dev/media0  io-mode=mmap num-buffers=300 ! video/x-raw,format=NV21,width=1920,height=1080,framerate=30/1 ! amlvenc bitrate=8000 ! h265parse ! qtmux ! filesink location=test-h265.mp4
 +
 +```
  
 ==== Get Frames via Mediactl API ==== ==== Get Frames via Mediactl API ====
Line 88: Line 110:
 ```shell ```shell
 $ ffplay -f rawvideo -pixel_format nv21 -video_size 3840x2160 /tmp/dst_mif_0.yuv $ ffplay -f rawvideo -pixel_format nv21 -video_size 3840x2160 /tmp/dst_mif_0.yuv
-``` 
- 
-==== Record video via gstreamer ==== 
- 
-<WRAP important > 
-Only for 5.15 kernel. 
-</WRAP> 
- 
- 
-Record video and perform ''H264'' encoding: 
- 
-```shell 
-gst-launch-1.0 v4l2src device=/dev/media0  io-mode=mmap num-buffers=300 ! video/x-raw,format=NV21,width=3840,height=2160,framerate=30/1 ! amlvenc bitrate=8000 ! h264parse ! qtmux ! filesink location=test-h264.mp4 
- 
-``` 
- 
-Record video and perform ''H265'' encoding: 
- 
- 
-```shell 
-gst-launch-1.0 v4l2src device=/dev/media0  io-mode=mmap num-buffers=300 ! video/x-raw,format=NV21,width=3840,height=2160,framerate=30/1 ! amlvenc bitrate=8000 ! h265parse ! qtmux ! filesink location=test-h265.mp4 
- 
 ``` ```
  
Last modified: 2024/05/18 03:13 by nick