Thursday, 8 November 2012

How-to: Watch Digital TV in VLC Player - Ubuntu


Freecom DVB-T digital TV on VLC Media playerNow that we've proved that the Freecom still works, but Xine and Gxine don't, we need a more modern media player on which to watch TV.

Kaffeine is always a top recommendation, but I don't want a stack of KDE software libraries cluttering up the machine.

VLC is my favourite player because it does so much more.
In order to get VLC to play, the Freecom stick needs to be tuned in the player. The best way to do this is to create a play list of the available channels - a text file which is the standard channels.conf. You will need a TV scanning utility to find the frequencies for services available in your area.

Depending on the software sources you have enabled, you will find various DVB utility packages for Linux: dvb-tools, dvb-apps, w-scan, dvbtune, which contain small programs to scan for channels and save a channels.conf.

Browse the More Info page in Software Center to find the contents list. Most of these are command-line only programs.You may need to look up the precise command syntax using your favourite search engine, but they are all well documented. Depending on your combination of hardware, you might need to try more than one tuning program to get a decent channel list.

If you don't already know it, you may need to look up the available transmitters for your post code area - in the UK, I would go to http://www.digitaluk.co.uk/postcodechecker/ to find your transmitter. I know mine is Rowridge.

The installation of the LinuxTV dvb-apps will have created a folder containing TV transmitter frequencies. If I browse the following folder /usr/share/dvb/dvb-t/ the file that I need is called “uk-Rowridge”.

Firing up the scan program, I go with:
scan /usr/share/dvb/dvb-t/uk-Rowridge -o zap | tee ~/channels.conf

This creates a channels.conf file in my home folder which I can open in VLC by navigating to Media > Advanced Open File. Press the Add button and find the channels.conf file. Now VLC will open and display all of the channels in a play list, actively loading whichever is the first entry. As this is a text file, I can delete and re-order the channels however I want by editing channels.conf.

On my setup, an odd thing happens when I change channel for the first time in each session. I get an error saying the media URL doesn't exist. VLC changes channel anyway. Thereafter it is fine.

VLC takes a while to change channels, but the delay is in the Freecom USB stick as the hardware does a lot of complex radio frequency shifting, buffers the new channel and de-codes it for the screen. This isn't an instant zapper.

Now that I have TV in VLC, what use can I make of it's many capabilities...? RC

4 comments:

  1. very nice post, i certainly love this website, carry on it

    ReplyDelete
  2. I'm lost at this point: Firing up the scan program, I go with: Firing up what scan program? I've installed Digital TV control Centre from the Ubuntu Software Centre and it found my WinTV Duet digital TV usb stick then it let me successfully choose and scan my region, Crystal Palace. I don't seem to then be able to fire up some scanning program to create a channel list in my home folder. Have I missed a bit or do I need something else installed too?

    ReplyDelete
  3. fredneedle: you do indeed need one or more of the available DVB tools packages in order to generate a channels.conf.

    Check in Software centre (I'm not now on Ubuntu so I can't) for packages prefixed dvb; you will need a little command-line ninja skill to use one of various DVB utility packages for Linux: dvb-tools, dvb-apps, w-scan, dvbtune, dvb-scan, etc.

    Check the site http://linuxtv.org/downloads/ for listings and explanations, but get an Ubuntu-approved version from Software centre. Having already scanned using the Crystal Palace frequency list, it sounds like you're nearly there. You just need to pipe the scan list into a channels.conf file to keep.

    VLC or any capable media player will then use the channels.conf as an input source to tune the card. RC

    ReplyDelete
  4. Great! Thanks a lot for the information.

    Frederik in Brussels

    ReplyDelete

At least try to be nice, it won't kill you...