[Libav-user] Cannot find "video4linux2" format

Andriy Gelman andriy.gelman at gmail.com
Wed Jul 1 20:56:12 EEST 2020

On Wed, 1 Jul 2020 at 12:06, Hamilton Tobon Mosquera <htobonm at eafit.edu.co>

> Hi there,
> I'm struggling to get some simple code working. I'm trying to open the
> device /dev/video0 which is a camera module in a Rasperry pi. I already
> set up everything. I activated the camera in the Rasperry
> configurations. The module bcm2835-v4l2 is loaded. I can even record
> video using the ffmpeg command. But when I use the API function
> av_find_input_format("video4linux2"), it does not work. I tried with
> "v4l2" and "Video4Linux2". I tried calling avformat_open_input(...,
> "/dev/video0", ...) with "file:/dev/viode0" also, but none of these API
> calls work. Can you please help me?, I don't know what I'm missing.

Hi Hamilton,

Looking at the code you may need to call avdevice_register_all(); first

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20200701/f1b4be67/attachment.html>

More information about the Libav-user mailing list