-
CommentStreams:5139742ce7ec7df2a5d3a9cca84469aa
This works for me with an input from a NES little box from walmart. The sleep after loading the EDID file is important!
- !/bin/bash
set -x sudo rm -rf csitest.yuv
MEDIA_DEVICE="/dev/media0" # change this if your media node differs
v4l2-ctl -d "/dev/v4l-subdev2" --set-edid=file="/home/rkeene/source/retroshark/X1301files/1080p60EDID.txt"
- Must sleep here to let the HDMI HAT sync with the video signal.
sleep 2
v4l2-ctl -d /dev/v4l-subdev2 --query-dv-timings v4l2-ctl -d /dev/v4l-subdev2 --set-dv-bt-timings query
v4l2-ctl --list-devices media-ctl -d "${MEDIA_DEVICE}" -r
media-ctl -d "${MEDIA_DEVICE}" -l "'csi2':4 -> 'rp1-cfe-csi2_ch0':0 [1]" media-ctl -d "${MEDIA_DEVICE}" -V "'csi2':0 [fmt:RGB888_1X24/1920x1080 field:none colorspace:srgb]" media-ctl -d "${MEDIA_DEVICE}" -V "'csi2':4 [fmt:RGB888_1X24/1920x1080 field:none colorspace:srgb]"
sudo rm -rf csitest.yuv v4l2-ctl -v width=1920,height=1080,pixelformat=RGB3 v4l2-ctl --verbose -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat='RGB3' --stream-mmap=4 --stream-skip=3 --stream-count=60 --stream-to=csitest.yuv --stream-poll ffplay -f rawvideo -video_size 1920x1080 -pixel_format bgr24 csitest.yuv