TV tuner in linux: Can't access tuner after viewing with mplayer

Sureshot324

Diamond Member
Feb 4, 2003
3,370
0
71
I have a hauppauge pvr 150 and I have just installed the ivtv drivers. I can run cat /dev/video0 > test.mpg, let it go for a while, and hit ctrl c, and it successfully makes an mpeg. I can rerun that command as many times as i want and it still keeps working.

However, if I run mplayer -vo xv /dev/video0, it works the first time, but after I close mplayer it locks up the tuner so i can't view it again, and can't even run the cat command on it anymore until i reboot.

When the tuner is in this locked state, I get this error when i run cat /dev/video0 > test.mpg:

cat: /dev/video0: Device or resource busy

When i try to view it in mplayer, it prints a lot to the console but i think this is where it goes wrong:

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.

If i try modprobe -r ivtv, i get this:
FATAL: Module ivtv is in use.

After a reboot it works fine again. Is there any way to release the tuner and ivtv drivers from this locked state so I can access it again? Also, is there a way to watch tv in mplayer without locking up the tuner after i close it?

I'm using Ubuntu breezy amd64 and ivtv 0.41
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Doesn't sound like your doing anything wrong. I've had similar problems caused before with mplayer not exiting cleanly. It looks like it closes, but hangs around in a active state with no output.

Go
ps aux|grep mplayer

and see that when you kill mplayer it is realy dying all the way. You may have to
kill -9 `pidof mplayer`
if it doesn't respond to a killall command.

Also if you want to try a different media player with it.. VLC should be able to work and it'll have the added bonus of being able to stream data out over a network in a sane way.
 

Sureshot324

Diamond Member
Feb 4, 2003
3,370
0
71
You were absolutely right about mplayer. If i kill it right after using it, it works fine the next time. VLC works if i open it and go file>open network stream>pvr and set it for /dev/video0, though i haven't figured out how to do it from the command line. vlc /dev/video0 doesn't work.

The problem with VLC is I can't get fullscreen to work. By default fullscreen mode just opens a very large window, and the taskbar/window border are still visible. If i set it to alternate fullscreen mode, it usually only takes up a part of the screen. No window border, but I can still see the desktop behind. Occasionally it does successfuly go into fullscreen. I've tried using X11 and opengl as my video output plugin with the same results.