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
products:sbc:vim4:add-ons:new-vim4-mipi-camera [2024/09/23 22:15]
nick
products:sbc:vim4:add-ons:new-vim4-mipi-camera [2025/09/01 01:45] (current)
nick [Record video via gstreamer]
Line 17: Line 17:
  
 ==== Enable overlays ==== ==== Enable overlays ====
 +
 +<WRAP important >
 +From version **1.7.5**, cameras are auto detected by default, no need any setup, you can just skip the overlay setup.
 +</WRAP>
  
 If you want to use the MIPI camera, you need to enable it in [[products:sbc:vim4:configurations:device-tree-overlay|overlays]].\\ If you want to use the MIPI camera, you need to enable it in [[products:sbc:vim4:configurations:device-tree-overlay|overlays]].\\
Line 53: Line 57:
  
 ```shell ```shell
-gst-launch-1.0 -e 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+gst-launch-1.0 -e v4l2src device=/dev/media0  io-mode=dmabuf 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
  
 ``` ```
Line 61: Line 65:
  
 ```shell ```shell
-gst-launch-1.0 -e 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+gst-launch-1.0 -e v4l2src device=/dev/media0  io-mode=dmabuf 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
  
 ``` ```
Line 119: Line 123:
  
 ```shell ```shell
-gst-launch-1.0 -e v4l2src device=/dev/media0 io-mode=mmap  ! video/x-raw,format=NV12,width=3840,height=2160,framerate=30/1 ! videoconvert ! waylandsink+gst-launch-1.0 v4l2src device=/dev/media0 io-mode=mmap  ! video/x-raw,format=NV12,width=3840,height=2160,framerate=30/1 ! videoconvert ! waylandsink
 ``` ```
  
Line 132: Line 136:
 You can use gstreamer ''clutterautovideosink'' to preview the video on Ubuntu Wayland desktop: You can use gstreamer ''clutterautovideosink'' to preview the video on Ubuntu Wayland desktop:
  
 +```shell
 +gst-launch-1.0 v4l2src device=/dev/media0 io-mode=mmap ! video/x-raw,format=NV12,width=3840,height=2160,framerate=30/1 ! clutterautovideosink
 +```
 +
 +You can use the command below to check display fps:
 +
 +```shell
 +gst-launch-1.0 -v v4l2src device=/dev/media0 io-mode=mmap ! video/x-raw,format=NV12,width=3840,height=2160,framerate=30/1 ! fpsdisplaysink video-sink=clutterautovideosink sync=false text-overlay=true
 +```
  
 +You press ''Alt + F7'' and then move mouse to move the windown.
  
  
Last modified: 2024/09/23 22:15 by nick