LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
LinkBack Search this Thread
Old 10-23-2006, 05:12 PM   #1
rubadub
Member
 
Registered: Jun 2004
Posts: 233

Rep: Reputation: 33
v4l


Hi,
Right, i'm installing a web-cam, it seems to have gone ok, yet none of my python libaries are finding it.

I'm running Fedora 4, with kernel 2.6.17-1.2142_FC4, my output from lsusb is, Bus 002 Device 002: ID 046d:0921 Logitech, Inc. Labtec WebCam.

Okay, down to the nitty gritty.
I made and installed the 'spca50x' (gspcav1-20060925.tar.gz) driver.
Next, I:
# mknod /dev/video0 c 81 0
Then:
# /sbin/modprobe -v gspca
I'd set group permissions etc, then tested with a script for mplayer and mencoder. Everything seems to work ok.

Now down to real business:

First I tried "libfg"
For 'libfg', I run the basic script as follows, but it gives me the following error, any ideas?

Code:
# #!/usr/bin/env python
#
# import fg
# g = fg.Grabber ()
# g.set_source(0)
# g.demo('test01.pgm')
Quote:
$ python test2.py
fg_open(): open video device failed: No such file or directory
fg_set_source(0)
Segmentation fault

For 'Pyv4l' i'm using the included script 'tv.py' (pls find yourself, it's included in the install).
But yet again I get an error and i'm not sure why, any ideas?

Quote:
$ python tv.py
Device Name: Labtec Webcam
Type: 1
Channels: 1
Audios: 0
Maximum Width: 352
Maximum Height: 288
Minimum Width: 160
Minimum Height: 120
(0, 'TV8532', 0)
Traceback (most recent call last):
File "tv.py", line 24, in ?
vid.setFrequency(216250)
v4l.V4lError: Error setting frequency.
Also i've found 'pyvideograb'. I installed this, then ran the test.py script. Here's my error output:
Quote:
# python test.py
Opening device...
Traceback (most recent call last):
File "test.py", line 21, in ?
pixelformat=v4l2_consts.V4L2_PIX_FMT_GREY
directvideo.DirectVideoError: /dev/video0 is no V4L2 device
From this it seems that my device isn't a v4l device. So, i've been back to the v4l site and verified the driver i'm using is on their list, the SPCA50X USB Camera Linux Driver, 'gspcav1-20060925.tar.gz'.

This error could be the way to solving the problems with the other programs. Does anybody have any suggestions to the setup of my device or for checking it?
 
Old 10-23-2006, 05:23 PM   #2
rubadub
Member
 
Registered: Jun 2004
Posts: 233

Original Poster
Rep: Reputation: 33
Sorry, a bit drunkard like!

To summerise, have I set the device up as v4l or v4l2 device, if not how. Or is there any other libaries / modules for python that I can use to grab stills?
 
Old 10-24-2006, 12:19 PM   #3
rubadub
Member
 
Registered: Jun 2004
Posts: 233

Original Poster
Rep: Reputation: 33

I know it's pushy, yet I really could do with some assistance cos i'm at a loss, therefore i'm jumping to the top!
 
Old 10-24-2006, 02:01 PM   #4
Phorem
Member
 
Registered: Nov 2003
Location: Toronto, Canada
Distribution: Gentoo AMD64
Posts: 374

Rep: Reputation: 30
Why did you do....

mknod /dev/video0 c 81 0

??

Where did you read you are supposed to do that? Remove that device.

Really, i think, all you are/were supposed to do is make the gspcav1 module. Modprobe it and plug in your camcorder. V4L should have handled the rest for you. If you are using KDE, fire open kdeTv and see if you can see yourself - obviously with the video cam plugged in.
 
Old 10-25-2006, 05:26 AM   #5
rubadub
Member
 
Registered: Jun 2004
Posts: 233

Original Poster
Rep: Reputation: 33
Cheers Phorem,

I'm not to sure how to remove said device, I can't find a 'rmnod' command, so i've 'rm''d it, rebooted, then 'modprobe' again. I still get the same errors when trying the python modules. Mplayer and Mencoder still work, i've not tried 'kdeTv' yet cos my yum is trippin out, i'll find and do manually, yet I think the prob still stands.

(Maybe prob still stands cos i've not removed my implimentation of the device properly yet?)

p.s. http://tldp.org/HOWTO/Webcam-HOWTO/ was where I got info from...
 
Old 10-25-2006, 12:36 PM   #6
rubadub
Member
 
Registered: Jun 2004
Posts: 233

Original Poster
Rep: Reputation: 33
Well I believe my prob with 'yum' is because fedora.com is down.

However, i've also tried scanimage:
Code:
$ scanimage -d v4l:/dev/video0 >o.pnm
scanimage: sane_start: Invalid argument
and the error is, but not sure why, i've tried many variations.

This might give extra info:
Code:
$ scanimage -L
device `v4l:/dev/video0' is a Noname Labtec Webcam virtual device
And i'm presuming that this shows the device is set up as a v4l device! So i'm throughly lost!
 
  


Reply

Tags
v4l


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting 3D (ATI) and v4l to co-exist dougieb Linux - Hardware 1 11-05-2005 05:35 AM
V4L Bt878 exkor5000 Linux - Software 2 02-12-2005 10:39 AM
Need serious help with webcam and /dev/v4l jeffreybluml Linux - Newbie 0 07-16-2004 01:12 PM
RH8.0 and V4l fadedspoon Linux - Newbie 2 02-06-2003 06:40 AM
RH80 and v4l fadedspoon Linux - Hardware 0 02-06-2003 04:01 AM


All times are GMT -5. The time now is 12:15 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration