Why does Ubuntu create at one day /dev/video0 and at another day /dev/video1?
Detlef Lechner wrote:
> last night my Karmic computer had a file /dev/video0. Today (after
> thawing) it does not have it any more but it has a device file
> /dev/video1. Why does Ubuntu create at one day /dev/video0 and at
> another day /dev/video1?
From your remark "after thawing" I suppose you had the machine in sleep
mode. As you are probably talking about your USB webcam, this fact seems
to be important to me.
The kernel uses video0 for the first installed device then video1 for
the second device and so on. However if the expected device name is in
use, the kernel takes the next name. You can check it if you insert your
webcam and start the program cheese (xawtv may work also). Unplug the
webcam while cheese is still running and plug it in again. Then stop
cheese and check which devices you have - it should be /dev/video1 if it
was /dev/video0 before.
Now if you put the machine in sleep mode, you may have left xawtv
running while you put it to sleep. When the machine wakes up, it powers
up the USB port and the webcam is found but video0 is in use by xawtv
which lets the kernel use video1 instead.
> Today '~$ xawtv /dev/video1;
> This is xawtv-3.95.dfsg.1, running on Linux/i686 (2.6.31-14-generic);
> xinerama 0: 1400x1050+0+0;
> WARNING: No DGA direct video mode for this display.
> can't open /dev/video0: No such file or directory.'
> Why does this program tell me this? I've told it to use /dev/video1.
No, you didn't. If you want it to use video1, the command would be
"xawtv -c /dev/video1".
ubuntu-users mailing list
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users