Watching Freeview (DVB-T) TV with VLC Player on Ubuntu

Watching TV on my desktop. What do I want to be able to do?

  • Watch all Freeview (DVB-T) channels.
  • Be able to pause, rewind, and forward to live TV.
  • Schedule programs to record.
  • See the TV listings for the channels I have.
  • Fullscreen or windowed viewing.

I was able to do all of the above using EyeTV on my Mac. However, I’m trying to make the complete switch to Ubuntu, and an open-source alternative is needed.

I initially setup MythTV. It consists of two parts, a server and a client. Multiple clients around the home (or over the internet) can connect to the server. That was a little over-the-top for my needs, but MythTV is a very popular choice for TV on Linux, and does do most of the things I want from the list above, hence my decision to use it.

Once installed, I had TV playing perfectly. Though, when I wanted to start doing some work, while still watching TV, it was a little annoying that I couldn’t find anyway of watching the TV in a window–only fullscreen. Trying to find a solution on IRC, some users said there was an option to play TV in a window, however, when I tried to enable the option numerous times, I had no luck.

At this point I thought that my journey to Ubuntu was over. I needed TV on my computer, and if I couldn’t watch it in a window while doing other things, then I’d have to keep my Mac around to do that.

I’m not too sure how I stumbled across it, but I found a web page explaining that you could use VLC Player to tune into a TV card! And since then, for the last few hours, I’ve been working on getting that working. At the moment, it only ticks off a few of the boxes, but I’m sure, with a bit more Googling, I’ll be able to get the other things functioning. With the following, I can watch all my Freeview channels, in full screen or in a window.

Setting it all up

Assuming that you have your TV card drivers installed, you can start off with:

sudo apt-get install dvb-utils vlc

That installs VLC and the DVB programs needed to scan for your channels.

Now, find the digital transmitter nearest to you by visiting DigitalUK. Enter in your postcode, and the result you get back will tell you which transmitter you’re feeding off of. If you’re not in the UK, I’m not sure how you can find your closest one–Google is your friend.

You can see a list of the UK transmitters by doing:

ls /usr/share/doc/dvb-utils/examples/scan/dvb-t/ | grep uk-

Now find the filename that matches your transmitter, and substitute uk-CrystalPalace for it.

scan /usr/share/doc/dvb-utils/examples/scan/dvb-t/uk-CrystalPalace -o zap | tee ~/channels.conf

The above command will scan for channels that your TV card can pick-up, and store the configuration in a file. This file VLC then uses to tune in.

Now open up VLC. File > Quick Open File. Browse to channels.conf and open. Live TV should now start playing. To see a list of channels to switch between, go to View > Playlist.

VLC Player

To speed things up when wanting to launch the TV each time, you can create a launcher. I’ll create it on the Desktop for examples sake. Right click, and select Create Launcher. Give it a name, like TV, and in the Command text box, enter vlc /path/to/channels.conf. Hit ok, and you’re done. Now double click on the launcher and VLC will launch, and you’ll have the TV back on.

That’s it! Now all that is left for me to do, is to see if there is a way I can get the other things on my list operational; pause, schedule, tv listings. I’ll report back on here with any developments I find. Tune in again next week for more exciting adventures with Ubuntu!

What TV app do you use on Ubuntu?

2008-02-08 [, , , , ]

