umlaeute / v4l2loopback Goto Github PK
View Code? Open in Web Editor NEWv4l2-loopback device
License: GNU General Public License v2.0
v4l2-loopback device
License: GNU General Public License v2.0
I read the previous issue regarding this error, but it unfortunately didn't seem to help.
I'm getting the following error
$ ./yuv4mpeg_to_v4l2 < pipe
G_FMT: Invalid argument
[exit]
The error doesn't happen immediately. I pipe video from another terminal and that's when it gives the error. As soon as playing begins the error appears and yuv4mpeg_to_v4l2 exits.
I tried running yuv4mpeg_to_v4l2 as root, but same results. The video commands I have tried:
mplayer sample_vid.mp4 -vo yuv4mpeg:file=./pipe -nosound
mplayer sample_vid.mp4 -vf scale=320:240 -vo yuv4mpeg:file=./pipe -nosound
mplayer sample_vid.mp4 -vf scale=160:120 -vo yuv4mpeg:file=./pipe -nosound
I've also tried other video files, but the results are all the same.
EDIT:
Just to clarify a couple things. I am using a fifo pipe.
$ ll pipe
prw-r--r-- 1 a a 0 Jun 6 19:48 pipe
Also, the program exits immediately as video playing begins without delay.
From git://linuxtv.org/v4l-utils.git
There is a compliance test that do sanity check on devices. It's usually not a big problem if some tests fails, but in this case, the driver crash, so I thought it would be worth reporting.
[50377.528006] Call Trace: [50377.528006] [] v4l_s_parm+0x3a/0x50 [videodev] [50377.528006] [] __video_do_ioctl+0x2cc/0x360 [videodev] [50377.528006] [] ? wake_up_worker+0x24/0x30 [50377.528006] [] ? __kmalloc+0x55/0x240 [50377.528006] [] video_usercopy+0x22e/0x5b0 [videodev] [50377.528006] [] ? v4l_dqevent+0x20/0x20 [videodev] [50377.528006] [] ? remove_wait_queue+0x31/0x40 [50377.528006] [] ? n_tty_write+0x3aa/0x530 [50377.528006] [] video_ioctl2+0x15/0x20 [videodev] [50377.528006] [] v4l2_ioctl+0x11b/0x150 [videodev] [50377.528006] [] do_vfs_ioctl+0x2e0/0x4a0 [50377.528006] [] ? __schedule+0x2e2/0x740 [50377.528006] [] SyS_ioctl+0x81/0xa0 [50377.528006] [] ? __audit_syscall_exit+0x1f6/0x2a0 [50377.528006] [] system_call_fastpath+0x16/0x1b [50377.528006] Code: f8 01 74 05 83 f8 02 75 7c 48 8b 43 0c bf e8 03 00 00 49 89 84 24 d0 00 00 00 e8 e6 55 98 e0 8b 53 0c 8b 4b 10 48 0f af c2 31 d2 <48> f7 f1 ba 01 00 00 00 48 85 c0 48 0f 45 d0 49 8b 84 24 c8 00 [50377.528006] RIP [] vidioc_s_parm+0x66/0x110 [v4l2loopback] [50377.528006] RSP
I wanted to directly write OpenCV image objects (Iplimage) to the device but when I do, I can not read the device from a webcam viewer like luvcview. luvcview throws the following error.
ERROR: Requested frame format MJPG is not available and no fallback
format was found.
or
Stream settings:
Frame format: YUYV (MJPG is not supported by device)
Frame size: 520x474 (requested size 640x480 is not supported by device)
Frame rate: 30 fps
It looks as if the device does not support any other format other than YUYV.
Thanks
installed on
root@e300gent:~# uname -a
Linux e300gent 3.2.0-17-generic #27-Ubuntu SMP Fri Feb 24 15:37:36 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
root@e300gent:# modprobe v4l2loopback video_nr=5# dmesg
FATAL: Error inserting v4l2loopback (/lib/modules/3.2.0-17-generic/updates/dkms/v4l2loopback.ko): Unknown symbol in module, or unknown parameter (see dmesg)
root@e300gent:
[ 361.277887] v4l2loopback: Unknown parameter `video_nr'
Help!!!!
With the Skype version 2.2.0.35 I cannot get this to work (All other programs I tried work perfectly).
The video device is recognized, but no video is shown.
Apparently other people experience this as well:
http://community.skype.com/t5/Linux/New-version-doesn-t-work-with-v4l2loopback/td-p/176764
Skype does not give any error messages. Is it possible to generate some debug output?
Can be removed. See https://bugzilla.gnome.org/show_bug.cgi?id=681491
Building v4l2-loopback driver...
make -C /lib/modules/uname -r
/build M=/home/fgaw/Downloads/Software/v4l2loopback modules
make[1]: Entering directory /usr/src/linux-3.6.2-gentoo' CC [M] /home/fgaw/Downloads/Software/v4l2loopback/v4l2loopback.o /home/fgaw/Downloads/Software/v4l2loopback/v4l2loopback.c: In function ‘init_buffers’: /home/fgaw/Downloads/Software/v4l2loopback/v4l2loopback.c:2027:6: error: ‘struct v4l2_buffer’ has no member named ‘input’ make[2]: *** [/home/fgaw/Downloads/Software/v4l2loopback/v4l2loopback.o] Error 1 make[1]: *** [_module_/home/fgaw/Downloads/Software/v4l2loopback] Error 2 make[1]: Leaving directory
/usr/src/linux-3.6.2-gentoo'
make: *** [v4l2loopback.ko] Error 2
I am installed Linux kernel 3.7.1 from tarball.
v4l2loopback 0.6.1 is no error in compiling, installing and modprobing. but outputing video stream to v4l2loopback device with gst-launch-0.10 occurd error. It is no error in Linux Kernel 3.6.10.
$ LANG=C gst-launch-0.10 videotestsrc ! ffmpegcolorspace ! v4l2sink
Setting pipeline to PAUSED ...
libv4l2: error getting pixformat: Invalid argument
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Could not negotiate format
Additional debug info:
gstbasesrc.c(2830): gst_base_src_start (): /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0:
Check your filtered caps, if any
Setting pipeline to NULL ...
Freeing pipeline ...
I checked both, differnce in v4l2-ctl outout:
On 3.7.1
$ v4l2-ctl --all -d /dev/video1
Driver Info (not using libv4l2):
Driver name : v4l2 loopback
Card type : Dummy video device
Bus info :
Driver version: 0.6.1
Capabilities : 0x05000003
Video Capture
Video Output
Read/Write
Streaming
Video Standard = 0x00ffffff
PAL-B/B1/G/H/I/D/D1/K/M/N/Nc/60
NTSC-M/M-JP/443/M-KR
SECAM-B/D/G/H/K/K1/L/Lc
Streaming Parameters Video Capture:
Frames per second: 30.000 (30/1)
Read buffers : 8
On 3.6.10
$ v4l2-ctl --all -d /dev/video1
Driver Info (not using libv4l2):
Driver name : v4l2 loopback
Card type : Dummy video device
Bus info :
Driver version: 0.6.1
Capabilities : 0x05000003
Video Capture
Video Output
Read/Write
Streaming
Format Video Output:
Width/Height : 0/0
Pixel Format : 'BGR4'
Field : None
Bytes per Line: 0
Size Image : 0
Colorspace : SRGB
Video output: 0 (loopback in)
Video Standard = 0x00ffffff
PAL-B/B1/G/H/I/D/D1/K/M/N/Nc/60
NTSC-M/M-JP/443/M-KR
SECAM-B/D/G/H/K/K1/L/Lc
Streaming Parameters Video Capture:
Frames per second: 30.000 (30/1)
Read buffers : 8
Streaming Parameters Video Output:
Frames per second: 30.000 (30/1)
Write buffers : 8
Thanks.
I've created a dkms package to make installation easier. Currently building on ubuntu 10.10, the plan is to add it to a ppa until it works it's way into debian.
I am using v4l2loopback-0.5.0 on Fedora 15 2.6.41.4-1.fc15.x86_64.
Because I have a defective (by design) webcam (Creative VF0700 Live! Cam Chat HD (041e:4088), I need to take the output of its video stream in real time and reformat it to be 15 fps. It refuses to produce at a spec of less than 20 fps.
So I plan to use the v4l2loopback and ffmpeg to reformat the stream. I use this command line
ffmpeg -f video4linux2 -i /dev/video0 -r 15 -f yuv4mpegpipe -pix_fmt yuv420p - | yuv4mpeg_to_v4l2 /dev/video1
This works quite well when I look at /dev/video1 with guvcview, and when I see my own video output in skype.
But the other side of a skype conversation sees the video as running very very slowly much of the time, and getting many seconds out of sync at times.
My non expert speculative guess about what is happening is this: when I look at the camera setting options provided by guvcview, normally it provides many frame rates I can choose from. But when I look at the loopback device as above, it says the frame rate is fixed at 1. That is ONE fps! Despite the fact that guvcview observes a frame rate of around 15 as it should be.
I suspect that skype is confused by this when it is processing the video. If it reads the same camera capacities that guvcview does, it thinks the video is coming at 1 fps and should be delivered at 1 fps. once it gets a few frames that really cover only a short time, it can spread them out over a very long time. This would explain the appearance.
So perhaps if I could set the fps rate so that guvcview reports it as what it is supposed to be (15 fps, in the above command line, skype will also work.
Could there be an option to set this frame rate as a module parameter, for example, like in the older avld?
Hi !
I've found a bug and deleted it.
Now working but problem not solved with code lines missing.
All explication on my blog!
http://lebuste.blogspot.fr/2012/10/v4l2loopback-on-skype.html
Thanks!
I'm using an 8-channel video capture card that doesn't support multiple sinks and I'm trying to use v4l2loopback so that gstreamer can display multiple copies of the video source. I'm also using Ubuntu 12.04 LTS on a quad-core i7.
Release 0.4.1 installs and I'm able to generate the desired multiple video streams. Unfortunately, when I start the second sink from one of the v4l2loopback devices the first video stream freezes. Sometimes it will recover after many seconds (measured 23 and 32 seconds). Sometimes the second video stream starts in a frozen state and neither recovers (stopped after 1 minute, although it restarted immediately when the second stream was killed)
I've tried using 0.5.0, 0.6.1, and 0.6.2, but I'm getting errors from them that I don't get from 0.4.1.
I'm doing the following to configure 0.4.1:
sudo modprobe v4l2loopback devices=8 max_buffers=8
I'm starting the v4l2loopback device using:
gst-launch-0.10 v4l2src device=/dev/video7 ! deinterlace method=linear ! v4l2sink device=/dev/video15
Note: This will not work without the "deinterlace" element.
I'm starting the displays using:
gst-launch-0.10 v4l2src device=/dev/video15 ! xvimagesink display=:0.0
git clone https://github.com/umlaeute/v4l2loopback.git
Cloning into 'v4l2loopback'...
remote: Counting objects: 1114, done.
remote: Compressing objects: 100% (593/593), done.
remote: Total 1114 (delta 548), reused 1058 (delta 493)
Receiving objects: 100% (1114/1114), 603.33 KiB | 193 KiB/s, done.
Resolving deltas: 100% (548/548), done.
---------- that's OK ---------
cd v4l2loopback
make
Building v4l2-loopback driver...
make -C /lib/modules/uname -r
/build M=/home/switcher/vloopback/v4l2loopback modules
make[1]: Entering directory /usr/src/linux-3.4.6-2.10-obj/x86_64/desktop' CC [M] /home/switcher/vloopback/v4l2loopback/v4l2loopback.o Building modules, stage 2. MODPOST 1 modules CC /home/switcher/vloopback/v4l2loopback/v4l2loopback.mod.o LD [M] /home/switcher/vloopback/v4l2loopback/v4l2loopback.ko make[1]: Leaving directory
/usr/src/linux-3.4.6-2.10-obj/x86_64/desktop'
-------- seems OK ---------
make install
make -C /lib/modules/uname -r
/build M=/home/switcher/vloopback/v4l2loopback modules_install
make[1]: Entering directory /usr/src/linux-3.4.6-2.10-obj/x86_64/desktop' INSTALL /home/switcher/vloopback/v4l2loopback/v4l2loopback.ko DEPMOD 3.4.6-2.10-desktop make[1]: Leaving directory
/usr/src/linux-3.4.6-2.10-obj/x86_64/desktop'
depmod -ae
WARNING: -e needs -E or -F
.... and NO video loopback device installed :-(
my s.o. is opensuse 12.2
need it to broadcast from linux webcam studio ......
Sources do not compile after a new git clone on kernel 2.6.32-5-amd64 (Debian Squeeze):
Building v4l2-loopback driver...
make -C /lib/modules/uname -r
/build M=/home/lehmann/tmp/v4l2loopback modules
make[1]: Entering directory /usr/src/linux-headers-2.6.32-5-amd64' CC [M] /home/lehmann/tmp/v4l2loopback/v4l2loopback.o /home/lehmann/tmp/v4l2loopback/v4l2loopback.c: In function ‘allocate_timeout_image’: /home/lehmann/tmp/v4l2loopback/v4l2loopback.c:2050: error: implicit declaration of function ‘vzalloc’ /home/lehmann/tmp/v4l2loopback/v4l2loopback.c:2050: warning: assignment makes pointer from integer without a cast make[4]: *** [/home/lehmann/tmp/v4l2loopback/v4l2loopback.o] Fehler 1 make[3]: *** [_module_/home/lehmann/tmp/v4l2loopback] Fehler 2 make[2]: *** [sub-make] Fehler 2 make[1]: *** [all] Fehler 2 make[1]: Leaving directory
/usr/src/linux-headers-2.6.32-5-amd64'
make: *** [v4l2loopback.ko] Fehler 2
As far as I know the function vzalloc has been introduced in kernel 2.6.37 in file include/linux/vmalloc.h and is unavailable in any earlier kernel. I'd much appreciate if you would revert to the older vmalloc/memset function calls.
Hello,
I am working on stream generator for my video mapping set, but I am not able to get the image steady.
I open a v4l2loopback device with python-v4l2 (http://pypi.python.org/pypi/v4l2) and generate a video stream through it based on png, so can generate live video's in my vj set and still video map them and apply effects.
Test case:
import fcntl, numpy
from v4l2 import *
from PIL import Image
height = 600
width = 634
device = open('/dev/video4', 'wr')
print(device)
capability = v4l2_capability()
print(fcntl.ioctl(device, VIDIOC_QUERYCAP, capability))
print("v4l2 driver: " + capability.driver)
format = v4l2_format()
format.type = V4L2_BUF_TYPE_VIDEO_OUTPUT
format.fmt.pix.pixelformat = V4L2_PIX_FMT_RGB32
format.fmt.pix.width = width
format.fmt.pix.height = height
format.fmt.pix.field = V4L2_FIELD_NONE
format.fmt.pix.bytesperline = format.fmt.pix.width * 4
format.fmt.pix.sizeimage = format.fmt.pix.width * format.fmt.pix.height * 4
format.fmt.pix.colorspace = V4L2_COLORSPACE_SRGB
print(fcntl.ioctl(device, VIDIOC_S_FMT, format))
img = Image.open('img/0.png')
img = img.convert('RGBA')
while True:
device.write(numpy.array(img))
The result is a proper colored and sized image, but it jumps every frame from left to right and always a little more to the left so you get a sliding and jumpy video result.
What am I doing wrong?
Best regards,
Harriebo
ps: if you woul like to see the results check: http://www.facebook.com/vjharriebo So far the LiVES, puredate, gem video mapping setup is working greath with the v4l2 streams.
Hello,
I have found that some applications—Flash included—can only use the first-visible v4l2loopback device when the "card type" values are the same. I don't know very much C, but I tried a little copy-paste edit—
<--- v4l2loopback.c 2013-02-03 21:22:39.086954847 -0600
+++ v4l2loopback.c.new 2013-02-03 21:32:52.718191178 -0600
@@ -570,7 +570,8 @@
struct v4l2_loopback_device *dev = v4l2loopback_getdevice(file);
strlcpy(cap->driver, "v4l2 loopback", sizeof(cap->driver));
- strlcpy(cap->card, "Dummy video device", sizeof(cap->card));
+ snprintf(cap->card, sizeof(cap->card), "v4l2loopback %d",
+ ((priv_ptr)video_get_drvdata(dev->vdev))->devicenr);
snprintf(cap->bus_info, sizeof(cap->bus_info), "v4l2loopback:%d",
((priv_ptr)video_get_drvdata(dev->vdev))->devicenr);
—and all of the v4l2loopback devices are now seen and are usable.
hello
i test your greate v4l2loopback all works fine with cheese :> but not with flash
flash getcamera only works with:
V4L2_PIX_FMT_BGR24
V4L2_PIX_FMT_YUYV
V4L2_PIX_FMT_YVU420
V4L2_PIX_FMT_YUV420M
with this formats i can access the flash camera maybe other works too dit not test all
so is it possible to convert the V4L2_PIX_FMT_YUV420 to flash working
V4L2_PIX_FMT_YVU420 ?
same problem with gst-launch can not get any other source working (filesrc,..)
only the videotestscr works fine with flash because of bgr24 -> bgr 24
simple
webcam test swf
http://peer-stream.com/api/Broadcaster.swf?myGroup=v4l2loopback
best regards
Hello,
Please Sorry this is no real issue but I would like to ask at the source if this would be possible with v4l2loopback.
I have a analog capture device (/dev/video0, PAL) and I want to have a liveview and an option to record at any time to some looseless codecs (maybe ffv1 or mjpeg).
Is it possible to redirect /dev/video0 to /dev/video1 to have a liveview with mplayer and have another terminal to record for example with ffmpeg/mencoder on /dev/video2?
Its would be the same principle as opening a capture device in VLC and press the record button, but I cant use VLC because it lacks of the possibility to control the output format and VLC cant be positioned by the standart "-geometry" value that I would like to use on a window-managerless X-Server. VLC outputs only as it comes in (by using the record button). In my case huge raw videos.
I'm attempting to use gstreamer, v4l2loopback and Skype 4.0 on Ubuntu 12.04 64.
I am able to see the video on the skype options but when I try to push the video on a call it causes Skype to coredump. I am trying to work with the Skype developers but at this point cannot solve it from the skype angle.
Update:
I found a user that has modified the v4l2loopback.c to make it work with skype for a particular camera. I use his modified version and I am able to get a distorted picture on skype and skype does not core dump.
Update:
I was able to get skype working by following your advice to use two devices for the format conversion.
Thanks for this fork!
I'm trying to stream video and screencaptures with this. Unfortunately, yuv4mpeg_to_v4l2 quits right after i send yuv data to the pipe:
./yuv4mpeg_to_v4l2 /dev/video0 < pipe
write: Success
Sometimes I see a short flickering on the v4l2 device when I start sending. I set this up according to https://github.com/umlaeute/v4l2loopback/wiki/Mplayer, tried sending data from mplayer as well as vlc.
Any idea?
with GStreamer you currently need the "gst-v4l2loopback" element, rather than being able to directly use "v4l2sink".
It seems that in some situations, devices that are both capture and output devices will be ignored by applications.
For example, Chrome will not recognize a V4l2loopback device:
https://code.google.com/p/chromium/issues/detail?id=139356
The Chromium guys have been using v4l2loopback for WebRTC testing, and have patched around this:
Their solution is to pair devices such that:
modprobe v4l2loopback devices=2
Provides an output device on /dev/video1
that streams from a capture device at /dev/video2
I would find it useful to have this capability optionally provided by v4l2loopback.
For example:
modprobe v4l2loopback devices=2 pair
or similar (arg suggestions welcome)
I've forked and intend to add this for my own purposes. If others would like to review & test, would it be worth pushing upstream?
Please tell me how can i run this? Its failing to load the png file.
in the documentation mentioned that i can use it???
https://github.com/umlaeute/v4l2loopback/blob/master/README Line 98: $ v4l2loopback-ctl set-timeout-image service-unavailable.png /dev/video0 Line 99: this currently requires GStreamer 0.10 installed
sun@sun-M14xR2:~$ uname -a
Linux sun-M14xR2 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:31:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
sun@sun-M14xR2:~$ v4l2-sysfs-path
Video device: video0
Video device: video3
Alsa playback device(s): hw:1,3 hw:0,0 hw:0,3
sun@sun-M14xR2:~$ v4l2-ctl --all -d /dev/video3
Driver Info (not using libv4l2):
Driver name : v4l2 loopback
Card type : Dummy video device
Bus info :
Driver version: 0.6.1
Capabilities : 0x05000003
Video Capture
Video Output
Read/Write
Streaming
Format Video Output:
Width/Height : 0/0
Pixel Format : 'BGR4'
Field : None
Bytes per Line: 640
Size Image : 153600
Colorspace : SRGB
Video output: 0 (loopback in)
Video Standard = 0x00ffffff
PAL-B/B1/G/H/I/D/D1/K/M/N/Nc/60
NTSC-M/M-JP/443/M-KR
SECAM-B/D/G/H/K/K1/L/Lc
Streaming Parameters Video Capture:
Frames per second: 30.000 (30/1)
Read buffers : 8
Streaming Parameters Video Output:
Frames per second: 30.000 (30/1)
Write buffers : 8
sun@sun-M14xR2:~$ v4l2loopback-ctl set-timeout-image /home/sun/Pictures/Who.png /dev/video3
Device has no format negotiated
Hi,
we have a build problem.
The system:
distribution: opensuse 11.2
kernel: 2.6.31.14
compiler: gcc-4.4.1
version v4l2loopback: v0.4.0-6-g9a53a22
The compiler show us following error-messages:
Building v4l2-loopback driver...
make -C /lib/modules/uname -r
/build M=/usr/src/packages/SOURCES/umlaeute-v4l2loopback-9a53a22 modules
make[1]: Entering directory /usr/src/linux-2.6.31.14-0.8-obj/i386/default' make -C ../../../linux-2.6.31.14-0.8 O=/usr/src/linux-2.6.31.14-0.8-obj/i386/default/. modules CC [M] /usr/src/packages/SOURCES/umlaeute-v4l2loopback-9a53a22/v4l2loopback.o /usr/src/packages/SOURCES/umlaeute-v4l2loopback-9a53a22/v4l2loopback.c: In function ‘v4l2loopback_getdevice’: /usr/src/packages/SOURCES/umlaeute-v4l2loopback-9a53a22/v4l2loopback.c:313: error: ‘struct video_device’ has no member named ‘vd_private_data’ /usr/src/packages/SOURCES/umlaeute-v4l2loopback-9a53a22/v4l2loopback.c: In function ‘v4l2_loopback_init’: /usr/src/packages/SOURCES/umlaeute-v4l2loopback-9a53a22/v4l2loopback.c:1490: error: ‘struct video_device’ has no member named ‘vd_private_data’ /usr/src/packages/SOURCES/umlaeute-v4l2loopback-9a53a22/v4l2loopback.c:1491: error: ‘struct video_device’ has no member named ‘vd_private_data’ /usr/src/packages/SOURCES/umlaeute-v4l2loopback-9a53a22/v4l2loopback.c:1495: error: ‘struct video_device’ has no member named ‘vd_private_data’ /usr/src/packages/SOURCES/umlaeute-v4l2loopback-9a53a22/v4l2loopback.c: In function ‘free_devices’: /usr/src/packages/SOURCES/umlaeute-v4l2loopback-9a53a22/v4l2loopback.c:1582: error: ‘struct video_device’ has no member named ‘vd_private_data’ make[4]: *** [/usr/src/packages/SOURCES/umlaeute-v4l2loopback-9a53a22/v4l2loopback.o] Fehler 1 make[3]: *** [_module_/usr/src/packages/SOURCES/umlaeute-v4l2loopback-9a53a22] Fehler 2 make[2]: *** [sub-make] Fehler 2 make[1]: *** [all] Fehler 2 make[1]: Leaving directory
/usr/src/linux-2.6.31.14-0.8-obj/i386/default'
make: *** [v4l2loopback] Fehler 2
What's going wrong?
Thank you for help.
Christoph
Hello, I installed v4l2loopback as kernel module. I've registered properly using "insmod" and a video device is created at /dev/video1 (also I check through "lsmod" if module was loaded), but it isn't detected by any vl2-capable program as cheese, vlc or FlashPlayer.
In "dmesg": [ 1678.781193] v4l2loopack driver version 0.5.0 loaded.
I'm using Ubuntu 11.04, custom kernel 3.1.10.
No example works for me:
Example "test" with xawtv as consumer:
WARNING: No DGA direct video mode for this display.
/dev/video1 [v4l2]: no overlay support
v4l-conf had some trouble, trying to continue anyway
Warning: Cannot convert string "--ledfixed-medium-r---39----c---" to type FontStruct
"yuv4mpeg" with mplayer as consumer:
MPlayer 1.0rc4-4.5.2 (C) 2000-2010 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Playing movie.mp4.
libavformat file format detected.
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang und
VIDEO: [H264] 480x270 24bpp 23.976 fps 851.8 kbps (104.0 kbyte/s)
Clip info:
major_brand: mp42
minor_version: 0
compatible_brands: isomiso2avc1mp41mp42
encoder: Lavf52.78.2
Error opening/initializing the selected video_out (-vo) device.
==========================================================================
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
AUDIO: 44100 Hz, 2 ch, s16le, 95.8 kbit/6.79% (ratio: 11980->176400)
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
AO: [pulse] 44100Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A: 44.4 (44.4) of 87.2 (01:27.2) 1.1%
Another virtual driver as VIVI is detected by mplayer and FlashPlayer.
Any thought? Cheers.
In order to switch between loopback devices in a Google+ hangout, the device names in /sys/devices/virtual/video4linux/video*/name need to be distinct.
The following patch works for me although the implementation is probably poor and it's not against the latest version.
--- v4l2loopback.c.dist 2012-09-05 04:14:29.000000000 +0100
+++ v4l2loopback.c 2012-09-05 04:25:54.000000000 +0100
@@ -1707,10 +1707,14 @@
/* fills and register video device */
static void
-init_vdev (struct video_device *vdev)
+init_vdev (struct video_device *vdev,
+ int nr)
{
MARK();
- strlcpy(vdev->name, "Loopback video device", sizeof(vdev->name));
+ int char_nr = 65 + nr;
+ char *devname = "Loopback video device A";
+ devname[22] = char_nr;
+ strlcpy(vdev->name, devname, sizeof(vdev->name));
vdev->tvnorms = V4L2_STD_ALL;
vdev->current_norm = V4L2_STD_ALL;
vdev->vfl_type = VFL_TYPE_GRABBER;
@@ -1752,7 +1756,7 @@
}
((priv_ptr)video_get_drvdata(dev->vdev))->devicenr = nr;
- init_vdev(dev->vdev);
+ init_vdev(dev->vdev, nr);
init_capture_param(&dev->capture_param);
dev->buffers_number = max_buffers;
dev->used_buffers = max_buffers;
Hello,
I could successfully install v4l2loopback on Ubuntu Dekstop 14.04 LTS running in a virtual machine on my pc. Now I want to install v4l2loopback on a Ubuntu Server 14.04 LTS (Amazon ec2). The commands "sudo make" and "sudo make install" seem to work fine. But "sudo modprobe v4l2loopback" fails:
modprobe: ERROR: could not insert 'v4l2loopback': Unknown symbol in module, or unknown parameter (see dmesg)
Output of "dmesg v4l2loopback":
[7470017.077809] v4l2loopback: module verification failed: signature and/or required key missing - tainting kernel
[7470017.077845] v4l2loopback: Unknown symbol video_ioctl2 (err 0)
[7470017.077882] v4l2loopback: Unknown symbol video_devdata (err 0)
[7470017.077894] v4l2loopback: Unknown symbol video_unregister_device (err 0)
[7470017.077903] v4l2loopback: Unknown symbol video_device_alloc (err 0)
[7470017.077914] v4l2loopback: Unknown symbol v4l2_device_register (err 0)
[7470017.077927] v4l2loopback: Unknown symbol __video_register_device (err 0)
[7470017.077932] v4l2loopback: Unknown symbol v4l2_device_unregister (err 0)
[7470017.077935] v4l2loopback: Unknown symbol video_device_release (err 0)
[7470554.397149] v4l2loopback: Unknown symbol video_ioctl2 (err 0)
[7470554.397191] v4l2loopback: Unknown symbol video_devdata (err 0)
[7470554.397204] v4l2loopback: Unknown symbol video_unregister_device (err 0)
[7470554.397213] v4l2loopback: Unknown symbol video_device_alloc (err 0)
[7470554.397224] v4l2loopback: Unknown symbol v4l2_device_register (err 0)
[7470554.397236] v4l2loopback: Unknown symbol __video_register_device (err 0)
[7470554.397241] v4l2loopback: Unknown symbol v4l2_device_unregister (err 0)
[7470554.397245] v4l2loopback: Unknown symbol video_device_release (err 0)
Maybe there is a package missing?
Hi,
v4l2loopback works very well for me with one execption: the select() functionality (http://linuxtv.org/downloads/v4l-dvb-apis/func-select.html) which should wait for a buffer to be filled always returns 1. An example how I use it can be found here: http://linuxtv.org/downloads/v4l-dvb-apis/capture-example.html
With my "real" camera select() waits for the image, but not with the v4l2loopback device, no matter if I even have a gstreamer v4l2sink coupled or not.
When i execute a gstreamer-1.0 pipeline gst-launch-1.0 -evm videotestsrc ! v4l2sink device=/dev/video1
for video loop back using v4l2loopback version 0.6.3 it throws the following error,
"(gst-launch-1.0:17157): GStreamer-CRITICAL **: gst_buffer_get_meta: assertion `buffer != NULL' failed."
This behavior is inconsistent, in 5 attempts at least thrice this error comes.
System Environment, Ubuntu 12.10, 32bit, 3.5.0-26-generic kernel.
It looks like some problem with the v4l2loopback element, because when I replace the v4l2loopback with fakesink , it didn't throw any error.
Many cameras produce 1080i as the native format. Would be nice to not have to deinterlace it before sending it to v4l2loopback.
Hello, here are the issues I have.
Builds seem okay.
Though at runtime, with (video0 already taken by built-in camera)
./test
test: test.c:133: main: Assertion `ret_code != -1' failed.
with
./test
test: test.c:117: main: Assertion `fdwr >= 0' failed.
Then getting some:
% ./yuv4mpeg_to_v4l2 < /tmp/pipe
G_FMT: Invalid argument
When feeding the pipe with:
mplayer videofile.mp4 -vo yuv4mpeg:file=/tmp/pipe -nosound
Which produces in mplayer:
MPlayer interrupted by signal 13 in module: flip_page
infos:
uname -a
Linux _ 3.2.0-2-amd64 #1 SMP Sun Mar 4 22:48:17 UTC 2012 x86_64 GNU/Linux
I am using Debian GNU Linux/Testing. A few days ago, Gstreamer was updated to 0.10.36
(gst-plugin-good is 0.10.31).
I executed command below in this environment, but I got an error message and command exited.
gst-launch -v videotestsrc ! ffmpegcolorspace ! v4l2sink device=/dev/video1
/dev/video1 is a v4l2 loopback device that created by v4l2loopback version 0.5.0.
However, I tried to GStreamer and gst-plugin-good are downgrade to 0.10.35 and 0.10.30 from original source package, then execute same command. it's work.
Do you think either Gstreamer or v4l2loopback about this problem issue?
But not appared error on Linux 3.0.4.
Platform : Debian GNU/Linux testing (AMD64)
Gstreamer Debug Message:
Could not get/set settings from/on resource.:v4l2_calls.c(267): gst_v4l2_fill_lists (): /GstPipeline:WebcamComposer/GstV4l2Sink:v4l2sink0:
Failed querying control 9963776 on device '/dev/video1'. (25 - Inappropriate ioctl for device)
v4l2loopback Debug Message]
Nov 3 20:21:27 yukke-main kernel: [ 7517.434920] /var/lib/dkms/v4l2loopback/0.4.0/build/v4l2loopback.c:1595[init_module]
Nov 3 20:21:27 yukke-main kernel: [ 7517.434926] v4l2-loopback[1613]: creating loopback-device #0
Nov 3 20:21:27 yukke-main kernel: [ 7517.434931] /var/lib/dkms/v4l2loopback/0.4.0/build/v4l2loopback.c:1485[v4l2_loopback_init]
Nov 3 20:21:27 yukke-main kernel: [ 7517.434936] /var/lib/dkms/v4l2loopback/0.4.0/build/v4l2loopback.c:1454[init_vdev]
Nov 3 20:21:27 yukke-main kernel: [ 7517.434940] /var/lib/dkms/v4l2loopback/0.4.0/build/v4l2loopback.c:1465[init_vdev]
Nov 3 20:21:27 yukke-main kernel: [ 7517.435032] v4l2-loopback[1632]: module installed
Nov 3 20:21:27 yukke-main kernel: [ 7517.435036] v4l2loopack driver version 0.4.0 loaded
Nov 3 20:21:27 yukke-main kernel: [ 7517.436153] /var/lib/dkms/v4l2loopback/0.4.0/build/v4l2loopback.c:1253[v4l2_loopback_open]
Nov 3 20:21:27 yukke-main kernel: [ 7517.436158] /var/lib/dkms/v4l2loopback/0.4.0/build/v4l2loopback.c:1265[v4l2_loopback_open]
Nov 3 20:21:27 yukke-main kernel: [ 7517.436204] Loopback video device: VIDIOC_QUERYCAP driver=v4l2 loopback, card=Dummy video device, bus=, version=0x00000400, capabilities=0x05000003
Nov 3 20:21:27 yukke-main kernel: [ 7517.436249] /var/lib/dkms/v4l2loopback/0.4.0/build/v4l2loopback.c:1274[v4l2_loopback_close]
Nov 3 20:21:27 yukke-main kernel: [ 7517.436254] v4l2-loopback[1374]: freeing ffff880213a8e000 -> (null)
Nov 3 20:22:09 yukke-main kernel: [ 7517.436258] /var/lib/dkms/v4l2loopback/0.4.0/build/v4l2loopback.c:1288[v4l2_loopback_close]
Nov 3 20:22:09 yukke-main kernel: [ 7559.299324] /var/lib/dkms/v4l2loopback/0.4.0/build/v4l2loopback.c:1253[v4l2_loopback_open]
Nov 3 20:22:09 yukke-main kernel: [ 7559.299326] /var/lib/dkms/v4l2loopback/0.4.0/build/v4l2loopback.c:1265[v4l2_loopback_open]
Nov 3 20:22:09 yukke-main kernel: [ 7559.299330] Loopback video device: VIDIOC_QUERYCAP driver=v4l2 loopback, card=Dummy video device, bus=, version=0x00000400, capabilities=0x05000003
Nov 3 20:22:09 yukke-main kernel: [ 7559.299334] Loopback video device: VIDIOC_G_FMT type=vid-cap
Nov 3 20:22:09 yukke-main kernel: [ 7559.299337] /var/lib/dkms/v4l2loopback/0.4.0/build/v4l2loopback.c:461[vidioc_g_fmt_cap]
Nov 3 20:22:09 yukke-main kernel: [ 7559.299338] Loopback video device: VIDIOC_G_FMT error -22
Nov 3 20:22:09 yukke-main kernel: [ 7559.299356] Loopback video device: VIDIOC_QUERYCAP driver=v4l2 loopback, card=Dummy video device, bus=, version=0x00000400, capabilities=0x05000003
Nov 3 20:22:09 yukke-main kernel: [ 7559.299360] /var/lib/dkms/v4l2loopback/0.4.0/build/v4l2loopback.c:867[vidioc_enum_input]
Nov 3 20:22:09 yukke-main kernel: [ 7559.299362] Loopback video device: VIDIOC_ENUMINPUT error -22
Nov 3 20:22:09 yukke-main kernel: [ 7559.299364] Loopback video device: VIDIOC_ENUMSTD index=0, id=0xb000, name=NTSC, fps=1001/30000, framelines=525
Nov 3 20:22:09 yukke-main kernel: [ 7559.299370] Loopback video device: VIDIOC_ENUMSTD index=1, id=0x1000, name=NTSC-M, fps=1001/30000, framelines=525
Nov 3 20:22:09 yukke-main kernel: [ 7559.299374] Loopback video device: VIDIOC_ENUMSTD index=2, id=0x2000, name=NTSC-M-JP, fps=1001/30000, framelines=525
Nov 3 20:22:09 yukke-main kernel: [ 7559.299377] Loopback video device: VIDIOC_ENUMSTD index=3, id=0x8000, name=NTSC-M-KR, fps=1001/30000, framelines=525
Nov 3 20:22:09 yukke-main kernel: [ 7559.299380] Loopback video device: VIDIOC_ENUMSTD index=4, id=0x4000, name=NTSC-443, fps=1001/30000, framelines=525
Nov 3 20:22:09 yukke-main kernel: [ 7559.299383] Loopback video device: VIDIOC_ENUMSTD index=5, id=0xff, name=PAL, fps=1/25, framelines=625
Nov 3 20:22:09 yukke-main kernel: [ 7559.299387] Loopback video device: VIDIOC_ENUMSTD index=6, id=0x7, name=PAL-BG, fps=1/25, framelines=625
Nov 3 20:22:09 yukke-main kernel: [ 7559.299390] Loopback video device: VIDIOC_ENUMSTD index=7, id=0x8, name=PAL-H, fps=1/25, framelines=625
Nov 3 20:22:09 yukke-main kernel: [ 7559.299393] Loopback video device: VIDIOC_ENUMSTD index=8, id=0x10, name=PAL-I, fps=1/25, framelines=625
Nov 3 20:22:09 yukke-main kernel: [ 7559.299396] Loopback video device: VIDIOC_ENUMSTD index=9, id=0xe0, name=PAL-DK, fps=1/25, framelines=625
Nov 3 20:22:09 yukke-main kernel: [ 7559.299399] Loopback video device: VIDIOC_ENUMSTD index=10, id=0x100, name=PAL-M, fps=1001/30000, framelines=525
Nov 3 20:22:09 yukke-main kernel: [ 7559.299402] Loopback video device: VIDIOC_ENUMSTD index=11, id=0x200, name=PAL-N, fps=1/25, framelines=625
Nov 3 20:22:09 yukke-main kernel: [ 7559.299405] Loopback video device: VIDIOC_ENUMSTD index=12, id=0x400, name=PAL-Nc, fps=1/25, framelines=625
Nov 3 20:22:09 yukke-main kernel: [ 7559.299410] Loopback video device: VIDIOC_ENUMSTD index=13, id=0x800, name=PAL-60, fps=1001/30000, framelines=525
Nov 3 20:22:09 yukke-main kernel: [ 7559.299413] Loopback video device: VIDIOC_ENUMSTD index=14, id=0xff0000, name=SECAM, fps=1/25, framelines=625
Nov 3 20:22:09 yukke-main kernel: [ 7559.299416] Loopback video device: VIDIOC_ENUMSTD index=15, id=0x10000, name=SECAM-B, fps=1/25, framelines=625
Nov 3 20:22:09 yukke-main kernel: [ 7559.299419] Loopback video device: VIDIOC_ENUMSTD index=16, id=0x40000, name=SECAM-G, fps=1/25, framelines=625
Nov 3 20:22:09 yukke-main kernel: [ 7559.299422] Loopback video device: VIDIOC_ENUMSTD index=17, id=0x80000, name=SECAM-H, fps=1/25, framelines=625
Nov 3 20:22:09 yukke-main kernel: [ 7559.299426] Loopback video device: VIDIOC_ENUMSTD index=18, id=0x320000, name=SECAM-DK, fps=1/25, framelines=625
Nov 3 20:22:09 yukke-main kernel: [ 7559.299429] Loopback video device: VIDIOC_ENUMSTD index=19, id=0x400000, name=SECAM-L, fps=1/25, framelines=625
Nov 3 20:22:09 yukke-main kernel: [ 7559.299432] Loopback video device: VIDIOC_ENUMSTD index=20, id=0x800000, name=SECAM-Lc, fps=1/25, framelines=625
Nov 3 20:22:09 yukke-main kernel: [ 7559.299435] Loopback video device: VIDIOC_ENUMSTD error -25
Nov 3 20:22:09 yukke-main kernel: [ 7559.299437] Loopback video device: VIDIOC_QUERYCTRL error -25
Nov 3 20:22:09 yukke-main kernel: [ 7559.299461] /var/lib/dkms/v4l2loopback/0.4.0/build/v4l2loopback.c:1274[v4l2_loopback_close]
Nov 3 20:22:09 yukke-main kernel: [ 7559.299463] v4l2-loopback[1374]: freeing ffff880213a8e000 -> (null)
Nov 3 20:22:09 yukke-main kernel: [ 7559.299464] /var/lib/dkms/v4l2loopback/0.4.0/build/v4l2loopback.c:1288[v4l2_loopback_close]
Nov 3 20:22:09 yukke-main kernel: [ 7559.299499] /var/lib/dkms/v4l2loopback/0.4.0/build/v4l2loopback.c:1253[v4l2_loopback_open]
Nov 3 20:22:09 yukke-main kernel: [ 7559.299500] /var/lib/dkms/v4l2loopback/0.4.0/build/v4l2loopback.c:1265[v4l2_loopback_open]
Nov 3 20:22:09 yukke-main kernel: [ 7559.299503] Loopback video device: VIDIOC_QUERYCAP driver=v4l2 loopback, card=Dummy video device, bus=, version=0x00000400, capabilities=0x05000003
Nov 3 20:22:09 yukke-main kernel: [ 7559.299506] Loopback video device: VIDIOC_G_FMT type=vid-cap
Nov 3 20:22:09 yukke-main kernel: [ 7559.299508] /var/lib/dkms/v4l2loopback/0.4.0/build/v4l2loopback.c:461[vidioc_g_fmt_cap]
Nov 3 20:22:09 yukke-main kernel: [ 7559.299509] Loopback video device: VIDIOC_G_FMT error -22
Nov 3 20:22:09 yukke-main kernel: [ 7559.299581] Loopback video device: VIDIOC_QUERYCAP driver=v4l2 loopback, card=Dummy video device, bus=, version=0x00000400, capabilities=0x05000003
Nov 3 20:22:09 yukke-main kernel: [ 7559.299591] /var/lib/dkms/v4l2loopback/0.4.0/build/v4l2loopback.c:867[vidioc_enum_input]
Nov 3 20:22:09 yukke-main kernel: [ 7559.299595] Loopback video device: VIDIOC_ENUMINPUT error -22
Nov 3 20:22:09 yukke-main kernel: [ 7559.299600] Loopback video device: VIDIOC_ENUMSTD index=0, id=0xb000, name=NTSC, fps=1001/30000, framelines=525
Nov 3 20:22:09 yukke-main kernel: [ 7559.299614] Loopback video device: VIDIOC_ENUMSTD index=1, id=0x1000, name=NTSC-M, fps=1001/30000, framelines=525
Nov 3 20:22:09 yukke-main kernel: [ 7559.299618] Loopback video device: VIDIOC_ENUMSTD index=2, id=0x2000, name=NTSC-M-JP, fps=1001/30000, framelines=525
Nov 3 20:22:09 yukke-main kernel: [ 7559.299622] Loopback video device: VIDIOC_ENUMSTD index=3, id=0x8000, name=NTSC-M-KR, fps=1001/30000, framelines=525
Nov 3 20:22:09 yukke-main kernel: [ 7559.299625] Loopback video device: VIDIOC_ENUMSTD index=4, id=0x4000, name=NTSC-443, fps=1001/30000, framelines=525
Nov 3 20:22:09 yukke-main kernel: [ 7559.299629] Loopback video device: VIDIOC_ENUMSTD index=5, id=0xff, name=PAL, fps=1/25, framelines=625
Nov 3 20:22:09 yukke-main kernel: [ 7559.299632] Loopback video device: VIDIOC_ENUMSTD index=6, id=0x7, name=PAL-BG, fps=1/25, framelines=625
Nov 3 20:22:09 yukke-main kernel: [ 7559.299636] Loopback video device: VIDIOC_ENUMSTD index=7, id=0x8, name=PAL-H, fps=1/25, framelines=625
Nov 3 20:22:09 yukke-main kernel: [ 7559.299639] Loopback video device: VIDIOC_ENUMSTD index=8, id=0x10, name=PAL-I, fps=1/25, framelines=625
Nov 3 20:22:09 yukke-main kernel: [ 7559.299642] Loopback video device: VIDIOC_ENUMSTD index=9, id=0xe0, name=PAL-DK, fps=1/25, framelines=625
Nov 3 20:22:09 yukke-main kernel: [ 7559.299646] Loopback video device: VIDIOC_ENUMSTD index=10, id=0x100, name=PAL-M, fps=1001/30000, framelines=525
Nov 3 20:22:09 yukke-main kernel: [ 7559.299649] Loopback video device: VIDIOC_ENUMSTD index=11, id=0x200, name=PAL-N, fps=1/25, framelines=625
Nov 3 20:22:09 yukke-main kernel: [ 7559.299656] Loopback video device: VIDIOC_ENUMSTD index=12, id=0x400, name=PAL-Nc, fps=1/25, framelines=625
Nov 3 20:22:09 yukke-main kernel: [ 7559.299659] Loopback video device: VIDIOC_ENUMSTD index=13, id=0x800, name=PAL-60, fps=1001/30000, framelines=525
Nov 3 20:22:09 yukke-main kernel: [ 7559.299662] Loopback video device: VIDIOC_ENUMSTD index=14, id=0xff0000, name=SECAM, fps=1/25, framelines=625
Nov 3 20:22:09 yukke-main kernel: [ 7559.299789] Loopback video device: VIDIOC_ENUMSTD index=15, id=0x10000, name=SECAM-B, fps=1/25, framelines=625
Nov 3 20:22:09 yukke-main kernel: [ 7559.299798] Loopback video device: VIDIOC_ENUMSTD index=16, id=0x40000, name=SECAM-G, fps=1/25, framelines=625
Nov 3 20:22:09 yukke-main kernel: [ 7559.299810] Loopback video device: VIDIOC_ENUMSTD index=17, id=0x80000, name=SECAM-H, fps=1/25, framelines=625
Nov 3 20:22:09 yukke-main kernel: [ 7559.299816] Loopback video device: VIDIOC_ENUMSTD index=18, id=0x320000, name=SECAM-DK, fps=1/25, framelines=625
Nov 3 20:22:09 yukke-main kernel: [ 7559.299822] Loopback video device: VIDIOC_ENUMSTD index=19, id=0x400000, name=SECAM-L, fps=1/25, framelines=625
Nov 3 20:22:09 yukke-main kernel: [ 7559.299828] Loopback video device: VIDIOC_ENUMSTD index=20, id=0x800000, name=SECAM-Lc, fps=1/25, framelines=625
Nov 3 20:22:09 yukke-main kernel: [ 7559.299835] Loopback video device: VIDIOC_ENUMSTD error -25
Nov 3 20:22:09 yukke-main kernel: [ 7559.299844] Loopback video device: VIDIOC_QUERYCTRL error -25
Nov 3 20:22:09 yukke-main kernel: [ 7559.299864] /var/lib/dkms/v4l2loopback/0.4.0/build/v4l2loopback.c:1274[v4l2_loopback_close]
Nov 3 20:22:09 yukke-main kernel: [ 7559.299867] v4l2-loopback[1374]: freeing ffff880213a8e000 -> (null)
Hello,
I tried the current github version and also the ubuntu-package provided in Linux Mint 13.
After make install I get the following message for both versions:
make -C /lib/modules/uname -r
/build M=/home/pman/src/v4l2loopback modules_install
make[1]: Betrete Verzeichnis '/usr/src/linux-headers-3.2.0-23-generic'
INSTALL /home/pman/src/v4l2loopback/v4l2loopback.ko
DEPMOD 3.2.0-23-generic
make[1]: Verlasse Verzeichnis '/usr/src/linux-headers-3.2.0-23-generic'
depmod -ae
WARNING: -e needs -E or -F
Trying modprobe v4l2loopback gives me an error message:
FATAL: Error inserting v4l2loopback (/lib/modules/3.2.0-23-generic/extra/v4l2loopback.ko): Invalid argument
uname -r shows:
3.2.0-23-generic
I've installed linux-headers-3.2.0-23, linux-headers-3.2.0-23-generic and linux-source 3.2.0-23.
I am also using the current version of v4l from linuxtv.org which provides modules like uvcvideo for the cam I'm using.
dmesg tells me:
[ 108.789919] v4l2loopback: disagrees about version of symbol video_ioctl2
[ 108.789929] v4l2loopback: Unknown symbol video_ioctl2 (err -22)
[ 108.789995] v4l2loopback: disagrees about version of symbol video_devdata
[ 108.790001] v4l2loopback: Unknown symbol video_devdata (err -22)
[ 108.790030] v4l2loopback: disagrees about version of symbol video_unregister_device
[ 108.790036] v4l2loopback: Unknown symbol video_unregister_device (err -22)
[ 108.790057] v4l2loopback: disagrees about version of symbol video_device_alloc
[ 108.790063] v4l2loopback: Unknown symbol video_device_alloc (err -22)
[ 108.790095] v4l2loopback: disagrees about version of symbol __video_register_device
[ 108.790101] v4l2loopback: Unknown symbol __video_register_device (err -22)
[ 108.790114] v4l2loopback: disagrees about version of symbol video_device_release
[ 108.790119] v4l2loopback: Unknown symbol video_device_release (err -22)
Would anybody know, what I did wrong? Might there be a conflict between v4l from linuxtv.org and v4l2loopback?
On Archlinux 64bit, Kernel 3.7.5, gstreamer 0.10.36,
v4l2loopback either 0.6.2 or from git today:
the simple test gst-launch-0.10 -v videotestsrc ! ! v4l2sink device=/dev/video2 fails with ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Could not negotiate format
I tried several other like 'video/x-raw-yuv,format=(fourcc)YUY2,width=640,height=480,framerate=25/1' and tried to set the same with v4l2loopback-ctl -set-caps
but no difference.
I don't know where to start or how to solve it. Any help appreciated!
Below is the output of
GST_DEBUG=capsdebug:3 gst-launch videotestsrc ! capsdebug ! v4l2sink device=/dev/video2
[nils@fyps ~]$ LANG=ENG GST_DEBUG=capsdebug:3 gst-launch videotestsrc ! capsdebug ! v4l2sink device=/dev/video2
0:00:00.046018691 11839 0x1d17e70 INFO capsdebug gstcapsdebug.c:183:gst_caps_debug_getcaps: upstream called getcaps
0:00:00.046092244 11839 0x1d17e70 INFO capsdebug gstcapsdebug.c:188:gst_caps_debug_getcaps: downstream returned NULL
0:00:00.046325587 11839 0x1d17e70 INFO capsdebug gstcapsdebug.c:183:gst_caps_debug_getcaps: upstream called getcaps
0:00:00.046356802 11839 0x1d17e70 INFO capsdebug gstcapsdebug.c:188:gst_caps_debug_getcaps: downstream returned NULL
0:00:00.046441736 11839 0x1d17e70 INFO capsdebug gstcapsdebug.c:183:gst_caps_debug_getcaps: downstream called getcaps
0:00:00.047027723 11839 0x1d17e70 INFO capsdebug gstcapsdebug.c:188:gst_caps_debug_getcaps: upstream returned video/x-raw-yuv, format=(fourcc)YUY2, color-matrix=(string){ sdtv, hdtv }, chroma-site=(string){ mpeg2, jpeg }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)UYVY, color-matrix=(string){ sdtv, hdtv }, chroma-site=(string){ mpeg2, jpeg }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)YVYU, color-matrix=(string){ sdtv, hdtv }, chroma-site=(string){ mpeg2, jpeg }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)v308, color-matrix=(string){ sdtv, hdtv }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)AYUV, color-matrix=(string){ sdtv, hdtv }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)v210, color-matrix=(string){ sdtv, hdtv }, chroma-site=(string){ mpeg2, jpeg }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)v216, color-matrix=(string){ sdtv, hdtv }, chroma-site=(string){ mpeg2, jpeg }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)UYVP, color-matrix=(string){ sdtv, hdtv }, chroma-site=(string){ mpeg2, jpeg }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)AY64, color-matrix=(string){ sdtv, hdtv }, chroma-site=(string){ mpeg2, jpeg }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)YVU9, color-matrix=(string){ sdtv, hdtv }, chroma-site=(string){ mpeg2, jpeg }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)YUV9, color-matrix=(string){ sdtv, hdtv }, chroma-site=(string){ mpeg2, jpeg }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)YV12, color-matrix=(string){ sdtv, hdtv }, chroma-site=(string){ mpeg2, jpeg }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)I420, color-matrix=(string){ sdtv, hdtv }, chroma-site=(string){ mpeg2, jpeg }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)NV12, color-matrix=(string){ sdtv, hdtv }, chroma-site=(string){ mpeg2, jpeg }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)NV21, color-matrix=(string){ sdtv, hdtv }, chroma-site=(string){ mpeg2, jpeg }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)Y41B, color-matrix=(string){ sdtv, hdtv }, chroma-site=(string){ mpeg2, jpeg }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)Y42B, color-matrix=(string){ sdtv, hdtv }, chroma-site=(string){ mpeg2, jpeg }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)Y444, color-matrix=(string){ sdtv, hdtv }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)Y800, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-gray, bpp=(int)8, depth=(int)8, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-gray, bpp=(int)16, depth=(int)16, endianness=(int)1234, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, depth=(int)24, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, depth=(int)24, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, depth=(int)24, red_mask=(int)-16777216, green_mask=(int)16711680, blue_mask=(int)65280, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, depth=(int)24, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, depth=(int)32, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, alpha_mask=(int)-16777216, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, depth=(int)32, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680, alpha_mask=(int)-16777216, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, depth=(int)32, red_mask=(int)-16777216, green_mask=(int)16711680, blue_mask=(int)65280, alpha_mask=(int)255, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, depth=(int)32, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, alpha_mask=(int)255, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-rgb, bpp=(int)24, endianness=(int)4321, depth=(int)24, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-rgb, bpp=(int)24, endianness=(int)4321, depth=(int)24, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-rgb, bpp=(int)16, endianness=(int)1234, depth=(int)16, red_mask=(int)63488, green_mask=(int)2016, blue_mask=(int)31, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-rgb, bpp=(int)16, endianness=(int)1234, depth=(int)15, red_mask=(int)31744, green_mask=(int)992, blue_mask=(int)31, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-rgb, bpp=(int)64, endianness=(int)4321, depth=(int)64, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-bayer, format=(string)bggr, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-bayer, format=(string)rggb, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-bayer, format=(string)grbg, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-bayer, format=(string)gbrg, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
0:00:00.047360029 11839 0x1d17e70 INFO capsdebug gstcapsdebug.c:183:gst_caps_debug_getcaps: downstream called getcaps
0:00:00.047930382 11839 0x1d17e70 INFO capsdebug gstcapsdebug.c:188:gst_caps_debug_getcaps: upstream returned video/x-raw-yuv, format=(fourcc)YUY2, color-matrix=(string){ sdtv, hdtv }, chroma-site=(string){ mpeg2, jpeg }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)UYVY, color-matrix=(string){ sdtv, hdtv }, chroma-site=(string){ mpeg2, jpeg }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)YVYU, color-matrix=(string){ sdtv, hdtv }, chroma-site=(string){ mpeg2, jpeg }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)v308, color-matrix=(string){ sdtv, hdtv }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)AYUV, color-matrix=(string){ sdtv, hdtv }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)v210, color-matrix=(string){ sdtv, hdtv }, chroma-site=(string){ mpeg2, jpeg }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)v216, color-matrix=(string){ sdtv, hdtv }, chroma-site=(string){ mpeg2, jpeg }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)UYVP, color-matrix=(string){ sdtv, hdtv }, chroma-site=(string){ mpeg2, jpeg }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)AY64, color-matrix=(string){ sdtv, hdtv }, chroma-site=(string){ mpeg2, jpeg }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)YVU9, color-matrix=(string){ sdtv, hdtv }, chroma-site=(string){ mpeg2, jpeg }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)YUV9, color-matrix=(string){ sdtv, hdtv }, chroma-site=(string){ mpeg2, jpeg }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)YV12, color-matrix=(string){ sdtv, hdtv }, chroma-site=(string){ mpeg2, jpeg }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)I420, color-matrix=(string){ sdtv, hdtv }, chroma-site=(string){ mpeg2, jpeg }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)NV12, color-matrix=(string){ sdtv, hdtv }, chroma-site=(string){ mpeg2, jpeg }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)NV21, color-matrix=(string){ sdtv, hdtv }, chroma-site=(string){ mpeg2, jpeg }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)Y41B, color-matrix=(string){ sdtv, hdtv }, chroma-site=(string){ mpeg2, jpeg }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)Y42B, color-matrix=(string){ sdtv, hdtv }, chroma-site=(string){ mpeg2, jpeg }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)Y444, color-matrix=(string){ sdtv, hdtv }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-yuv, format=(fourcc)Y800, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-gray, bpp=(int)8, depth=(int)8, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-gray, bpp=(int)16, depth=(int)16, endianness=(int)1234, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, depth=(int)24, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, depth=(int)24, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, depth=(int)24, red_mask=(int)-16777216, green_mask=(int)16711680, blue_mask=(int)65280, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, depth=(int)24, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, depth=(int)32, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, alpha_mask=(int)-16777216, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, depth=(int)32, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680, alpha_mask=(int)-16777216, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, depth=(int)32, red_mask=(int)-16777216, green_mask=(int)16711680, blue_mask=(int)65280, alpha_mask=(int)255, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, depth=(int)32, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, alpha_mask=(int)255, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-rgb, bpp=(int)24, endianness=(int)4321, depth=(int)24, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-rgb, bpp=(int)24, endianness=(int)4321, depth=(int)24, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-rgb, bpp=(int)16, endianness=(int)1234, depth=(int)16, red_mask=(int)63488, green_mask=(int)2016, blue_mask=(int)31, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-rgb, bpp=(int)16, endianness=(int)1234, depth=(int)15, red_mask=(int)31744, green_mask=(int)992, blue_mask=(int)31, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-rgb, bpp=(int)64, endianness=(int)4321, depth=(int)64, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-bayer, format=(string)bggr, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-bayer, format=(string)rggb, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-bayer, format=(string)grbg, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw-bayer, format=(string)gbrg, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
Setting pipeline to PAUSED ...
libv4l2: error getting pixformat: Invalid argument
0:00:00.049451664 11839 0x1d17e70 INFO capsdebug gstcapsdebug.c:183:gst_caps_debug_getcaps: upstream called getcaps
0:00:00.049504798 11839 0x1d17e70 INFO capsdebug gstcapsdebug.c:188:gst_caps_debug_getcaps: downstream returned EMPTY
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Could not negotiate format
Additional debug info:
gstbasesrc.c(2830): gst_base_src_start (): /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0:
Check your filtered caps, if any
Setting pipeline to NULL ...
Freeing pipeline ...
currently we can set the device-number for each device using the video_nr (array of int)
parameter.
this however only allows to either explicitly set a given nr for each created device, or use the "next available" (-1) for a given device.
esp. it doesn't allow to add an offset (create 10 devices starting with /dev/video7
)
v4l2loopback 0.4.1 works under Ubuntu 12.04 LTS using the following commands:
sudo modprobe v4l2loopback devices=8 max_buffers=8
gst-launch-0.10 v4l2src device=/dev/video7 ! deinterlace method=linear ! v4l2sink device=/dev/video15
Revisions 0.5.0, 0.6.1, and 0.6.2 produce error messages when the following commands are performed:
sudo modprobe v4l2loopback devices=8
gst-launch-0.10 v4l2src device=/dev/video7 ! deinterlace method=linear ! v4l2sink device=/dev/video15
The output from gst-launch is:
Setting pipeline to PAUSED ...
libv4l2: error getting pixformat: Invalid argument
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not negotiate format
Additional debug info:
gstbasesrc.c(2830): gst_base_src_start (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Check your filtered caps, if any
Setting pipeline to NULL ...
Freeing pipeline ...
Hey, found this line while observing the code:
We actually need at least 100 devices for our project - is there any workaround for that besides forking?
Thank you!
Synopsis: V4l2loopback is sending duplicate timestamps.
environment: AMD64 2.6.35-27-generic on Ubuntu 10.10.
Pull the 11.04 src from github; make; make install; modprobe v4l2loopback
gst-launch-0.10 [ourvideosource] ! queue ! ffmpegcolorspace ! deinterlace ! videoscale ! videorate ! video/x-raw-yuv,width=640,height=360,framerate=30/1 ! v4l2sink device=/dev/video0
This appears:
Setting pipeline to PAUSED ...
libv4l2: error getting pixformat: Invalid argument
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
** (gst-launch-0.10:22523): CRITICAL **: gst_v4l2sink_sync_overlay_fields: assertion `v4l2_ioctl (fd, VIDIOC_G_FMT, &format) >= 0' failed
Despite the error Skype, vlc, cheese connect to v4l2 source at /dev/video0 fine.
However, ffmpeg with either libx264 or straight flv fails.
(with x264enc)
$ ffmpeg -f video4linux2 -s 640x360 -i /dev/video0 -r 24 -vcodec libx264 -vpre placebo -b 800k -coder 0 -g 2 -bf 0 -ab 64k -f flv rtmp://[OurFlashMediaServer]
FFmpeg version git-8cf9a09, Copyright (c) 2000-2011 the FFmpeg developers
built on Mar 3 2011 12:04:53 with gcc 4.4.5
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 50. 39. 0 / 50. 39. 0
libavcodec 52.113. 2 / 52.113. 2
libavformat 52.102. 0 / 52.102. 0
libavdevice 52. 2. 3 / 52. 2. 3
libavfilter 1. 76. 0 / 1. 76. 0
libswscale 0. 12. 0 / 0. 12. 0
libpostproc 51. 2. 0 / 51. 2. 0
[video4linux2 @ 0x14d75f0] Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2, from '/dev/video0':
Duration: N/A, start: 0.000000, bitrate: 110592 kb/s
Stream #0.0: Video: rawvideo, uyvy422, 640x360, 110592 kb/s, 30 tbr, 1000k tbn, 30 tbc
[buffer @ 0x14e6990] w:640 h:360 pixfmt:uyvy422
[ffsink @ 0x14e6c40] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
[scale @ 0x14e6f50] w:640 h:360 fmt:uyvy422 -> w:640 h:360 fmt:yuv420p flags:0xa0000004
[libx264 @ 0x14d8af0] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
[libx264 @ 0x14d8af0] profile High, level 3.1
[libx264 @ 0x14d8af0] 264 - core 114 r1913 5fd3dce - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=0 ref=16 deblock=1:0:0 analyse=0x3:0x133 me=tesa subme=10 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=24 chroma_me=1 trellis=2 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=0 chroma_qp_offset=-2 threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 constrained_intra=0 bframes=0 weightp=2 keyint=2 keyint_min=2 scenecut=40 intra_refresh=0 rc_lookahead=2 rc=abr mbtree=1 bitrate=800 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.41 aq=1:1.00
Output #0, flv, to 'rtmp://[OurFlashMediaServer]':
Metadata:
encoder : Lavf52.102.0
Stream #0.0: Video: libx264, yuv420p, 640x360, q=0-69, 800 kb/s, 1k tbn, 24 tbc
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
[libx264 @ 0x14d8af0] non-strictly-monotonic PTS
Last message repeated 5 times 43kB time=0.04 bitrate=8448.4kbits/s
[flv @ 0x14da4f0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 1299517269333 >= 1299517269333
av_interleaved_write_frame(): Operation not permitted
$ ffmpeg -f video4linux2 -s 640x360 -i /dev/video0 -r 30 -b 800k -coder 0 -g 2 -bf 0 -ab 64k -f flv rtmp://[OurFlashMediaServer]
FFmpeg version git-8cf9a09, Copyright (c) 2000-2011 the FFmpeg developers
built on Mar 3 2011 12:04:53 with gcc 4.4.5
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 50. 39. 0 / 50. 39. 0
libavcodec 52.113. 2 / 52.113. 2
libavformat 52.102. 0 / 52.102. 0
libavdevice 52. 2. 3 / 52. 2. 3
libavfilter 1. 76. 0 / 1. 76. 0
libswscale 0. 12. 0 / 0. 12. 0
libpostproc 51. 2. 0 / 51. 2. 0
[video4linux2 @ 0x17085f0] Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2, from '/dev/video0':
Duration: N/A, start: 0.000000, bitrate: 110592 kb/s
Stream #0.0: Video: rawvideo, uyvy422, 640x360, 110592 kb/s, 30 tbr, 1000k tbn, 30 tbc
[buffer @ 0x171b040] w:640 h:360 pixfmt:uyvy422
[ffsink @ 0x171b2f0] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
[scale @ 0x171b600] w:640 h:360 fmt:uyvy422 -> w:640 h:360 fmt:yuv420p flags:0xa0000004
Output #0, flv, to 'rtmp://[OurFlashMediaServer]':
Metadata:
encoder : Lavf52.102.0
Stream #0.0: Video: flv, yuv420p, 640x360, q=2-31, 800 kb/s, 1k tbn, 30 tbc
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
[flv @ 0x170cbc0] Error, Invalid timestamp=38985523200, last=38985523200
Video encoding failed
I'm unable to get the driver to get my mmap buffer writes.
On first run, module says buffers allocated, but QBUF ioctl is blocking.
On a second run, module says buffers reallocated, QBUF writes, but the module doesn't trigger write().
Has it been tested with mmap ?
v4l2-loopback[694]: s_fmt_out(0) 0...96000
v4l2-loopback[696]: outFOURCC=YU12
v4l2-loopback[1423]: vmallocated 786432 bytes
v4l2-loopback[939]: reqbufs: 1 1=8
v4l2-loopback[694]: s_fmt_out(0) 0...96000
v4l2-loopback[696]: outFOURCC=YU12
v4l2-loopback[1405]: allocating buffers again: 786432 786432
v4l2-loopback[1386]: freeing ffff880153acc000 -> ffffc90005498000
v4l2-loopback[1423]: vmallocated 786432 bytes
Hi! when i try to make i've got troubles:
Building v4l2-loopback driver... <---- is ok
make -C /lib/modules/uname -r
/build M=/home/alexander/downloads/v4l2loopback-experimental modules <----- perfect
make: *** /lib/modules/2.6.32-5-686/build: No such file or directory. Stop.
make: *** [v4l2loopback.ko] Error 2 =(
Any ideas to solve it?
Newer versions of ffmpeg can't read v4l2loopback stream
ffmpeg -v debug -f video4linux2 -i /dev/video0 -f alsa -i pulse_monitor -vcodec libvpx -vb 300k -r 25 -quality good -cpu-used 0 -s 640x360 -aspect 16:9 -f webm /tmp/fifo2.webm
ffmpeg version N-38414-g997a362 Copyright (c) 2000-2013 the FFmpeg developers
built on Feb 26 2013 18:27:23 with gcc 4.7 (Ubuntu/Linaro 4.7.2-2ubuntu1)
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-version3 --enable-x11grab --enable-libvpx --enable-libxvid --enable-libpulse --enable-libspeex --enable-libfdk-aac --enable-libopus
libavutil 52. 17.103 / 52. 17.103
libavcodec 54. 92.100 / 54. 92.100
libavformat 54. 63.100 / 54. 63.100
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 41.100 / 3. 41.100
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set libav* logging level) with argument 'debug'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'video4linux2'.
Reading option '-i' ... matched as input file with argument '/dev/video0'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'alsa'.
Reading option '-i' ... matched as input file with argument 'pulse_monitor'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'libvpx'.
Reading option '-vb' ... matched as AVOption 'vb' with argument '300k'.
Reading option '-r' ... matched as option 'r' (set frame rate (Hz value, fraction or abbreviation)) with argument '25'.
Reading option '-quality' ... matched as AVOption 'quality' with argument 'good'.
Reading option '-cpu-used' ... matched as AVOption 'cpu-used' with argument '0'.
Reading option '-s' ... matched as option 's' (set frame size (WxH or abbreviation)) with argument '640x360'.
Reading option '-aspect' ... matched as option 'aspect' (set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)) with argument '16:9'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'webm'.
Reading option '/tmp/fifo2.webm' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set libav* logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file /dev/video0.
Applying option f (force format) with argument video4linux2.
Successfully parsed a group of options.
Opening an input file: /dev/video0.
[video4linux2,v4l2 @ 0x2f18d00] fd:3 capabilities:5000003
[video4linux2,v4l2 @ 0x2f18d00] Selecting input_channel: 0
[video4linux2,v4l2 @ 0x2f18d00] input_channel: 0, input_name: loopback
[video4linux2,v4l2 @ 0x2f18d00] Querying the device for the current frame size
[video4linux2,v4l2 @ 0x2f18d00] Setting frame size to 320x240
[video4linux2,v4l2 @ 0x2f18d00] Trying to set codec:rawvideo pix_fmt:yuv420p
Last message repeated 1 times
[video4linux2,v4l2 @ 0x2f18d00] Trying to set codec:rawvideo pix_fmt:yuv422p
[video4linux2,v4l2 @ 0x2f18d00] Trying to set codec:rawvideo pix_fmt:yuyv422
[video4linux2,v4l2 @ 0x2f18d00] ioctl(VIDIOC_ENUMSTD): Invalid argument
/dev/video0: Invalid argument
I'm using custom kernel which is compiled from source code (kernel.org).
When I compile v4l2loopback as separate .ko module then "insmod
v4l2loopback.ko devices=8" working fine. But when I using it as
built-in driver inside Linux kernel it's not going to work:
drivers/media/v4l2-core/Kconfig
+config V4L2_LOOPBACK
+ tristate "V4L2 loopback device"
+ ---help---
+ V4L2 loopback device
drivers/media/v4l2-core/Makefile
+obj-$(CONFIG_V4L2_LOOPBACK) += v4l2loopback.o
.config
+CONFIG_V4L2_LOOPBACK=m
It can be built as ko-module and this scenario OK, but when built-in -
module successfully builds, however after system startup I can't see
any /dev/video devices. Of course, before any try, I did the following
modifications in drivers/media/v4l2-core/v4l2loopback.c:
#define MAX_DEVICES 8
static int devices = 8;
module_param(devices, int, 8);
MODULE_PARM_DESC(devices, "how many devices should be created");
//static int video_nr[MAX_DEVICES] = { [0 ... (MAX_DEVICES - 1)] = -1 };
static int video_nr[MAX_DEVICES] = { 0, 1, 2, 3, 4, 5, 6, 7 };
I expect to see /dev/video0...7
after boot, but unfortunately I can't
see any device nodes...
Is there any way to make it working as built-in driver? Can't see in dmesg anything about v4l2loopback.
P.S.
LD arch/x86/vdso/built-in.o
LD arch/x86/built-in.o
CC drivers/media/v4l2-core/v4l2loopback.o <<< OK
LD drivers/media/v4l2-core/built-in.o
LD drivers/media/built-in.o
LD drivers/built-in.o
LINK vmlinux
Also, running kernel with built-in module in file /proc/kallsyms contains v4l2_loopback_close, v4l2_loopback_mmap and other functions, and strange that v4l2_loopback_fops/ioctl_ops exists in System.map, but not in running kernel.
Hi,
card_labels should be card_label in README
Regards
Franck
I'm trying to compile v4l2loopback but I get stuck at running make. This is my output:
make -C /lib/modules/`uname -r`/build M=/home/hellocatfood/Desktop/v4l2loopback modules_install
make[1]: Entering directory `/usr/src/linux-headers-3.11.0-13-generic'
INSTALL /home/hellocatfood/Desktop/v4l2loopback/v4l2loopback.ko
Can't read private key
DEPMOD 3.11.0-13-generic
make[1]: Leaving directory `/usr/src/linux-headers-3.11.0-13-generic'
depmod -ae
WARNING: -e needs -E or -F
I'm using Ubuntu 13.10 64Bit with Intel® Ivybridge Mobile graphics
I've been running some test, with queue of 4, but only keeping 1 or 2 queued buffer at the same time, I endup with wrong buffer id on dqbuf. This used to work in GStreamer because we where queued them all, before dqueueing 1. Hence, any random ID was valid.
Could you make "motion" surveillance software support in v4l2loopback module?
now it outputs
[1] Unable to query input 0 VIDIOC_ENUMINPUT: Invalid argument
[1] ioctl (VIDIOCGCAP): Inappropriate ioctl for device
[1] Could not fetch initial image from camera
[1] Motion continues using width and height from config file(s)
[1] Resizing pre_capture buffer to 1 items
[1] ioctl (VIDIOCGPICT): Inappropriate ioctl for device
[1] Failed to open video loopback
after make and make install, no way to get another /dev/video# device (already have /video0 and /video1 as webcam ...) with modprobe v4l2loopback
I succesfully got another /dev/video# device (/dev/video2) with modprove v4l2loopback video_nr=2
but now webcam application (Cheese) crash on load .....
modprobe -r v4l2loopback (removes the /dev/video2) and chees turns on perfectly ...
Is there any chance of supporting encoded H.264 and passing it through?
I've compile the software on Ubuntu 12.04 which has the 3.2.0-49-generic-pae kernel. When I run sudo modprobe v4l2loopback the new device (video1) appears but no programs, including Cheese, avconv/ffmpeg and Pure Data, recognise it.
avplay returns this error:
[video4linux2 @ 0xafe00480] Not a video capture device.
hello
after run yuv4mpeg_to_v4l2.c example i get high mem usage here is the valgrind output
the problem is p=NULL; i think we should malloc this bytes?
valgrind --tool=memcheck --leak-check=full --show-reachable=yes --track-origins=yes bin/yuv4mpeg_to_v4l2_debug /dev/video3 < /tmp/s3
==5143== Memcheck, a memory error detector
==5143== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==5143== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for copyright info
==5143== Command: bin/yuv4mpeg_to_v4l2_debug /dev/video3
==5143==
==5143== Syscall param ioctl(generic) points to uninitialised byte(s)
==5143== at 0x4F0B197: ioctl (syscall-template.S:82)
==5143== by 0x400DDA: open_video (yuv4mpeg_to_v4l2.c:156)
==5143== by 0x400E84: main (yuv4mpeg_to_v4l2.c:169)
==5143== Address 0x7ff000184 is on thread 1's stack
==5143== Uninitialised value was created by a stack allocation
==5143== at 0x400D64: open_video (yuv4mpeg_to_v4l2.c:150)
==5143==
^C==5143==
==5143== HEAP SUMMARY:
==5143== in use at exit: 259,224 bytes in 318 blocks
==5143== total heap usage: 318 allocs, 0 frees, 259,224 bytes allocated
==5143==
==5143== 120 bytes in 1 blocks are definitely lost in loss record 1 of 3
==5143== at 0x4C274A8: malloc (vg_replace_malloc.c:236)
==5143== by 0x4E96148: getdelim (iogetdelim.c:68)
==5143== by 0x400B5E: read_header (yuv4mpeg_to_v4l2.c:101)
==5143== by 0x400C58: process_header (yuv4mpeg_to_v4l2.c:123)
==5143== by 0x400E7F: main (yuv4mpeg_to_v4l2.c:168)
==5143==
==5143== 37,920 bytes in 316 blocks are definitely lost in loss record 2 of 3
==5143== at 0x4C274A8: malloc (vg_replace_malloc.c:236)
==5143== by 0x4E96148: getdelim (iogetdelim.c:68)
==5143== by 0x400B5E: read_header (yuv4mpeg_to_v4l2.c:101)
==5143== by 0x400D55: copy_frames (yuv4mpeg_to_v4l2.c:135)
==5143== by 0x400E89: main (yuv4mpeg_to_v4l2.c:170)
==5143==
==5143== 221,184 bytes in 1 blocks are still reachable in loss record 3 of 3
==5143== at 0x4C274A8: malloc (vg_replace_malloc.c:236)
==5143== by 0x400CBA: copy_frames (yuv4mpeg_to_v4l2.c:133)
==5143== by 0x400E89: main (yuv4mpeg_to_v4l2.c:170)
==5143==
==5143== LEAK SUMMARY:
==5143== definitely lost: 38,040 bytes in 317 blocks
==5143== indirectly lost: 0 bytes in 0 blocks
==5143== possibly lost: 0 bytes in 0 blocks
==5143== still reachable: 221,184 bytes in 1 blocks
==5143== suppressed: 0 bytes in 0 blocks
==5143==
==5143== For counts of detected and suppressed errors, rerun with: -v
==5143== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 4 from 4)
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.