Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Webcam not working- well, once in a while it does.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
moult
Retired Dev
Retired Dev


Joined: 31 Mar 2008
Posts: 146
Location: Australia

PostPosted: Thu Jun 11, 2009 3:36 pm    Post subject: Webcam not working- well, once in a while it does. Reply with quote

(if I put this in the wrong section eg: multimedia might be better - sorry and please move it for me - can I move it by myself?)

I'm trying to get my Webcam working.
My webcam is shown in `lsusb` as Bus 003 Device 002: ID 064e:a103 Suyin Corp. It
seems to be a UVC webcam. I am running Kernel 2.6.29-gentoo-r5. This means that
I need to compile the drivers into the kernel itself.

I have this enabled in the kernel:
Device Drivers --->
Multimedia devices --->
<*> Video For Linux
[*] Enable Video For Linux API 1 compatible Layer
[*] Video capture adapters --->
[*] V4L USB devices --->
<*> USB Video Class (UVC)
[*] UVC input events device support

I have followed http://en.gentoo-wiki.com/wiki/Webcam and on the website it
links to for a list of supported devices (http://linux-uvc.berlios.de) I have
mine listed as 064e:a101 Acer CrystalEye webcam (Acer notebooks) SuYin.

Also note that I did not choose "Enable Video For Linux API 1 (DEPRECIATED)" but
instead the "compatible Layer" version - I remember from last time that changing
to this fixed it.

Running mplayer tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0
-fps 15 gives me:

Code:
MPlayer SVN-r28450-4.1.2 (C) 2000-2009 MPlayer Team                                           
CPU: AMD Turion(tm) X2 Dual-Core Mobile RM-72 (Family: 17, Model: 3, Stepping: 1)             

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: your device driver does not support VIDIOC_G_STD ioctl, VIDIOC_G_PARM was used instead.
Selected device: Acer Crystal Eye webcam                                                     
 Capabilites:  video capture  streaming                                                     
 supported norms:                                                                           
 inputs: 0 = Camera 1;
 Current input: 0
 Current format: MJPEG
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
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
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG decoder)
==========================================================================
Audio: no sound
FPS forced to be 15.000  (ftime: 0.067).
Starting playback...
v4l2: select timeout ??% ??,?% 0 0
v4l2: select timeout ??% ??,?% 0 0
v4l2: select timeout ??% ??,?% 0 0
v4l2: select timeout ??% ??,?% 0 0
V:   0.0   9/  9  7%  0%  0.0% 0 0

MPlayer interrupted by signal 2 in module: video_read_frame
v4l2: select timeout  0%  0.0% 0 0
v4l2: ioctl set mute failed: Invalid argument
v4l2: 1 frames successfully processed, 0 frames dropped.

Exiting... (Quit)


I do have a /dev/video0 file.

What's interesting is that sometimes, it _does_ work. FOr example just after recompiling and rebooting the kernel. However after watching myself one or two times, using it on Skype once or twice, I'm not sure what triggers it, but it just stops working.

Any ideas? Any more information I need to give?
_________________
thinkMoult - I write articles online. You might like some of them.
Planet Larry - do you write a blog and use Gentoo? Get your blog added to the Planet Larry Gentoo user blog aggregator!


Last edited by moult on Tue Jun 16, 2009 7:58 am; edited 1 time in total
Back to top
View user's profile Send private message
tuber
Apprentice
Apprentice


Joined: 12 Nov 2004
Posts: 267

PostPosted: Fri Jun 12, 2009 2:18 am    Post subject: Reply with quote

See https://forums.gentoo.org/viewtopic-t-721826.html and try the LD_PRELOAD trick; it worked for me.
Back to top
View user's profile Send private message
moult
Retired Dev
Retired Dev


Joined: 31 Mar 2008
Posts: 146
Location: Australia

PostPosted: Fri Jun 12, 2009 10:25 am    Post subject: Reply with quote

I think my issue is a bit different.

What's interesting that I found out was that when it works, it works when I have a /dev/video1 file. However I'm not sure what triggers it again, but maybe after using the /dev/video1 file once or twice via mplayer or skype, the file just..disappears. I then only have a /dev/video (which is a symlink to nowhere) and then later sometimes a /dev/video0 pops up. It never works with the /dev/video0, and that gives the output error (in mplayer) shown above.