Comments

  1. You might like to give Kaffeine player with the xine engine a try. I’ve not tried on Ubuntu, but this combo works flawlessly on my Mandriva machine, and ticks all your boxes.

    Andy (2008-02-08 @ 22:39)
  2. did you also find a solution for radio streaming? the television works fine, thx alot for that.

    Silvio (2008-06-06 @ 11:54)
  3. I really like MeTV to watch dvb on ubuntu. it has a channelscanner and epg but is much more lightweight than mythtv… totem is also doing the job but u’ll have to copy the channels.conf to ur gstreamer folder. Maybe u give it a try.

    steph (2008-06-10 @ 16:06)
  4. Cheers mate. Been having a hard time trying to get MythTV working right -it’s slow, jerky, choppy etc.,

    This will do me just fine until I get the time to sort myth out.

    Many thanks.

    John (2008-06-15 @ 02:48)
  5. Hey, thanks for the tips on VLC.

    You might like to know that you can run the mythtv frontend in a window. To do this you need to configure it:

    • Run the mythtv frontend
    • navigate to “Utilities/Setup”, then “Setup”, then “Appearance”
    • press “next” to go to the second screen (called “Screen Settings”)
    • Check the option “Run the frontend in a window”
    • Set the “GUI width” and “Gui Height” options to your liking.

    Unfortunately you can not switch between window and full screen without reconfiguring these options.

    starfry (2008-11-05 @ 00:46)
  6. [...] Watching Freeview (DVB-T) TV with VLC Player on Ubuntu – david winter __________________ BartPC:P5W DH Deluxe – E6600 @ 9*334 = 3Ghz – Gskill DDRII 2x 1GB PC6400 [...]

    [WORDPRESS HASHCASH] The comment’s server IP (195.130.144.1) doesn’t match the comment’s URL host IP (195.130.144.3) and so is spam.

    DVB-T player software (Vista of Ubuntu) - 9lives (2008-11-07 @ 20:12)
  7. Hi,

    Thanks for the guide. I tried using w_scan first to generate the configuration file however whilst the scanning was good, the channels.conf file did not work. Could not get totem to work properly (jumpy screen so vlc for me it is) so your guide was appreciated,

    Cheers

    P.S How did you get the ubuntu type look for vlc in your screen shot

    Rob (2008-11-18 @ 09:52)
  8. Thanks for this post! Under Ubuntu Hardy I used kaffeine / xine for all my media playing but under Intrepid (and on new ATI-based hardware) it doesn’t work. I didn’t think to try vlc but thanks to your post I did and it works a treat! I’m so thankful I don’t have to try to get mythtv going – it’s truly a configuration nightmare.

    Richard Jones (2008-11-27 @ 00:25)
  9. pip

    far (2009-03-03 @ 03:36)
  10. i dont have that scan folder in /dvb-utils folder ?!?

    n0gear (2009-06-04 @ 17:26)
  11. Very nice, but how did you manage to tune the frequencies, I am in a PAL-I region? Another reason to switch to Ubuntu, lovely and thank you in advance.

    Bizo (2009-06-10 @ 20:55)
  12. The w_scan is great dvb util, allowing to search for mux without providing coordinates.

    http://edafe.org/vdr/wscan/ or orig (in German) is here: http://wirbel.htpc-forum.de/wscan/index2.html

    norbert (2009-06-16 @ 21:29)
  13. Thanks for this post – work a treat for me and saved the rest of my hair after two days of trial and error.

    re: “i dont have that scan folder in /dvb-utils folder ?!?”

    scan is program – in /usr/bin

    Any luck with pause etc?

    Aubrey (2009-07-02 @ 09:16)
  14. Thanks very much for this. I was going mental trying to find a nice easy way to watch tv. I might be a bit daft but from what I can gather pausing works without me having to change anything.

    murch (2009-07-04 @ 23:04)
  15. Thanks for the step-by-step guide, David!

    IMO, Linux won’t be completely ready as a consumer OS until users can scan for tv channels using a simple “scan for channels” button in their tv app, just like they do on a separate digibox. People expect it. There needs to be a simple GUI-driven front end that does this. Advocates have been saying for years that Linux is “there”, but to expect newbie end-users to start mucking around with looking up transmitter names and typing them into command-line apps is crazy.

    Someone in the Linux community needs to get this sorted.

    Eric Baird (2009-08-13 @ 07:43)
  16. Great guide. I generated my channels.conf file using w_scan with the -X option because scan program didn’t seem to work for me. But the rest of the guide worked perfectly.

    Matthew Tompsett (2009-08-26 @ 16:07)
  17. Apologies if the following procedures have already been discussed but these are the notes I made for myself after getting Totem and xine playing Freeview. I’m a newbie and I made the notes after re-installing Ubuntu for the nth time, having messed up one thing or another so this might help others going through similar experiences. Here goes:

    “According to http://projects.gnome.org/totem/ [quote] GStreamer

    You will need gst-plugins-bad 0.10.6, as well as Fluendo’s MPEG demuxer to have playback working. The channels.conf file should be named ~/.gstreamer-0.10/dvb-channels.conf. [/quote]

    Instal wscan if it isn’t already installed, instructions here: http://edafe.org/vdr/w_scan/

    To retune, mount Knoxx, then in Terminal:

    sudo w_scan -X >> ~/chans.txt

    Now go and edit ~/chans.txt and sort it into your preferred order, eg BBC1, BBC2, ITV, etc. before you copy it to where it will do some good.

    For Totem: sudo cp ~/chans.txt ~/.gstreamer-0.10/dvb-channels.conf

    For xine:

    sudo cp ~/chans.txt ~/.xine/channels.conf

    Scanning is a bit of a pain so copy chans.txt somewhere safe and then zap w_scan.”

    bugrit (2009-08-30 @ 02:00)
  18. In the preceding post, please ignore my reference to mounting Knoxx – it’s my “somewhere safe” for stuff I don’t want to lose when I re-install Ubuntu or XP.

    bugrit (2009-08-30 @ 02:04)
  19. I came here because I was hoping to discover how to record Freeview broadcasts using Totem, or xine, or some other player. I have now added VLC to the list and I’m still getting to grips with it. My version of VLC is 0.9.9a Grishenko and it doesn’t have a File menu, although its Media menu seems to fulfil most of a typical File menu’s functions. However, by pointing Playlist->Load Playlist at my channels.conf file, I was able to Playlist->Show Playlist and select a TV channel, playable in a resizeable window.

    My channels.conf was created by w_scan and it’s exactly the same one that xine uses, as described in my post of about an hour ago.

    I still can’t record anything, though.

    bugrit (2009-08-30 @ 03:17)
  20. Great! VLC’s got a graphic equaliser! :))

    bugrit (2009-08-30 @ 03:20)
  21. For those having trouble finding the dvb-t directory for scan, may find that the directory is /usr/share/dvb/dvb-t/au-SunshineCoast. I easily found the transmitter (au-SunshineCoast) for my location in Australia. I am using Ubuntu Jaunty 9.04.

    I could not get mythtv to add channels for the ABC network in my locality. After setting the channel scan to not time out via mythtv backend setup, it would lock but terminated with the error “no tables”. VLC does indeed lock onto and play ABC perfectly!

    Aiden Deem (2009-11-03 @ 13:09)
  22. Aiden: Did you get channel 10 to work, I had to install kaffeine from karmic to get channel 10 to come up using an au-Auto scan, but then sound fails to work on HD channels….

    John (2009-11-04 @ 15:02)
  23. ubuntu karmic 9.10; /usr/share/dvb/dvb-t/ to be correct but i can’t find Canada or even USA inside the folder. sudo apt-get install dvb-apps (since dvb-utils is not available in Karmic) I have Bell Tv at home (i live in Canada), i needed to watch tv in my computer aswell. TvTime works though, but i want it to give VLC a try :)

    Thanks for the guide though, cheers….

    Israel S (2009-11-16 @ 14:11)
  24. can i use my analog TV tuner the same way? Can you post what you have in channels.conf?

    bobo (2009-12-22 @ 00:29)

Powered by WP Hashcash