Watch TV using MPlayer
Jumaat, 26 Jun 2009, 12:00 pm0
Before I bought the new WinTV USB stick TV card, I already have a Hauppauge WinTV USB. I still use this TV card because it’s working out of the box in Fedora 11 – the newer TV card still got no suitable driver for Linux yet.
WinTV USB connected to the PC, with Audio Out port connected to Line-In using male-to-male audio cable.
I still couldn’t find the proper TV viewer for Gnome desktop. I found several programs specifically for this purpose, such as GnomeTV and Zapping, but most of them are outdated – which means, some of the dependencies, libraries or modules are not compatible with the cutting edge Fedora system. There’s also tvtime, but it’s unusable with my tv card, because it uses usbvision driver. Others like xawtv and KWinTV are not Gnome based programs.
I decided to use MPlayer, since it’s the must-have program to watch almost all audio/video format in Linux. To my surprise, it is quite easy to use MPlayer to watch tv. Command below launches MPlayer to display TV broadcast, where the frequencies are set for reception in Kuching, Sarawak area.
mplayer -vo xv -framedrop -cache 8192 tv:// -tv driver=v4l2:device=/dev/video0:input=0:norm=PAL:normid=4:chanlist=europe-west:outfmt=yuy2:mjpeg:decimation=1:quality=100:channels=E7-TV1,E10-TV2,E12-TV3,27-NTV7
To scan for tv channels, use the command below – you may need to specify the chanlist, see mplayer man page:
mplayer -vo xv tv:// -tvscan autostart
To capture the audio, the Line-in port need to be enabled (unmute). Go to System > Preferences > Advanced Volume Control, and unmute Line-in. To navigate through the channels, H (channel up) and K (channel down).
To record the show, you need to use mencoder, but that will be in different post because I still can’t get the recording process correctly. However, you need to close other players (Totem / Rhythmbox) to launch the tv if you’re using -vo xv flag.
Coincidentally, today is the day Michael Jackson passed away, as I turned on the TV and watch the tribute video about him. May you rest in peace, king of pop.
12 Julai 2009
28 April 2008