Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Multimedia
  • Search

Webcam works for a while then stops.

Help with creation, editing, or playback of sounds, images, or video. Amarok, audacious, mplayer, grip, cdparanoia and anything else that makes a sound or plays a video.
Post Reply
Advanced search
12 posts • Page 1 of 1
Author
Message
moult
Retired Dev
Retired Dev
User avatar
Posts: 146
Joined: Mon Mar 31, 2008 2:02 pm
Location: Australia
Contact:
Contact moult
Website

Webcam works for a while then stops.

  • Quote

Post by moult » Wed Nov 25, 2009 12:16 am

My webcam is built in and listed under lsusb as Bus 003 Device 002: ID 064e:a103 Suyin Corp. Acer/HP Integrated Webcam [CN0314]. It is listed as support on this page http://linux-uvc.berlios.de/ and therefore uses UVC. Running mplayer tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video1 -fps 15 will only show the webcam after a fresh boot. After a short while of showing video the screen will freeze (as in the video will stop) and trying to rerun the command will either result in:

1) A green screen
2) This error message:

Code: Select all

MPlayer SVN-r29463-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  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
Xlib:  extension "XFree86-VidModeExtension" missing on display ":1000.0".
[VO_XV] It seems there is no Xvideo support for your video card available.
[VO_XV] Run 'xvinfo' to verify its Xv support and read
[VO_XV] DOCS/HTML/en/video.html#xv!
[VO_XV] See 'mplayer -vo help' for other (non-xv) video out drivers.
[VO_XV] Try -vo x11.
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Unsupported PixelFormat -1
Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG)
==========================================================================
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 
V:   0.0   8/  8 ??% ??% ??,?% 0 0 

MPlayer interrupted by signal 2 in module: video_read_frame
v4l2: select timeout
v4l2: select timeout  0%  0.0% 0 0 
v4l2: ioctl set mute failed: Invalid argument
v4l2: 1 frames successfully processed, 0 frames dropped.
3) This error message (more common):

Code: Select all

