[Libav-user] Recent ffmpeg version doesn't support v4l2

Leandro Santiago leandrosansilva at gmail.com
Mon Jun 20 15:31:38 CEST 2011


Oh, wait. I tested my application with ffmpeg 0.7-rc and it worked.
But didin't worked with ffmpeg from master.

I read you're breaking v4l protocol support in libav. Did you change
something related to v4l2?

2011/6/20 Leandro Santiago <leandrosansilva at gmail.com>:
> I don't now...
> Today I tried to compile three different versions of ffmpeg and test
> them: 0.6.3, 0.7-rc1 and from master branch.
>
> I didn't try to compile my application with version 0.6 (it uses newer
> libav* API), but the ffplay, using the command...
>
> $ ./ffplay -f video4linux2 /dev/video2
>
> ... worked only with ffmpeg 0.6 series. Here are the output:
>
> devstar22 at devstar22-desktop:~/projects/3rd/ffmpeg-0.6.3$ ./ffplay -f
> video4linux2 /dev/video2
> FFplay version 0.6.3, Copyright (c) 2003-2010 the FFmpeg developers
>  built on Jun 20 2011 09:01:12 with gcc 4.4.5
>  configuration: --disable-gpl --enable-static --enable-libvpx
> --disable-libschroedinger --disable-libtheora
> --prefix=/home/devstar22/projects/build_optm --enable-pthreads
> --extra-cflags='-I/home/devstar22/projects/build_optm/include -O3'
> --enable-extra-warnings
> --extra-ldflags=-L/home/devstar22/projects/build_optm/lib/
>  libavutil     50.15. 1 / 50.15. 1
>  libavcodec    52.72. 2 / 52.72. 2
>  libavformat   52.64. 2 / 52.64. 2
>  libavdevice   52. 2. 0 / 52. 2. 0
>  libswscale     0.11. 0 /  0.11. 0
> [video4linux2 @ 0x8eed640]Estimating duration from bitrate, this may
> be inaccurate
> Input #0, video4linux2, from '/dev/video2':
>  Duration: N/A, start: 1308571289.499852, bitrate: 92160 kb/s
>    Stream #0.0: Video: rawvideo, yuv420p, 640x480, 92160 kb/s, 25
> tbr, 1000k tbn, 25 tbc
> ^C^C^Z1298.78 A-V:  0.000 s:0.4 aq=    0KB vq=    0KB sq=    0B f=0/116
>
> i'm sure my cameras use the v4l2 protocol. So I really don't know what
> is happening.
>
> My pc has a video capture board with 8 inputs (/dev/video{0..7}) but
> I'm using only three of them (/dev/video{2,3,5}).
>
> I compiled libav as a normal user and didn't execute make install
> command, because I'm testing the ffplay from the build dir.
>
> 2011/6/18 Alex Cohn <alexcohn at netvision.net.il>:
>> Could this be related to the requirement to build ffmpeg as superuser?
>> Alex
>>
>> On Saturday, June 18, 2011, Leandro Santiago <leandrosansilva at gmail.com> wrote:
>>> Hello to all.
>>>
>>> Some days ago, after I got lastest ffmpeg source, ffmpeg stoped to
>>> work with my v4l2 cameras. They're using the bttv module (ubuntu 10.10
>>> ia32).
>>>
>>> The ffplay's output:
>>>
>>> $ ./ffplay -f video4linux2 /dev/video0
>>> ffplay version git-N-30818-g369c68c, Copyright (c) 2003-2011 the
>>> FFmpeg developers
>>>  built on Jun 17 2011 12:16:37 with gcc 4.4.5
>>>  configuration: --disable-gpl --enable-static --enable-libvpx
>>> --disable-libschroedinger --disable-libtheora
>>> --prefix=/home/devstar22/projects/build_optm --enable-pthreads
>>> --extra-cflags='-I/home/devstar22/projects/build_optm/include -O3
>>> -msse3 -mfpmath=sse -march=core2' --enable-extra-warnings
>>> --extra-ldflags=-L/home/devstar22/projects/build_optm/lib
>>>  libavutil    51.  8. 0 / 51.  8. 0
>>>  libavcodec   53.  7. 0 / 53.  7. 0
>>>  libavformat  53.  3. 1 / 53.  3. 1
>>>  libavdevice  53.  1. 1 / 53.  1. 1
>>>  libavfilter   2. 18. 0 /  2. 18. 0
>>>  libswscale    0. 14. 1 /  0. 14. 1
>>> [video4linux2 @ 0x95d57a0] ioctl set time per frame(1/25) failed
>>> [video4linux2 @ 0x95d57a0] Could not find codec parameters (Invalid
>>> Codec type -1)
>>> [video4linux2 @ 0x95d57a0] Estimating duration from bitrate, this may
>>> be inaccurate
>>> /dev/video0: could not find codec parameters
>>>
>>> Why does it happen? Have you broken the v4l2 support? I'm sure ffmpeg
>>> was compiled with v4l2 support, so I really don't know why it happens.
>>>
>>> That behavior also happens in my application, using libavformat api.
>>> When I open the device passing a AVInputFormat correct confiured to
>>> input "video4linux2", the call av_open_input_file has success (returns
>>> 0), but prints on screen:
>>>
>>> [video4linux2 @ 0x95d57a0] ioctl set time per frame(1/25) failed
>>>
>>> And when I call av_find_stream_info(), it returns the -1 code and
>>> print on screen:
>>>
>>> [video4linux2 @ 0x95d57a0] Could not find codec parameters (Invalid
>>> Codec type -1)
>>> [video4linux2 @ 0x95d57a0] Estimating duration from bitrate, this may
>>> be inaccurate
>>>
>>> Obs: when I use the ffplay and libav* libraries installed globally in
>>> the system (via ubuntu repositories), ffplay opens the cameras
>>> normally.
>>>
>>> Best wishes.
>>> _______________________________________________
>>> Libav-user mailing list
>>> Libav-user at ffmpeg.org
>>> http://ffmpeg.org/mailman/listinfo/libav-user
>>>
>> _______________________________________________
>> Libav-user mailing list
>> Libav-user at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/libav-user
>>
>


More information about the Libav-user mailing list