16MP Autofocus IMX519 - Slow FPS on OctoPi

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

  2. Model number of the product(s)?
    IMX519

  3. What hardware/platform were you working on?
    Raspberry Pi 3B+ with OctoPi RC

  4. Instructions you have followed. (link/manual/etc.)
    Solution Of Using Autofocus Camera On OctoPrint - Arducam
    16MP Autofocus Camera - Common Issues & Fixes - Arducam

  5. Problems you were having?
    The IMX519 shows up and can take pictures, stream video, etc, however it is not showing 1080p@30fps as advertised, or even 640x480@60fps.

  6. The dmesg log from your hardware?
    [ 9.928266] vc4-drm soc:gpu: bound 3f400000.hvs (ops vc4_hvs_ops [vc4])
    [ 9.935823] Registered IR keymap rc-cec
    [ 9.936177] rc rc0: vc4 as /devices/platform/soc/3f902000.hdmi/rc/rc0
    [ 9.936456] input: vc4 as /devices/platform/soc/3f902000.hdmi/rc/rc0/input2
    [ 9.947279] vc4-drm soc:gpu: bound 3f902000.hdmi (ops vc4_hdmi_ops [vc4])
    [ 9.947804] vc4-drm soc:gpu: bound 3f004000.txp (ops vc4_txp_ops [vc4])
    [ 9.948169] vc4-drm soc:gpu: bound 3f206000.pixelvalve (ops vc4_crtc_ops [vc4])
    [ 9.948586] vc4-drm soc:gpu: bound 3f207000.pixelvalve (ops vc4_crtc_ops [vc4])
    [ 9.949088] vc4-drm soc:gpu: bound 3f807000.pixelvalve (ops vc4_crtc_ops [vc4])
    [ 9.949457] vc4-drm soc:gpu: bound 3fc00000.v3d (ops vc4_v3d_ops [vc4])
    [ 9.961687] [drm] Initialized vc4 0.0.0 20140616 for soc:gpu on minor 0
    [ 9.962296] vc4-drm soc:gpu: [drm] Cannot find any crtc or sizes
    [ 10.276651] ak7375: loading out-of-tree module taints kernel.
    [ 10.323231] imx519 10-001a: Device found is imx519
    [ 10.326735] imx519 10-001a: Consider updating driver imx519 to match on endpoints

  7. Troubleshooting attempts you’ve made?
    I’ve tried to set up hardware decoding instead of MJPEG via HLS and was told it’s unsupported in the new builds because they removed H264 OMX encoder for H264 M2M, tried changing picture quality, resolution, etc. Slight uptick in speed at lower resolutions and quality but still not getting the advertised speeds.

  8. What help do you need?
    I just want to get the IMX519 to take photos and videos at the speed advertised within OctoPi. That’s it, that’s all.

Sadly, like you said, MJPEG encoding is currently a software encoding, so its speed may not be ideal. But I tested it on Pi4, although the CPU usage is relatively high, it should be able to reach 1080p@30 (I used libcamera-vid+gstreamer for testing)

So what do I do if I only have a Pi 3B+ and am trying to get the correct FPS within an OctoPrint install? Is there a guide for setting this alternative up?