LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   ivtv - can't open capture device - /dev/video0 (http://www.linuxquestions.org/questions/linux-hardware-18/ivtv-cant-open-capture-device-dev-video0-410311/)

rrrssssss 02-01-2006 03:54 AM

ivtv - can't open capture device - /dev/video0
 
Hello forum,

I have successfully? installed ivtv with no error messages in the kernel log but all of the TV applications I have tried to use gives an error message pertaining to video0. I am using the WinTV 150 capture card. I have the same problem in root, so it can't be a permissions issue. And just for the record, I do have a video0 in the /dev directory, along with video, video1, video24 and video32.



TVtime gives this error:

video input: card failed to allocate capture buffers: invalad argument. No video source.



The DVR (digital video recorder) capture program gives this error:

Can't obtain the description of the video buffer mapping: invalad argument.



I also get simular errors with xawtv, and Kdetv always crashes with this card.


Do any of these applications even work with the WinTV 150 card?


I also have a Turtle Beach capture card installed that Linux recognizes as a Hauppauge 88x chip based WinTV PCI card and the TV applications work fine with it (uses video1), but I want to use the WinTV 150 card (video0).

Can anybody at least give me a hint as to what the problem is?



My lsmod reads like this for these two capture cards:

cx8800 27916 0
cx88xx 49856 1 cx8800
video_buf 18372 2 cx8800,cx88xx
ir_common 7076 1 cx88xx
v4l1_compat 13892 1 cx8800
v4l2_common 5632 1 cx8800
btcx_risc 4904 2 cx8800,cx88xx
tda9887 16856 0
wm8775 6836 0
cx25840 29144 0
tuner 24328 0
tveeprom 14004 1 cx88xx
ivtv 217364 10
firmware_class 8544 2 cx25840,ivtv
i2c_algo_bit 9480 2 cx88xx,ivtv
i2c_core 18656 8 cx88xx,tda9887,wm8775,cx25840,tuner,tveeprom,ivtv,i2c_algo_bit
videodev 8224 13 cx8800,cx88xx,ivtv

The lspci for the WinTV 150 card reads like this:

00:0f.0 Multimedia video controller: Internext Compression Inc iTVC16 (CX23416) MPEG-2 Encoder (rev 01)

The lspci for the Turtle Beach card (88x) reads like this:

02:0d.0 Multimedia video controller: Conexant CX23880/1/2/3 PCI Video and Audio Decoder (rev 05)


Finally, the dmesg for the WinTV 150 card reads like this:

