<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 1 Jul 2020 at 12:06, Hamilton Tobon Mosquera <<a href="mailto:htobonm@eafit.edu.co">htobonm@eafit.edu.co</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi there,<br>
<br>
I'm struggling to get some simple code working. I'm trying to open the <br>
device /dev/video0 which is a camera module in a Rasperry pi. I already <br>
set up everything. I activated the camera in the Rasperry <br>
configurations. The module bcm2835-v4l2 is loaded. I can even record <br>
video using the ffmpeg command. But when I use the API function <br>
av_find_input_format("video4linux2"), it does not work. I tried with <br>
"v4l2" and "Video4Linux2". I tried calling avformat_open_input(..., <br>
"/dev/video0", ...) with "file:/dev/viode0" also, but none of these API <br>
calls work. Can you please help me?, I don't know what I'm missing.<br>
</blockquote></div><div class="gmail_quote"><br></div><div class="gmail_quote">Hi Hamilton, <br></div><div class="gmail_quote"><br></div><div class="gmail_quote">Looking at the code you may need to call avdevice_register_all(); first</div><div class="gmail_quote"><br></div><div class="gmail_quote">Andriy<br></div></div>