I want to share the webcam (Logitech Quickcam Pro 9000) picture with more than one application at the same time.
I've looked around the net. Here's what I found: - webcamstudio: The newest java tar-gz version does not even show the webcam picture - v4l2loopback: The AFAIK most interesting approach. However, I seem to need mjpegtools_yuv_to_v4l. As I'm unable to compile it on LUbuntu 12.10, I installed Intrepid in a VM and compiled it there.
ffmpeg -f video4linux2 -i /dev/video0 -s 1280x1024 -r 5 -pix_fmt yuv420p -sws_flags lanczos -s 160x120 -r 5 -f yuv4mpegpipe -an - | ./mjpegtools_yuv_to_v4l /dev/video1
leads to
Input #0, video4linux2, from '/dev/video0': Duration: N/A, start: 303506.618990, bitrate: 147456 kb/s Stream #0.0: Video: rawvideo, yuyv422, 640x480, 147456 kb/s, 30 tbr, 1000k tbn, 30 tbc [buffer @ 0x1659200] w:640 h:480 pixfmt:yuyv422 [scale @ 0x1658860] w:640 h:480 fmt:yuyv422 -> w:160 h:120 fmt:yuv420p flags:0x200 Output #0, yuv4mpegpipe, to 'pipe:': Metadata: encoder : Lavf53.21.1 Stream #0.0: Video: rawvideo, yuv420p, 160x120, q=2-31, 200 kb/s, 90k tbn, 5 tbc Stream mapping: Stream #0.0 -> #0.0 Press ctrl-c to stop encoding
mjpegtools_yuv_to_v4l: ioctl (VIDIOCGCAP): Inappropriate ioctl for device mjpegtools_yuv_to_v4l: Starting video stream. mjpegtools_yuv_to_v4l: Error writing to pipe, aborting.
Sometimes, these error messages do not appear, but the prompt is returning immediately, althrough I can confirm that ffmpeg is sending some data through the pipe.
In short: I can't get it to work. Am I using the loopback driver wrong? I couldn't find anything helpful on how to use the driver, esp. how to feed it with input.
Thank you very much :)