[Ffmpeg-devel] v4l2 - how to use?

Erik Slagter erik
Tue Feb 7 13:10:46 CET 2006


On Tue, 2006-02-07 at 13:02 +0100, Zoltan NAGY wrote:
> hello!
> 
> how to use it? :)
> 
> I mean..
> debian:~/ffmpeg# dd if=/dev/video of=testfile bs=1M count=10
> 0+10 records in
> 0+10 records out
> 2304000 bytes transferred in 1.175447 seconds (1960105 bytes/sec)
> debian:~/ffmpeg# ./ffplay testfile
> testfile: Unknown format
> debian:~/ffmpeg# ffmpeg -i testfile
> FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
>   configuration:  --enable-shared --disable-strip
>   libavutil version: 49.0.0
>   libavcodec version: 51.1.0
>   libavformat version: 50.0.0
>   built on Feb  7 2006 12:42:28, gcc: 3.3.6 (Debian 1:3.3.6-7)
> testfile: Unknown format
> debian:~/ffmpeg#
> 
> it's today's CVS..
> 
> what am I missing here?

You're missing here that a dd from a video device delivers raw video
frames without any encapsulation whatsoever. FFmpeg cannot guess what it
is, there is nothing in the file to describe it. Besides that you need
to set all sort of things on the video device (using ioctl()) before
anything useful is returned, you cannot simply read(). Moreover, the
read() interface of v4l2 is way to slow to deliver >10 fps.

Just use the v4l2 import function of FFmpeg instead.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2771 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060207/2db57a2d/attachment.bin>



More information about the ffmpeg-devel mailing list