Before posting this, I read all the posts about 4K cameras in the forum.
I have enabled the 4k camera in Overlays
radxa@rock-5c:~$ v4l2-ctl --list-devices
rkisp-statistics (platform: rkisp):
/dev/video18
/dev/video19
rkcif-mipi-lvds2 (platform:rkcif):
/dev/media0
rkcif (platform:rkcif-mipi-lvds2):
/dev/video0
/dev/video1
/dev/video2
/dev/video3
/dev/video4
/dev/video5
/dev/video6
/dev/video7
/dev/video8
/dev/video9
/dev/video10
rkisp_mainpath (platform:rkisp0-vir0):
/dev/video11
/dev/video12
/dev/video13
/dev/video14
/dev/video15
/dev/video16
/dev/video17
/dev/media1
radxa@rock-5c:~$ v4l2-ctl --list-formats-ext --device=/dev/video11
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture Multiplanar
[0]: ‘UYVY’ (UYVY 4:2:2)
Size: Stepwise 32x16 - 3840x2160 with step 8/8
[1]: ‘NV16’ (Y/CbCr 4:2:2)
Size: Stepwise 32x16 - 3840x2160 with step 8/8
[2]: ‘NV61’ (Y/CrCb 4:2:2)
Size: Stepwise 32x16 - 3840x2160 with step 8/8
[3]: ‘NV21’ (Y/CrCb 4:2:0)
Size: Stepwise 32x16 - 3840x2160 with step 8/8
[4]: ‘NV12’ (Y/CbCr 4:2:0)
Size: Stepwise 32x16 - 3840x2160 with step 8/8
[5]: ‘NM21’ (Y/CrCb 4:2:0 (N-C))
Size: Stepwise 32x16 - 3840x2160 with step 8/8
[6]: ‘NM12’ (Y/CbCr 4:2:0 (N-C))
Size: Stepwise 32x16 - 3840x2160 with step 8/8
radxa@rock-5c:~$ v4l2-ctl --device=/dev/video11 --all
Driver Info:
Driver name : rkisp_v6
Card type : rkisp_mainpath
Bus info : platform:rkisp0-vir0
Driver version : 2.0.0
Capabilities : 0x84201000
Video Capture Multiplanar
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04201000
Video Capture Multiplanar
Streaming
Extended Pix Format
Media Driver Info:
Driver name : rkisp0-vir0
Model : rkisp0
Serial :
Bus info :
Media version : 5.10.110
Hardware revision: 0x00000000 (0)
Driver version : 5.10.110
Interface Info:
ID : 0x03000007
Type : V4L Video
Entity Info:
ID : 0x00000006 (6)
Name : rkisp_mainpath
Function : V4L2 I/O
Pad 0x01000009 : 0: Sink
Link 0x0200000a: from remote pad 0x1000004 of entity ‘rkisp-isp-subdev’: Data, Enabled
Priority: 2
Format Video Capture Multiplanar:
Width/Height : 800/600
Pixel Format : ‘NV12’ (Y/CbCr 4:2:0)
Field : None
Number of planes : 1
Flags :
Colorspace : BT.2020
Transfer Function : Rec. 709
YCbCr/HSV Encoding: BT.2020
Quantization : Full Range
Plane 0 :
Bytes per Line : 800
Size Image : 720000
Selection Video Capture: crop, Left 0, Top 0, Width 800, Height 600, Flags:
Selection Video Capture: crop_bounds, Left 0, Top 0, Width 3840, Height 2160, Flags:
Selection Video Output: crop, Left 0, Top 0, Width 800, Height 600, Flags:
Selection Video Output: crop_bounds, Left 0, Top 0, Width 3840, Height 2160, Flags:
Image Processing Controls
pixel_rate 0x009f0902 (int64) : min=0 max=1000000000 step=1 default=1000000000 value=356800000 flags=read-only, volatile
I tried to output the video file using the command line:
radxa@rock-5c:~$ v4l2-ctl --verbose -d /dev/video11 --set-fmt-video=width=800,height=600,pixelformat=‘NV12’ --stream-mmap=4 --set-selection=target=crop,flags=0,top=0,left=0,width=800,height=600 --stream-to=out.yuv
VIDIOC_QUERYCAP: ok
VIDIOC_G_FMT: ok
VIDIOC_S_FMT: ok
Format Video Capture Multiplanar:
Width/Height : 800/600
Pixel Format : ‘NV12’ (Y/CbCr 4:2:0)
Field : None
Number of planes : 1
Flags :
Colorspace : BT.2020
Transfer Function : Rec. 709
YCbCr/HSV Encoding: BT.2020
Quantization : Full Range
Plane 0 :
Bytes per Line : 800
Size Image : 720000
VIDIOC_G_SELECTION: ok
VIDIOC_S_SELECTION: ok
VIDIOC_REQBUFS returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_STREAMON returned 0 (Success)
The process is hangs here…
When I try to export 1.jpg, the process hangs
radxa@rock-5c:~$ gst-launch-1.0 v4l2src device=/dev/video11 io-mode=dmabuf num-buffers=1 ! video/x-raw,format=NV12,width=640,height=480 ! mppjpegenc ! filesink location=1.jpg
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Pipeline is PREROLLED …
Setting pipeline to PLAYING …
New clock: GstSystemClock
The same is true for outputting MP4, the process hangs
radxa@rock-5c:~$ gst-launch-1.0 v4l2src device=/dev/video11 io-mode=dmabuf ! video/x-raw,format=NV12,width=640,height=480,framerate=30/1 ! mpph264enc ! filesink location=1.mp4
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Pipeline is PREROLLED …
Setting pipeline to PLAYING …
New clock: GstSystemClock
Is anyone having the same problem as me?