1

I'm attempting to run the sample command found here for streaming video data to an mp4 container using libcamera-vid and the libav integration. I have the latest Raspberry Pi OS Lite installed using the Raspberry Pi Imager and all packages upgraded to latest. When I run:

libcamera-vid --codec libav -o test.mp4

I receive the following:

ERROR: *** unrecognised codec libav ***

I can't find anywhere in the documentation or online how to resolve this issue. I've tried installing libavcodec-dev, libavcodec58, and libavcodec-extra58 to no avail. What do I need to install so that I can run the above command, which is found in the docs for libcamera-vid?

3
  • You cannot used mp4(this is for cv2.VideoCapture). When using libvav, you use mkv or raw. Jul 25, 2022 at 12:19
  • 1
    @toyotaSupra according to the docs: "These output formats can be specified as containers (e.g. mkv, mp4, avi) or stream output (e.g. h264 or mpegts)." Jul 25, 2022 at 14:08
  • 1
    You are right. I scroll at the bottom. Actually, I'm using picamera2 Jul 25, 2022 at 14:58

1 Answer 1

6

You need to install the full libcamera-apps package, Raspberry Pi OS Lite only ships with libcamera-apps-lite.

libav based functionality got removed from libcamera-apps-lite because it pulls in X11 dependencies (relevant bug report).

1
  • 1
    Great to know, thank you! Would be wonderful if they added that relevant bit to the libav section of the docs. Aug 4, 2022 at 16:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.