Coder Social home page Coder Social logo

twam / v4l2grab Goto Github PK

View Code? Open in Web Editor NEW
174.0 18.0 99.0 46 KB

utility for grabbing JPEGs from V4L2 devices

Home Page: http://www.twam.info/linux/v4l2grab-grabbing-jpegs-from-v4l2-devices

License: GNU General Public License v2.0

Shell 1.05% C 98.95%

v4l2grab's Introduction

v4l2grab

Travis GitHub license

This is a small command line utility for grabbing JPEGs form V4L2 devices (e.g. USB webcams).

For installation, follow the instructions into the GitHub Wiki.

Try ./v4l2grab -h or just v4l2grab if you have installed it to get some help.

If your webcam works, please add it to the Compatible Devices table.

v4l2grab's People

Contributors

grifball avatar hustcalm avatar lemoneer avatar martinsavc avatar mrflow avatar stapelberg avatar sv99 avatar twam avatar yann-morin-1998 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

v4l2grab's Issues

make[1]: Leaving directory `/root/v4l2grab'

When running make, i get the following error;

root@beaglebone:~/v4l2grab# make
make all-am
make[1]: Entering directory /root/v4l2grab' gcc -DHAVE_CONFIG_H -I. -g -O2 -MT v4l2grab.o -MD -MP -MF .deps/v4l2grab.Tpo -c -o v4l2grab.o v4l2grab.c mv -f .deps/v4l2grab.Tpo .deps/v4l2grab.Po gcc -DHAVE_CONFIG_H -I. -g -O2 -MT yuv.o -MD -MP -MF .deps/yuv.Tpo -c -o yuv.o yuv.c mv -f .deps/yuv.Tpo .deps/yuv.Po gcc -g -O2 -o v4l2grab v4l2grab.o yuv.o -lv4l2 -ljpeg make[1]: Leaving directory/root/v4l2grab'

I am installing it on BeagleBone Black Rev C running Debian Wheezy, 3.8.13-bone79.

YUVtoRGB-conversion unnecessary

Since JPEG stores data in the YCbCr-Colorspace [http://en.wikipedia.org/wiki/JFIF#Color_space], the conversion from YUVxyz to RGB is unnecessary. libjpeg(-turbo) is capable of storing YUV444 (JCS_YCbCr). This still requires conversion from most v4l2-devices, but mostly only from YUVxyz to YUV444 which is a lot less computationally intensive than YUV to RGB.

Interval option has random results.

When trying to use the interval option, I'm getting some odd results. Interval of 1 or 2 works fine. However, with interval 3:

v4l2grab -q 100 -W 2592 -H 1944 --interval 3 -c -o test

It only takes 2 images every second, not three. If I then change interval to 4 or higher, it just takes the maximum images per second it can (between 5 and 6 for max resolution, higher if I set the resolution lower).

Any ideas what's going on? I need to set the interval to 4 if possible (I know it won't be exact, but I need approximately 4 images per second).

compilation error, YUV420toYUV444 function is missing

compilation error:

$ gcc v4l2grab.c -o v4l2grab -Wall -ljpeg -lv4l2 -DIO_READ -DIO_MMAP -DIO_USERPTR

/tmp/user/1000/ccIvliiI.o: In function `imageProcess':
v4l2grab.c:(.text+0x374): undefined reference to `YUV420toYUV444'
collect2: error: ld returned 1 exit status

Having gcc v7.3 and following v4l packages installed:

$ apt list --installed | grep v4l

libv4l-0/bionic,now 1.14.2-1 amd64 [installed]
libv4l-dev/bionic,now 1.14.2-1 amd64 [installed]
libv4l2rds0/bionic,now 1.14.2-1 amd64 [installed]
libv4lconvert0/bionic,now 1.14.2-1 amd64 [installed]
v4l-conf/bionic,now 3.103-4build1 amd64 [installed]
v4l-utils/bionic,now 1.14.2-1 amd64 [installed]
v4l2loopback-dkms/bionic,bionic,now 0.10.0-1ubuntu1 all [installed]
v4l2loopback-source/bionic,bionic,now 0.10.0-1ubuntu1 all [installed]
v4l2loopback-utils/bionic,now 0.10.0-1ubuntu1 amd64 [installed]
v4l2ucp/bionic,now 2.0.2-4build1 amd64 [installed]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.