ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hi, i just got myself an eeepc, and think its great.
i want to do some image recognition/AI programming with the webcam.
the webcam's dev node is /dev/video0.
i assume this is just a bitmap which(like everything in unix) can be read like a file.
the problem is, i can't even dump a frame to a file:
Code:
asus-852305267:/home/user> cat /dev/video0 > vid.raw
cat: /dev/video0: No such device
BUT IT'S RIGHT THERE??!!! how can there be no such device???
i also tried doing it with dd, but same result.
is there something i need to do to enable the webcam first? maybe something which also activates the little LED next to it to tell the user it is active.
i tried this:
Code:
echo 1 > /proc/acpi/asus/camera
it did change the number from 0 to 1, but the problem persists, and the LED remains off.
asus-852305267:/home/user> cat /dev/video0 > vid.raw
cat: /dev/video0: No such device
BUT IT'S RIGHT THERE??!!! how can there be no such device???
i also tried doing it with dd, but same result.
is there something i need to do to enable the webcam first?
You don't say what distribution you're using, so it's hard to be more specific.
This link http://gentoo-wiki.com/Asus_Eee_PC_701#Webcam gives you more info. Looks like you need the uvcvideo module loaded, so the camera will be enabled. Have you loaded this module, or checked for it? Do an "lsmod | grep uvcvideo", and see if it's there. If not, try doing a "modprobe uvcvideo" and see if it loads (need to be root to do this). If it's there, have you looked in /dev, to see if the video0 node is there?
sorry, i should have said.
im using the stock eee Xandros.
its an eeepc 900.
it's not that the camera doesn't work - it does in skype etc..
i just need to write a program in C to interface it. i assumed the device node would be the easiest way.
no I think you may be wrong, i read a post on this site which gave me the impression that you read streaming video from the file, not a frame. that could be your problem.
MPlayer 1.0rc1-4.1.2-DFSG-free (C) 2000-2006 MPlayer Team
CPU: Intel(R) Celeron(R) M processor 900MHz (Family: 6, Model: 13, Stepping: 8)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
Warning unknown option ao_driver at line 12
Warning unknown option ao_alsa_mixer_channel at line 13
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 tv://.
TV file format detected.
Selected driver: v4l
name: Video 4 Linux input
author: Alex Beregszaszi
comment: under development
=================================================================
WARNING: YOU ARE USING V4L DEMUXER WITH V4L2 DRIVERS!!!
As the V4L1 compatibility layer is broken, this may not work.
If you encounter any problems, use driver=v4l2 instead.
Bugreports on driver=v4l with v4l2 drivers will be ignored.
=================================================================
Selected device: CNF7129
Capabilites: capture
Device type: 1
Supported sizes: 48x32 => 1280x1024
Inputs: 1
ioctl get channel failed: Invalid argument
ioctl get mbuf failed: Invalid argument
MPlayer interrupted by signal 11 in module: demux_open
- MPlayer crashed by bad usage of CPU/FPU/RAM.
Recompile MPlayer with --enable-debug and make a 'gdb' backtrace and
disassembly. Details in DOCS/HTML/en/bugreports_what.html#bugreports_crash.
- MPlayer crashed. This shouldn't happen.
It can be a bug in the MPlayer code _or_ in your drivers _or_ in your
gcc version. If you think it's MPlayer's fault, please read
DOCS/HTML/en/bugreports.html and follow the instructions there. We can't and
won't help unless you provide this information when reporting a possible bug.
/home/user>
MPlayer 1.0rc1-4.1.2-DFSG-free (C) 2000-2006 MPlayer Team
CPU: Intel(R) Celeron(R) M processor 900MHz (Family: 6, Model: 13, Stepping: 8)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
Warning unknown option ao_driver at line 12
Warning unknown option ao_alsa_mixer_channel at line 13
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 tv://.
TV file format detected.
Selected driver: v4l2
name: Video 4 Linux 2 input
author: Martin Olschewski <olschewski@zpr.uni-koeln.de>
comment: first try, more to come ;-)
v4l2: ioctl get standard failed: Invalid argument
Selected device: CNF7129
Capabilites: video capture streaming
supported norms:
inputs: 0 = Camera 1;
Current input: 0
Current format: YUYV
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl enum norm failed: Invalid argument
Error: Cannot set norm!
Selected input hasn't got a tuner!
v4l2: ioctl set mute failed: Invalid argument
FPS not specified in the header or invalid, use the -fps option.
No stream found.
v4l2: ioctl set mute failed: Invalid argument
v4l2: 0 frames successfully processed, 0 frames dropped.
Exiting... (End of file)
jiml8, i tried it, no difference.
i tried everything as root anyway, doesnt work.
I tried it on my larger laptop - acer aspire 4xxx.
it has a webcam in the lid, and is behaving exactly the same.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.