Linux video capture interface: v1.00
ivtv: ==================== START INIT IVTV ====================
ivtv: version 0.4.2 (tagged release) loading
ivtv: Linux version: 2.6.12-12mdksmp SMP 686 gcc-4.0
ivtv: In case of problems please include the debug info between
ivtv: the START INIT IVTV and END INIT IVTV lines, along with
ivtv: any module options, when mailing the ivtv-users mailinglist.
ivtv0: User specified WinTV PVR 150 card (detected cx23416 based chip)
ACPI: PCI Interrupt 0000:00:0f.0[A] -> GSI 18 (level, low) -> IRQ 18
ivtv0: Unreasonably low latency timer, setting to 64 (was 32)
tveeprom: ivtv version
tveeprom: Hauppauge: model = 26552, rev = C268, serial# = 8754695
tveeprom: tuner = LG TAPE H001F MK3 (idx = 68, type = 47)
tveeprom: tuner fmt = NTSC(M) (eeprom = 0x08, v4l2 = 0x00001000)
tveeprom: audio processor = CX25843 (type = 25)
tveeprom: decoder processor = CX25843 (type = 1e)
ivtv0: i2c attach to card #0 ok [client=tveeprom, addr=50]
tuner (ivtv): chip found at addr 0xc2 i2c-bus ivtv i2c driver #0
ivtv0: i2c attach to card #0 ok [client=(tuner unset), addr=61]
cx25840 0-0044: ivtv driver
cx25840 0-0044: cx25843-23 found @ 0x88 (ivtv i2c driver #0)
cx25840 0-0044: loaded v4l-cx25840.fw firmware (14264 bytes)
ivtv0: i2c attach to card #0 ok [client=cx25840, addr=44]
wm8775 0-001b: ivtv driver
wm8775 0-001b: chip found @ 0x36 (ivtv i2c driver #0)
ivtv0: i2c attach to card #0 ok [client=wm8775, addr=1b]
Vendor: Lexar Model: Media Inc. CF Rev: 019D
Type: Direct-Access ANSI SCSI revision: 00
Vendor: ST380021 Model: A Rev: 0000
Type: Direct-Access ANSI SCSI revision: 00
Vendor: Lexar Model: Media Inc. SD Rev: 019D
Type: Direct-Access ANSI SCSI revision: 00
usb-storage: device scan complete
Vendor: Lexar Model: Media Inc. SM/xD Rev: 019D
Type: Direct-Access ANSI SCSI revision: 00
Vendor: Lexar Model: Media Inc. MS Rev: 019D
Type: Direct-Access ANSI SCSI revision: 00
usb-storage: device scan complete
Vendor: WD Model: 2500JB External Rev: 0412
Type: Direct-Access ANSI SCSI revision: 00
usb-storage: device scan complete
tda9887 0-0043: (ivtv) chip found @ 0x86 (ivtv i2c driver #0)
ivtv0: i2c attach to card #0 ok [client=tda9887, addr=43]
ivtv0: loaded v4l-cx2341x-enc.fw firmware (262144 bytes)
ivtv0: Encoder revision: 0x02050032
ivtv0: Allocate DMA encoder MPEG stream: 512 x 32768 buffers (16384KB total)
ivtv0: Allocate DMA encoder YUV stream: 3106 x 10800 buffers (32768KB total)
ivtv0: Allocate DMA encoder VBI stream: 960 x 17472 buffers (16384KB total)
ivtv0: Allocate DMA encoder PCM audio stream: 3640 x 4608 buffers (16384KB total)
ivtv0: Create encoder radio stream
tuner: type set to 47 (LG NTSC (TAPE series)) by ivtv i2c driver #0
ivtv0: Initialized WinTV PVR 150, card #0
ivtv: ==================== END INIT IVTV ====================


Any help would be most appreciated.
Roy

Ekkume 02-01-2006 11:28 AM

This page appears to have some walkthroughs...
http://swik.net/PVR-150

I think you might be able to get your system to play dvds using that mpeg codec chip, as well as play streams from "budget" dvb cards without loading your processor.

I have a couple of DVB cards, which work great in Kubuntu Breezy.

haertig 02-01-2006 01:04 PM

You need to rule out if this is a TVtime, xawtv, etc., problem or a hardware/IVTV driver problem.

Assuming you have an antenna/cable hooked up to the PVR-150 tuner coax input, and you have a "channel 9" that you can receive via attached antenna/cable, and you have the "totem" application installed, try:
Code:

# ivtvctl -p 1
# ivtv-tune -c 9
# cat /dev/video0 > /tmp/test.mpg
  (hit ctrl-c to abort the capture after a few seconds, test.mpg will get large FAST)
# totem /tmp/test.mpg
# rm /tmp/test.mpg

What does your /tmp/test.mpg file look like? Is it non-zero length? Does it play in totem?

You should be able to use mplayer, xine, or some other app to view the mpg if you don't have totem installed.

HappyTux 02-01-2006 02:32 PM

I do not see anywhere in your output below where it creates a /dev/video it looks like you should be using a /dev/ivtv0 for the device. I would try this for the device if it still complains then ln -s ivtv0 video0 as root in the /dev/ directory to give a link to the device it is creating.

Code:

Linux video capture interface: v1.00
 ivtv: ==================== START INIT IVTV ====================
 ivtv: version 0.4.2 (tagged release) loading
 ivtv: Linux version: 2.6.12-12mdksmp SMP 686 gcc-4.0
 ivtv: In case of problems please include the debug info between
 ivtv: the START INIT IVTV and END INIT IVTV lines, along with
 ivtv: any module options, when mailing the ivtv-users mailinglist.
 ivtv0: User specified WinTV PVR 150 card (detected cx23416 based chip)
 ACPI: PCI Interrupt 0000:00:0f.0[A] -> GSI 18 (level, low) -> IRQ 18
 ivtv0: Unreasonably low latency timer, setting to 64 (was 32)
 tveeprom: ivtv version
 tveeprom: Hauppauge: model = 26552, rev = C268, serial# = 8754695
 tveeprom: tuner = LG TAPE H001F MK3 (idx = 68, type = 47)
 tveeprom: tuner fmt = NTSC(M) (eeprom = 0x08, v4l2 = 0x00001000)
 tveeprom: audio processor = CX25843 (type = 25)
 tveeprom: decoder processor = CX25843 (type = 1e)
 ivtv0: i2c attach to card #0 ok [client=tveeprom, addr=50]
 tuner (ivtv): chip found at addr 0xc2 i2c-bus ivtv i2c driver #0
 ivtv0: i2c attach to card #0 ok [client=(tuner unset), addr=61]
 cx25840 0-0044: ivtv driver
 cx25840 0-0044: cx25843-23 found @ 0x88 (ivtv i2c driver #0)
 cx25840 0-0044: loaded v4l-cx25840.fw firmware (14264 bytes)
 ivtv0: i2c attach to card #0 ok [client=cx25840, addr=44]
 ivtv0: i2c attach to card #0 ok [client=wm8775, addr=1b]
 tda9887 0-0043: (ivtv) chip found @ 0x86 (ivtv i2c driver #0)
 ivtv0: i2c attach to card #0 ok [client=tda9887, addr=43]
 ivtv0: loaded v4l-cx2341x-enc.fw firmware (262144 bytes)
 ivtv0: Encoder revision: 0x02050032
 ivtv0: Allocate DMA encoder MPEG stream: 512 x 32768 buffers (16384KB total)
 ivtv0: Allocate DMA encoder YUV stream: 3106 x 10800 buffers (32768KB total)
 ivtv0: Allocate DMA encoder VBI stream: 960 x 17472 buffers (16384KB total)
 ivtv0: Allocate DMA encoder PCM audio stream: 3640 x 4608 buffers (16384KB total)
 ivtv0: Create encoder radio stream
 tuner: type set to 47 (LG NTSC (TAPE series)) by ivtv i2c driver #0
 ivtv0: Initialized WinTV PVR 150, card #0
 ivtv: ==================== END INIT IVTV ====================


haertig 02-01-2006 03:01 PM

Quote:

Originally Posted by HappyTux
I do not see anywhere in your output below where it creates a /dev/video

IVTV creates the devices shown below for a PVR-150 card. The syslog entries don't show that they have been created, but ivtv does indeed create them.
Code:

$ ls -l /dev/vid*
crw-rw---- 1 root video 81,  0 2006-01-29 18:20 /dev/video0
crw-rw---- 1 root video 81, 24 2006-01-29 18:20 /dev/video24
crw-rw---- 1 root video 81, 32 2006-01-29 18:20 /dev/video32
$


haertig 02-01-2006 03:06 PM

Oh, I just had another thought after looking at that "ls -l /dev/vid*" listing I attached above.

Did you add the userid that is trying to view the videos to the "video" group in /etc/group? You probably want to add this userid to the "audio" group while you're at it. "usermod" is a commandline way of adding users to groups. There are also GUI-based tools for modifying groups.

[edit]
Oops. I just noticed in your very first post that you said you had the same problems when logged in as root. So my permissions-related post above might be a smokescreen. You still need to add userids to the video group however. But your problem current may be rooted deeper than that (no pun intended!)
[/edit]

rrrssssss 02-02-2006 02:03 AM

Thank you for your input.

I used the command you gave me (below) to record video and when I played it back, I saw a beautiful color-accurate, smoothe playing video that even looked nice in full screen. I used channel 3 since that is where I have a Dish TV receiver plugged into.

# ivtvctl -p 1
# ivtv-tune -c 3
# cat /dev/video0 > /tmp/test.mpg

# totem /tmp/test.mpg


Does this nice video mean that video0 is working okay?
Does it also mean that the WinTV 150 card and ivtv are working okay?

I ran the ls -l command:

bash-3.00$ ls -l /dev/vid*
lrwxrwxrwx 1 root root 10 Feb 1 16:25 /dev/video -> v4l/video0
lrwxrwxrwx 1 root root 10 Feb 1 16:25 /dev/video0 -> v4l/video0
lrwxrwxrwx 1 root root 10 Feb 1 16:25 /dev/video1 -> v4l/video1
lrwxrwxrwx 1 root root 11 Feb 1 16:25 /dev/video24 -> v4l/video24
lrwxrwxrwx 1 root root 11 Feb 1 16:25 /dev/video32 -> v4l/video32

An interesting note - I changed tvtime from video0 to video1 (for the x88 chip based capture card instead of the WinTV 150 card) and I did not get any error messages from tvtime, plus I got a TV picture (composite) so video1 has no problem, only video0 does.


I would still like to have a graphical interface program that will capture the video instead of having to use a command in the terminal window.

Will you continue to help me diagnose why I keep getting capture buffer/invalad argument error messages with the TV/capture applications?

Thank you,
Roy

haertig 02-02-2006 09:39 AM

Quote:

Originally Posted by rrrssssss
Does this nice video mean that video0 is working okay?
Does it also mean that the WinTV 150 card and ivtv are working okay?

Sounds like it to me. If you're happy with what you're seeing directly out of /dev/video0, you've pretty much proven that your 150 card is working (at least the tuner input is working), and that you've managed to get the IVTV drivers installed.
Quote:

bash-3.00$ ls -l /dev/vid*
lrwxrwxrwx 1 root root 10 Feb 1 16:25 /dev/video -> v4l/video0
lrwxrwxrwx 1 root root 10 Feb 1 16:25 /dev/video0 -> v4l/video0
lrwxrwxrwx 1 root root 10 Feb 1 16:25 /dev/video1 -> v4l/video1
lrwxrwxrwx 1 root root 11 Feb 1 16:25 /dev/video24 -> v4l/video24
lrwxrwxrwx 1 root root 11 Feb 1 16:25 /dev/video32 -> v4l/video32
Note that you have symbolic links here whereas I don't. This is probably just a minor difference in ivtv version 0.4.2 that you're using and ivtv 0.4.1 that I'm using.
Quote:

An interesting note - I changed tvtime from video0 to video1 (for the x88 chip based capture card instead of the WinTV 150 card) and I did not get any error messages from tvtime, plus I got a TV picture (composite) so video1 has no problem, only video0 does.
Maybe there's some conflict between tvtime and ivtv drivers? This sounds like a question that could be asked over on the ivtv mailing lists (or on the tvtime mailing lists if they exist - I've never used tvtime and wouldn't know). Could be a version-specific conflict too. You could experiment by installing ivtv 0.4.1 (or older) and see if tvtime works with that. Your video1/x88 capture is working, but that would use a different driver than ivtv.
Quote:

I would still like to have a graphical interface program that will capture the video instead of having to use a command in the terminal window.
I use MythTV myself. I've heard of tvtime and xawtv, but I've never used either of those.
Quote:

Will you continue to help me diagnose why I keep getting capture buffer/invalad argument error messages with the TV/capture applications?
I think the problem is in tvtime/xawtv or some interaction between these two and ivtv. Since I don't use tvtime/xawtv then I don't think I can really be of much more help. You can find more details on IVTV at http://ivtvdriver.org/index.php/Main_Page On the left side of the page are links to the mailing lists. The ivtv developers may be aware of some compatibility issue between ivtv and tvtime/xawtv Peruse the mailing list archives and check if anybody else has had problems similar to yours.


All times are GMT -5. The time now is 01:18 AM.