[Libav-user] Cannot find "video4linux2" format

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Libav-user] Cannot find "video4linux2" format

Hamilton Tobon Mosquera
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.

Thanks.

Hamilton.

_______________________________________________
Libav-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Cannot find "video4linux2" format

Carl Eugen Hoyos-2
Am Mi., 1. Juli 2020 um 18:06 Uhr schrieb Hamilton Tobon Mosquera
<[hidden email]>:

> 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.

Did you already test with ffmpeg (the application) to find out where
the issue lies?

Carl Eugen
_______________________________________________
Libav-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Cannot find "video4linux2" format

Andriy Gelman
In reply to this post by Hamilton Tobon Mosquera


On Wed, 1 Jul 2020 at 12:06, Hamilton Tobon Mosquera <[hidden email]> wrote:
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

Andriy

_______________________________________________
Libav-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".