Open main menu

Changes

X1300 Software

789 bytes added, 12 April
no edit summary
{{GD Template Impl}}
This tutorial assumes youis mainly based on the tool 've already set up a Raspberry Pi with Raspbian12(''v4l2-ctl'bookworm'''). For help installing tool and provides a simple example to check whether the Debian-based OS x1300 is working properly on your the Raspberry Pi5. It is not only a tutorial, but also a basis for you to check out whether the docs on RaspberrypiX1300 is damaged.comOf course, you can also consider using other video tools such as '''GStreamer''' to get similar functions.
 Now assumes you've already set up a Raspberry Pi with Raspbian12('''bookworm'''). For help installing the Debian-based OS on your Pi, check out the docs on https://www.raspberrypi.com/ To check the kernel version, execute the following command:(OS kernel upgrades often bring about some uncertain issues)
uname -a
Maybe the result is following:
Linux raspberrypi 6.6.22-v8+ #1746 SMP PREEMPT Wed Mar 20 17:19:49 GMT 2024 aarch64 GNU/Linux
* 1. To enable the device tree overlay in the '''/boot/firmware/config.txt'''
sudo nano /boot/firmware/config.txt
Add two lines at the end of the file that reads like this:
Press Ctrl + X to Exit
* 2. Reboot the Raspberry Pi 5 for the settings to take effect
sudo reboot
* 3. Check video devices list
v4l2-ctl --list-devices
[[File:X1300v1.0-setting3.png]]
* 4. Create an 1920*1080P EDID txt file to setup the HDMI to CSI adapter before you can connect it to a HDMI source. This EDID file will enable the video and audio mode supported.
sudo nano 1080P60EDID.txt
Copy below EDID data and paste to 1080P60EDID.txt
00000000000000000000000000000015
</pre>
* 5. Loading the EDID data
v4l2-ctl -d /dev/v4l-subdev2 --set-edid=file=/home/pi/1080P60EDID.txt --fix-edid-checksums
'''PS''':Pay attention to the directory of your edid file
* 6. Check the screen resolution
v4l2-ctl -d /dev/v4l-subdev2 --query-dv-timings
[[File:X1300v1.0-setting4.png]]
 
'''PS:'''Make sure to connect the HDMI source device to get the HDMI signal, if you can't get the correct resolution here, consider adjusting the resolution of your source device to match the EDID.
* 7. Applying the screen timing to the capture setup
v4l2-ctl -d /dev/v4l-subdev2 --set-dv-bt-timings query
[[File:X1300v1.0-setting5.png]]
* 8. Reset links
media-ctl -d /dev/media2 -r
<span class="tb_red">Please note that the '''/dev/media number ''' can change. Go to step1.step 3 to check the media number.please change '''/dev/media2''' to '''/dev/media1''' if your media number is 1, and so on</span>
* 9. Set formats
media-ctl -d /dev/media2 -l ''\''csi2'\'':4 -> '\''rp1-cfe-csi2_ch0'\'':0 [1]'
media-ctl -d /dev/media2 -V ''\''csi2'\'':0 [fmt:RGB888_1X24/1920x1080 field:none colorspace:srgb]'
media-ctl -d /dev/media2 -V ''\''csi2'\'':4 [fmt:RGB888_1X24/1920x1080 field:none colorspace:srgb]'
* <span class="tb_red">Please note that the '''/dev/media number''' can change. Go to step 3 to check the media number. please change '''/dev/media2''' to '''/dev/media1''' if your media number is 1, and so on</span>  10. Set output formats
v4l2-ctl -v width=1920,height=1080,pixelformat=RGB3
*  11. Capture frames and save to /home/pi (filename: csitest.yuv)
v4l2-ctl --verbose -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat='RGB3' --stream-mmap=4 --stream-skip=3 --stream-count=2 --stream-to=csitest.yuv --stream-poll
* 12. To play the YUV file on Raspberry Pi OS desktop, use FFplay. (Not work if executing the command from SSH).
ffplay -f rawvideo -video_size 1920x1080 -pixel_format bgr24 csitest.yuv
 
 
Return to [[X1300]]
<!--Add review function! -->