v4l2loopback - gstreamer sink to write into v4l2 loopback devices
=================================================================
******************************************************************
*** ***
* IMPORTANT NOTICE *
* *
******************************************************************
* *
* "gst-v4l2loopback" is OBSOLETE, you do not need it anymore. *
* *
* instead, use the built-in GStreamer-module 'v4l2sink' with the *
* recent 'v4l2loopback' kernel module as found on *
* https://github.com/umlaeute/v4l2loopback *
* *
*** ***
******************************************************************
--- PREREQUISITES ---
you need a linux-kernel that has v4l2 support (anything >=2.6.0).
then you need the v4l2loopback kernel driver installed; get it from:
http://code.google.com/p/v4l2loopback/
and then you need gstreamer-0.10
--- INSTALL ---
you need autotools, a C-compiler (preferably gcc), gstreamer-headers and the
v4l2-headers (the latter should be available on any recent linux installation)
$ ./autogen.sh
$ make
$ make install
see the INSTALL file for more detailed instructions
--- RUN ---
once installed, there is a new gstreamer element called "v4l2loopback";
you can inspect it using:
$ gst-inspect v4l2loopback
a simple pipeline using v4l2loopback would be:
$ gst-launch videotestsrc ! ffmpegcolorspace ! v4l2loopback
--- NOTES ---
the framesize is negotiated at runtime; virtually any framesize should be
possible
the colorspace is currently fixed to YUY2 (aka YUYV); LATER this might be
negotiated via caps as well...
--- FORKS ---
this code could be considered a fork from the "v4lsink" project
(http://code.google.com/p/v4lsink/).
here's the reasons for the fork (most important first)
- v4lsink uses hardcoded values
v4lsink has both the loopback device hardcoded to /dev/video1 and the
dimensions hardcoded to 640x480;
first off, my loopback device is anything but /dev/video1, and i don't
want to recompile everytime i this changes
2nd, i don't know yet, but i guess i want variable dimensions as well
- v4lsink is written in vala
i currently don't have the time to learn another language; i'm a
C-hacker; given that vala generates C-code which is then compiled, i
found myself staring at the generated C-code more often than at the
actual source code. this is not how i think, programming should be done.
- v4lsink doesn't produce a gstreamer element, but rather a wrapper application
i want to launch
$ gst-launch videosrc ! v4l2loopback
rather than
$ v4l2sink 'videosrc ! V4l2Loopback'
we already have a launcher, why do we need another one; and how to use
the pipeline in other frameworks?
note: this is mainly due to the way how everything compiles; if i knew
more about vala (see above), it would certainly be possibly to generate
a nice gst-element as well...