Radxa 8m 219 gstreamer resolution

Im using a Radxa Zero 3w with a Radxa 8m 219 camera attached.

Overlay for 8m is enabled.

If i use the test cmd

gst-launch-1.0 v4l2src num-buffers=512 device=/dev/video0 io-mode=4 ! videoconvert ! video/x-raw, format=NV12, width=1920, height=1080, framerate=30/1 ! tee name=t ! queue ! mpph264enc ! queue ! h264parse ! mpegtsmux ! filesink location=/home/radxa/file.name.mp4

I get a video saved .

If i try to get 4k output ( as advertised by Radxa ) with

gst-launch-1.0 v4l2src num-buffers=512 device=/dev/video0 io-mode=4 ! videoconvert ! video/x-raw, format=NV12, width=3820, height=2464, framerate=30/1 ! tee name=t ! queue ! mpph264enc ! queue ! h264parse ! mpegtsmux ! filesink location=/home/radxa/file.name.mp4

I get

Setting pipeline to PLAYING …
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
New clock: GstSystemClock
Additional debug info:
…/libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.002009663
Setting pipeline to NULL …
Freeing pipeline …

Any help or advice would be greatly appreciated.

Thanks

Can you post a download link for the software you are using?

You could try changing the width=3820, height=2464 parameter in the command to width=3840, height=2160 and see if you still have problems!

I’m testing with ffmpeg to youtube

ffmpeg -re -f v4l2 -video_size 384
0x2160 -i /dev/video0 -c:v h264 -preset veryfast -b:v 8000k -maxrate 8000k -bufsize 16000k -
rc_mode 0 -level 30 -pix_fmt yuv420p -f flv “rtmp://a.rtmp.youtube.com/live2/…”

gives me about 0.2 fps

[video4linux2,v4l2 @ 0xaaaafd953100] ioctl(VIDIOC_G_INPUT): Inappropriate ioctl for device
[video4linux2,v4l2 @ 0xaaaafd953100] ioctl(VIDIOC_G_PARM): Inappropriate ioctl for device
[video4linux2,v4l2 @ 0xaaaafd953100] Time per frame unknown

If i use your suggested resolution it hangs here, 4k will continue…

Duration: N/A, start: 29145.357268, bitrate: N/A
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 3840x2160, 1000k tbr, 1000k tbn
[out#0/flv @ 0xaaab0cd6c6b0] Codec AVOption preset (Set the encoding preset (cf. x264 --fullhelp)) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_rkmpp_encoder))
Press [q] to stop, [?] for help
[h264_rkmpp_encoder @ 0xaaab0cd6d1d0] Picture format is yuv420p.
[h264_rkmpp_encoder @ 0xaaab0cd6d1d0] Rate Control mode is set to VBR
[h264_rkmpp_encoder @ 0xaaab0cd6d1d0] Bitrate Target/Min/Max is set to 8000000/500000/8500000
[h264_rkmpp_encoder @ 0xaaab0cd6d1d0] Profile is set to HIGH
[h264_rkmpp_encoder @ 0xaaab0cd6d1d0] 8x8 Transform is enabled
[h264_rkmpp_encoder @ 0xaaab0cd6d1d0] Level is set to 30
[h264_rkmpp_encoder @ 0xaaab0cd6d1d0] Coder is set to CABAC
[h264_rkmpp_encoder @ 0xaaab0cd6d1d0] Quality Min/Max is set to 50%(Quant=30) / 100%(Quant=10)