raspberrypi / rpicam-apps

BSD 2-Clause "Simplified" License
419 stars 228 forks source link

[BUG] ERROR: unrecognised option '--libav-format' #735

Closed ben-xD closed 3 weeks ago

ben-xD commented 1 month ago

Describe the bug Reading the current docs and github issues, I see commands like rpicam-vid --codec libav --libav-format avi --libav-audio --output example.avi (link).

However, this doesn't work, I get ERROR: *** unrecognised option '--libav-format' ***

libav integration might not have been enable for Raspberry pi 5? There is no docs or warnings about this. It's not clear if enabling that would work for me.

Versions

$rpicam-vid --version
rpicam-apps build: v1.5.2 a8ccf9f3cd9d 03-10-2024 (22:33:20)
libcamera build: v0.3.2+27-7330f29b

Even libav is not recognised:

$ rpicam-vid --codec libav
[0:19:30.066663100] [1223]  INFO Camera camera_manager.cpp:325 libcamera v0.3.2+27-7330f29b
[0:19:30.077812816] [1228]  INFO RPI pisp.cpp:695 libpisp version v1.0.7 28196ed6edcf 29-08-2024 (16:33:32)
[0:19:30.092804882] [1228]  INFO RPI pisp.cpp:1154 Registered camera /base/axi/pcie@120000/rp1/i2c@88000/ov5647@36 to CFE device /dev/media2 and ISP device /dev/media0 using PiSP variant BCM2712_C0
Preview window unavailable
Mode selection for 640:480:12:P
    SGBRG10_CSI2P,640x480/0 - Score: 1000
    SGBRG10_CSI2P,1296x972/0 - Score: 1287
    SGBRG10_CSI2P,1920x1080/0 - Score: 1636.67
    SGBRG10_CSI2P,2592x1944/0 - Score: 1854
Stream configuration adjusted
[0:19:30.095903010] [1223]  INFO Camera camera.cpp:1197 configuring streams: (0) 640x480-YUV420 (1) 640x480-GBRG_PISP_COMP1
[0:19:30.096078065] [1228]  INFO RPI pisp.cpp:1450 Sensor: /base/axi/pcie@120000/rp1/i2c@88000/ov5647@36 - Selected sensor format: 640x480-SGBRG10_1X10 - Selected CFE format: 640x480-PC1g
ERROR: *** Unrecognised codec libav ***
ben-xD commented 1 month ago

Maybe it's related to me using a headless version raspberry pi os. Judging by the advanced docs in building rpicam-apps, perhaps Denable_libav=disabled was set for the library. So I built it locally with the flag enabled.

Unfortunately I get the same errors

naushir commented 1 month ago

Maybe it's related to me using a headless version raspberry pi os. Judging by the advanced docs in building rpicam-apps, perhaps Denable_libav=disabled was set for the library. So I built it locally with the flag enabled.

If you installed the lite OS variant, you won't get the libav libraries installed. You can change this by doing something like:

sudo apt purge rpicam-apps-lite
sudo apt install rpicam-apps

and that should install all the libav libraries and rpicam-apps support.

ben-xD commented 3 weeks ago

Thanks I haven't been able to test it because my RPi5 was bricked after installing and building some libraries (it stopped turning on the next day). A replacement has been sent and ill test it soon :)

naushir commented 3 weeks ago

Closing now. Feel free to reopen if you run into any issues.