Cannot use ffmpeg with Arducam IMX462?

  1. Where did you get the camera module(s)? uctronics

  2. Model number of the product(s)? imx462 low light camera

  3. What hardware/platform were you working on? rPi 3A+

Is it impossible to stream video from the IMX462 camera using ffmpeg? ffmpeg supports the v4l2 driver but the device only provides RG10 and pRAA bayer formats and I don’t see any way for ffmpeg to debayer them into something I can feed into v4l2h264enc for example. Is there something I’m missing or is the camera simply not usable with ffmpeg?

E.g.:

$ v4l2-ctl --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
        Type: Video Capture

        [0]: 'pRAA' (10-bit Bayer RGRG/GBGB Packed)
                Size: Discrete 1920x1080
        [1]: 'RG10' (10-bit Bayer RGRG/GBGB)
                Size: Discrete 1920x1080
$ ffmpeg -hide_banner -f v4l2 -s 1920x1080 -r 10 -i /dev/video0 -c:v h264_omx -b:v 4M
-an -f rtsp rtsp://localhost:8000/live/stream
[video4linux2,v4l2 @ 0xf51220] Cannot find a proper format for codec 'none' (id 0), pixel format 'none' (id -1)
Assertion *codec_id != AV_CODEC_ID_NONE failed at src/libavdevice/v4l2.c:811
Aborted
$ ffmpeg -hide_banner -f v4l2 -s 1920x1080 -r 10 -i /dev/video0 -c:v v4l2h264enc -b:v
4M -an -f rtsp rtsp://localhost:8000/live/stream
[video4linux2,v4l2 @ 0x1d36220] Cannot find a proper format for codec 'none' (id 0), pixel format 'none' (id -1)
Assertion *codec_id != AV_CODEC_ID_NONE failed at src/libavdevice/v4l2.c:811
Aborted

Hi @tve
FFMPEG does not support Bayer format, maybe you can try gstreamer?:

ffmpeg is very popular and useful. A camera that doesn’t support it is pretty handicapped…
Also, gstreamer doesn’t work that much better. I have not figured out how to use it with v4l2src due to the same debayer issues. It does work to some degree with libcamerasrc but that doesn’t provide the type of DMA control that v4l2src provides, nor does it provide any camera control parameters. I’m still trying to get something reasonable going with libcamerasrc and will post the issues I’m hitting. I’ve seen the examples you linked and they’re too trivial to be useful.