Any ideas?
_________________
thinkMoult - I write articles online. You might like some of them.
Planet Larry - do you write a blog and use Gentoo? Get your blog added to the Planet Larry Gentoo user blog aggregator!
Back to top
View user's profile Send private message
moult
Retired Dev
Retired Dev


Joined: 31 Mar 2008
Posts: 146
Location: Australia

PostPosted: Tue Jun 16, 2009 7:57 am    Post subject: Reply with quote

Bump.

Still haven't worked it out. However here is the output with the LD_PRELOAD trick. What I do see is a green screen, that's it.

Code:
epicbox ~ # LD_PRELOAD=/usr/lib64/libv4l/v4l1compat.so mplayer tv:// -tv driver=v4l:width=640:height=480:device=/dev/video -fps 15                                                                                                       
MPlayer 29040-4.3.2 (C) 2000-2009 MPlayer Team                                                                     

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: Acer Crystal Eye webcam                         
 Capabilites: capture                                           
 Device type: 1                                                 
 Supported sizes: 160x120 => 640x480                             
 Inputs: 1                                                       
  0: Camera 1:  (tuner:0, norm:pal)                             
Using input 'Camera 1'                                           
Selected input hasn't got a tuner!                               
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video                       
VDec: vo config request - 640 x 480 (preferred colorspace: Planar YV12)   
VDec: using Planar YV12 as output csp (no 0)                             
Movie-Aspect is undefined - no prescaling applied.                       
VO: [xv] 640x480 => 640x480 Planar YV12                                   
Selected video codec: [rawyv12] vfm: raw (RAW YV12)                       
==========================================================================
Audio: no sound                                                           
FPS forced to be 15.000  (ftime: 0.067).                                 
Starting playback...                                                     
libv4l2: error converting / decoding frame data: v4l-convert: error parsing JPEG header: Not a JPG file ?


V:   0.0   1/  1 ??% ??% ??,?% 0 0

MPlayer interrupted by signal 2 in module: video_read_frame


MPlayer interrupted by signal 2 in module: video_read_frame
epicbox ~ # LD_PRELOAD=/usr/lib64/libv4l/v4l1compat.so mplayer tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video -fps 15                                                                                                       
MPlayer 29040-4.3.2 (C) 2000-2009 MPlayer Team                                                                       

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: your device driver does not support VIDIOC_G_STD ioctl, VIDIOC_G_PARM was used instead.
Selected device: Acer Crystal Eye webcam                                                     
 Capabilites:  video capture  read/write  streaming                                         
 supported norms:                                                                           
 inputs: 0 = Camera 1;                                                                       
 Current input: 0                                                                           
 Current format: MJPEG                                                                       
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.                         
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
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 640 x 480 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO: [xv] 640x480 => 640x480 Planar YV12
Selected video codec: [rawyv12] vfm: raw (RAW YV12)
==========================================================================
Audio: no sound
FPS forced to be 15.000  (ftime: 0.067).
Starting playback...
v4l2: select timeout ??% ??,?% 0 0
v4l2: select timeout ??% ??,?% 0 0
libv4l2: error converting / decoding frame data: v4l-convert: error parsing JPEG header: Not a JPG file ?


v4l2: ioctl dequeue buffer failed: Input/output error, idx = 0
v4l2: select timeout ??% ??,?% 0 0
libv4l2: error dequeuing buf: Invalid argument
v4l2: ioctl set mute failed: Invalid argument
v4l2: 0 frames successfully processed, 1 frames dropped.

Exiting... (Quit)
epicbox ~ #


Any other ideas?
_________________
thinkMoult - I write articles online. You might like some of them.
Planet Larry - do you write a blog and use Gentoo? Get your blog added to the Planet Larry Gentoo user blog aggregator!
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Sat Aug 08, 2009 10:52 pm    Post subject: Reply with quote

I only today got this working, on a similar laptop

I have all of the stuff - my kernel config, everything, dumped here - http://whitehathouston.com/hardware/Laptop/Acer%20Aspire%204736z/

The one thing I did have to do besides simply rebuilding the kernel and emerging cheese && skype, was add myself to the 'video' group

There's a diff in there showing what I added to the kernel; hope this helps somewhat.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum