You are not logged in.

#1 2011-02-21 14:51:44

jni
Member
Registered: 2009-10-30
Posts: 36

Webcam clone - avld

Hi,

I am trying to clone a webcam (well, ultimatly i want to do video0 -> filtering with opencv -> video1). I use avld as a kernel module and the second video device works fine, but piping video to it seems like a problem.

I have tried a simple tee /dev/video0 >> /dev/video1, but this doesn't work (no idea why either).

After some googling, i found a command line with mencoder that i slightly modified, it looks like :

mencoder tv:// -tv "driver=v4l2:device=/dev/video1:noaudio" -nosound -vf format=rgb24,scale=640:320 -ovc raw -of rawvideo -o /dev/video0
(yes video1 and video0 are reversed, i loaded avld before plugging the webcam).

Then reading it : (i tried a few other programs as well, mplayer gave me the "best" result with the most options)

mplayer tv:// -tv "driver=v4l:device=/dev/video0:noaudio" -vf format=rgb24,scale=640:320

And this just gives a pixelized green-ish and magenta-ish image (from which i cannot take a screenshot - it ends up black). You can see that it's moving though, so the "piping" works, it's just the colors that don't seem to work. I showed the commands with rgb24, but i tried to modify that with several others and i always get the same output.

Using v4l2 with the mplayer line just doesn't work, mplayer dies saying :

v4l2: ioctl query capabilities failed: Invalid argument
v4l2: ioctl set mute failed: Invalid argument
v4l2: 0 frames successfully processed, 0 frames dropped.

and then exit 0.

If any1 has an idea of what i could be missing, it would be greatly appreciated. Also, i need this to be rather "low on resources" and no GUI, so no solution like webcamstudio or other java cookie monsters are gonna work.

Thanks

Offline

#2 2011-02-21 19:41:42

briest
Member
From: Katowice, PL
Registered: 2006-05-04
Posts: 468

Re: Webcam clone - avld

Offline

Board footer

Powered by FluxBB