0

I am testing my Raspi Cam V2 on raspi model 4B running buster, I was able to get 1080p videos at 30fps and it supported the below formats

$ ffmpeg -f v4l2 -list_formats all -i /dev/video0

[video4linux2,v4l2 @ 0x24191c0] Raw : yuv420p : Planar YUV 4:2:0 : {32-3280, 2}x{32-2464, 2} [video4linux2,v4l2 @ 0x24191c0] Raw : yuyv422 : YUYV 4:2:2 : {32-3280, 2}x{32-2464, 2} [video4linux2,v4l2 @ 0x24191c0] Raw : rgb24 : 24-bit RGB 8-8-8 : {32-3280, 2}x{32-2464, 2} [video4linux2,v4l2 @ 0x24191c0] Compressed: mjpeg : JFIF JPEG : {32-3280, 2}x{32-2464, 2} [video4linux2,v4l2 @ 0x24191c0] Compressed: h264 : H.264 : {32-3280, 2}x{32-2464, 2} [video4linux2,v4l2 @ 0x24191c0] Compressed: mjpeg : Motion-JPEG : {32-3280, 2}x{32-2464, 2} [video4linux2,v4l2 @ 0x24191c0] Raw : Unsupported : YVYU 4:2:2 : {32-3280, 2}x{32-2464, 2} [video4linux2,v4l2 @ 0x24191c0] Raw : Unsupported : VYUY 4:2:2 : {32-3280, 2}x{32-2464, 2} [video4linux2,v4l2 @ 0x24191c0] Raw : uyvy422 : UYVY 4:2:2 : {32-3280, 2}x{32-2464, 2} [video4linux2,v4l2 @ 0x24191c0] Raw : nv12 : Y/CbCr 4:2:0 : {32-3280, 2}x{32-2464, 2} [video4linux2,v4l2 @ 0x24191c0] Raw : bgr24 : 24-bit BGR 8-8-8 : {32-3280, 2}x{32-2464, 2} [video4linux2,v4l2 @ 0x24191c0] Raw : yuv420p : Planar YVU 4:2:0 : {32-3280, 2}x{32-2464, 2} [video4linux2,v4l2 @ 0x24191c0] Raw : Unsupported : Y/CrCb 4:2:0 : {32-3280, 2}x{32-2464, 2} [video4linux2,v4l2 @ 0x24191c0] Raw : bgr0 : 32-bit BGRA/X 8-8-8-8 : {32-3280, 2}x{32-2464, 2}

I was running the ffmpeg command with different parameters and ran into the below

*[AVFilterGraph @ 0x140aed0] Error initializing filter 'drawtext' with args 'fontfile=DroidSansMono.ttf: timecode=20:19:06:00: r=23.976: x=(w-tw)/2: y=h-(2*lh): fontcolor=white: box=1: boxcolor=0x00000099' Error reinitializing filters! Failed to inject frame into filter network: Invalid argument Error while processing the decoded data for stream #0:0 [video4linux2,v4l2 @ 0x1403220] Some buffers are still owned by the caller on close. Conversion failed!*

After the above, I am unable to get 1080p resolution

$ ffmpeg -f v4l2 -framerate 30 -video_size 1920x1080 -i /dev/video0 -f mpeg1video -t 15 output.ts

[video4linux2,v4l2 @ 0x2258230] The V4L2 driver changed the video from 1920x1080 to 640x480 [video4linux2,v4l2 @ 0x2258230] The driver changed the time per frame from 1/30 to 2/15 Input #0, video4linux2,v4l2, from '/dev/video0': Duration: N/A, start: 3263.443693, bitrate: 36864 kb/s Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 36864 kb/s, 7.50 fps, 7.50 tbr, 1000k tbn, 1000k tbc

And

$ ffmpeg -f v4l2 -list_formats all -i /dev/video0

Shows only 2 supported formats with reduced resolutions

[video4linux2,v4l2 @ 0x25091c0] Compressed: mjpeg : Motion-JPEG : 352x288 640x480 320x240 176x144 160x120 [video4linux2,v4l2 @ 0x25091c0] Raw : yuyv422 : YUYV 4:2:2 : 352x288 640x480 320x240 176x144 160x120

Any suggestions to return back to the previous state is much appreciated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.