twam / v4l2grab Goto Github PK
View Code? Open in Web Editor NEWutility 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
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
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]
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.
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.
Why ist v4l2grab using a 4 stage buffer (req.count = 4) if it actually just writes one picture into a jpeg file?
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).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.