MPlayer SVN-r29463-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: unable to open '/dev/video1': No such file or directory
v4l2: ioctl set mute failed: Bad file descriptor
v4l2: 0 frames successfully processed, 0 frames dropped.
After one of these errors occur it will never show any video again. Sometimes I can get it to show video again for a short while by changing from /dev/video0 to video1 or video2 (sometimes those files don't even exist) but it quickly goes to showing an error again. I can reboot and it will start working again - for a while until it starts showing errors again.

Note: using v4l doesn't work, only v4l2 does.

My kernel setup:

Code: Select all

Device Drivers  --->
  Multimedia devices  --->
    <*> Video For Linux
    [ ]   Enable Video For Linux API 1 (DEPRECATED)
    [*]   Enable Video For Linux API 1 compatible Layer
    [*] Video capture adapters  --->
      [*]   V4L USB devices  --->
        <*>   USB Video Class (UVC)
Any ideas?
Last edited by moult on Sun Sep 26, 2010 2:24 am, edited 1 time in total.
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!
Top
moult
Retired Dev
Retired Dev
User avatar
Posts: 146
Joined: Mon Mar 31, 2008 2:02 pm
Location: Australia
Contact:
Contact moult
Website

  • Quote

Post by moult » Sun Dec 27, 2009 9:52 pm

Bumping thread. Don't see the point of making a new one and I've unfortunately made no progress on this one.
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!
Top
moult
Retired Dev
Retired Dev
User avatar
Posts: 146
Joined: Mon Mar 31, 2008 2:02 pm
Location: Australia
Contact:
Contact moult
Website

  • Quote

Post by moult » Wed Jul 07, 2010 5:22 pm

Bumpity bump.
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!
Top
moult
Retired Dev
Retired Dev
User avatar
Posts: 146
Joined: Mon Mar 31, 2008 2:02 pm
Location: Australia
Contact:
Contact moult
Website

  • Quote

Post by moult » Tue Aug 24, 2010 10:28 am

BumpbumpbumpbumpbumpBANG.
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!
Top
chithanh
Retired Dev
Retired Dev
User avatar
Posts: 2158
Joined: Sat Aug 05, 2006 10:16 pm
Location: Berlin, Germany

  • Quote

Post by chithanh » Mon Aug 30, 2010 4:31 pm

Pro tip: If you bump your thread, it will no longer be listed in the special "unanswered threads" search.

Please also post kernel .config.
Do you get the same issue when saving the video with mencoder instead of playback with mplayer?
Top
iss
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 134
Joined: Mon Oct 30, 2006 8:36 am
Location: Poland/Bydgoszcz
Contact:
Contact iss
Website

  • Quote

Post by iss » Mon Aug 30, 2010 7:54 pm

Also paste dmesg after webcam freeze.
Top
moult
Retired Dev
Retired Dev
User avatar
Posts: 146
Joined: Mon Mar 31, 2008 2:02 pm
Location: Australia
Contact:
Contact moult
Website

  • Quote

Post by moult » Tue Aug 31, 2010 12:54 am

Here is my kernel config: http://e2-productions.com/config.txt

Here is the output from trying to record with mencoder:

Code: Select all

dion@epicbox ~ $ mencoder tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0 -ovc lavc -o test.avi
MEncoder SVN-r29796-4.3.4 (C) 2000-2009 MPlayer Team
success: format: 9  data: 0x0 - 0x0
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
v4l2: 0 frames successfully processed, 0 frames dropped.
============ Sorry, this file format is not recognized/supported =============
=== If this file is an AVI, ASF or MPEG stream, please contact the author! ===
Cannot open demuxer.

Exiting...
Here is everything webcam related I managed to find in /var/log/dmesg (`dmesg` by itself didn't output anything related), before and after the mplayer/mencoder error messages:

Code: Select all

[    1.842254] usb 1-2: skipped 1 descriptor after configuration
[    1.842282] usb 1-2: skipped 6 descriptors after interface
[    1.842297] usb 1-2: skipped 1 descriptor after endpoint
[    1.842308] usb 1-2: skipped 8 descriptors after interface
[    1.842982] usb 1-2: default language 0x0409
[    1.849485] usb 1-2: udev 3, busnum 1, minor = 2
[    1.849496] usb 1-2: New USB device found, idVendor=064e, idProduct=a103
[    1.849508] usb 1-2: New USB device strings: Mfr=2, Product=1, SerialNumber=3
[    1.849519] usb 1-2: Product: Acer Crystal Eye webcam
[    1.849528] usb 1-2: Manufacturer: SuYin
[    1.849537] usb 1-2: SerialNumber: CN0314-SN30-OV03-VA-R02.03.02
[    1.850044] usb 1-2: usb_probe_device
[    1.850058] usb 1-2: configuration #1 chosen from 1 choice
[    1.850379] usb 1-2: adding 1-2:1.0 (config #1, interface 0)
[    1.853317] uvcvideo 1-2:1.0: usb_probe_interface
[    1.853330] uvcvideo 1-2:1.0: usb_probe_interface - got id
[    1.853398] uvcvideo: Found UVC 1.00 device Acer Crystal Eye webcam (064e:a103)
[    1.869768] Synaptics Touchpad, model: 1, fw: 6.5, id: 0x81a0b1, caps: 0xa04711/0xa04000/0x0
[    1.870544] input: Acer Crystal Eye webcam as /devices/pci0000:00/0000:00:02.1/usb1/1-2/1-2:1.0/input/input6
[    1.870913] usb 1-2: adding 1-2:1.1 (config #1, interface 1)
[    1.871227] drivers/usb/core/inode.c: creating file '003'
[    1.871394] hub 2-0:1.0: state 7 ports 3 chg 0006 evt 0000
[    1.871422] hub 2-0:1.0: port 1, status 0501, change 0000, 480 Mb/s
... and here's everything webcam-related I found in /var/log/messages just for completeness:

Code: Select all

Nov 29 17:09:59 localhost [  265.871805] usb 1-2: Product: Acer Crystal Eye webcam
Nov 29 17:09:59 localhost [  265.871807] usb 1-2: Manufacturer: SuYin
Nov 29 17:09:59 localhost [  265.871809] usb 1-2: SerialNumber: CN0314-SN30-OV03-VA-R02.03.02
Nov 29 17:09:59 localhost [  265.871814] hub 1-0:1.0: state 7 ports 6 chg 0000 evt 0004
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!
Top
iss
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 134
Joined: Mon Oct 30, 2006 8:36 am
Location: Poland/Bydgoszcz
Contact:
Contact iss
Website

  • Quote

Post by iss » Wed Sep 08, 2010 11:45 am

If your webcam is connected trough a hub try connecting it to port directly on motherboard. Or try different port.
Check if media-video/guvcview hangs too.
If you can check your webcam with other pc.
Top
moult
Retired Dev
Retired Dev
User avatar
Posts: 146
Joined: Mon Mar 31, 2008 2:02 pm
Location: Australia
Contact:
Contact moult
Website

  • Quote

Post by moult » Wed Sep 08, 2010 1:23 pm

First line, first post says the webcam is built-in. This is a laptop (Acer Aspire 4530).

guvcview just gives me a black screen (and an options window of course but that's unimportant). Here's the terminal output.

Code: Select all

epicbox ~ # guvcview 
guvcview 1.2.2
Could not open /root/.guvcviewrc for read,
 will try to create it
write /root/.guvcviewrc OK
video device: /dev/video0 
/dev/video0 - device 1
Init. Acer Crystal Eye webcam (location: usb-0000:00:02.0-2)
{ pixelformat = 'MJPG', description = 'MJPEG' }
{ discrete: width = 640, height = 480 }
        Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, 
{ discrete: width = 352, height = 288 }
        Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, 
{ discrete: width = 320, height = 240 }
        Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, 
{ discrete: width = 176, height = 144 }
        Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, 
{ discrete: width = 160, height = 120 }
        Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, 
vid:064e 
pid:a103 
driver:uvcvideo
checking format: 1196444237
VIDIOC_G_COMP:: Invalid argument
   compression control not supported
fps is set to 1/25
V4L2_CTRL_FLAG_NEXT_CTRL supported
 Could not grab image (select timeout): Resource temporarily unavailable
 Could not grab image (select timeout): Resource temporarily unavailable
 Could not grab image (select timeout): Resource temporarily unavailable
 Could not grab image (select timeout): Resource temporarily unavailable
 Could not grab image (select timeout): Resource temporarily unavailable
 Could not grab image (select timeout): Resource temporarily unavailable
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!
Top
chithanh
Retired Dev
Retired Dev
User avatar
Posts: 2158
Joined: Sat Aug 05, 2006 10:16 pm
Location: Berlin, Germany

  • Quote

Post by chithanh » Fri Sep 10, 2010 8:10 am

Something is fishy. If mplayer can play it, then mencoder can capture it. There are only very few exceptions to this (dvdnav:// and the like). The question is whether the problem appears after a short while of capturing or no.
Top
iss
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 134
Joined: Mon Oct 30, 2006 8:36 am
Location: Poland/Bydgoszcz
Contact:
Contact iss
Website

  • Quote

Post by iss » Fri Sep 10, 2010 11:39 am

Moult wrote:First line, first post says the webcam is built-in. This is a laptop (Acer Aspire 4530).
Sorry, I missed it.

You can try with different versions of Ubuntu Live CD to check if some older combination of drivers will work.
Top
moult
Retired Dev
Retired Dev
User avatar
Posts: 146
Joined: Mon Mar 31, 2008 2:02 pm
Location: Australia
Contact:
Contact moult
Website

  • Quote

Post by moult » Sun Sep 26, 2010 2:22 am

In the middle of downloading a LiveCD, my internets is rather slow nowadays.

Here's a little progress I have made. Running mplayer tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0 -fps 15 now no longer makes it complain about "Xlib: extension "XFree86-VidModeExtension" missing on display ":1000.0".". No idea why, but if it's complaining about one less thing surely that's a good thing. Here's the new full output (this now happens 100% of the time - good, consistency is good):

Code: Select all

MPlayer SVN-r29796-4.4.3 (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  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
Unsupported PixelFormat -1
Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG)
==========================================================================
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.0% 0 0 
V:   0.0  11/ 11  4%  0%  0.0% 0 0 

MPlayer interrupted by signal 2 in module: video_read_frame
v4l2: select timeout
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)
Also, the third error message I quoted in the first post which I marked as "more common" now no longer seems to happen. The above message constantly comes up.

I can recreate the green screen I mentioned in the first post by running LD_PRELOAD=/usr/lib64/libv4l/v4l2convert.so mplayer tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0 -fps 15. The error message for the green screen is similar to the one I just quoted with the exception of a few errors being rearranged (ie. complaining about one first then another), and having this additional error message:

Code: Select all

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
Note: running the "green screen fix" as noted here by changing to v4l1compat.so and driver=v4l just plain doesn't work.
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!
Top
Post Reply

12 posts • Page 1 of 1

Return to “Multimedia”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy