My last few months have mainly been spent working on various analog-related projects. As a result, I often need to test various tuners with analog. I typically use the stock tvtime that ships with Ubuntu for this testing.

Over the last year or so, a number of problems have become blindingly apparent with tvtime. Here’s a brief list of the things bugging me (in no particular order):

  • Lack of audio support for modern tuners – many tuners deliver audio on an ALSA device, and tvtime has no ability to stream this audio. As a result, people end up with running sox or arecord/aplay in a separate window, with no lipsync.
  • NTSC closed captioning is pretty much completely broken unless you happen to have a BTTV card or a card that behaves exactly like it. Tvtime doesn’t use the V4L2 API to determine the VBI configuration, always assuming a VBI width of 2048, capture height of 16, and sampling rate of 28636363.
  • Unsupported controls are not handled gracefully – you see the controls in the GUI, but you cannot adjust them at all.
  • Very limited colorspace support – if your card does not support are YUYV or UYVY, then you are out of luck.
  • Doesn’t compile from source on modern distributions – in cases where it doesn’t behave gracefully, I want to be able to recompile from source and add debugging – except the source code no longer compiles cleanly on modern distributions.

I’m sure there are other issues, but these are just the things that I keep running into. Given that the project is essentially unmaintained, KernelLabs has decided to do something about it.

We’ve setup a new source repository, and started merging the patches the various Linux distros are maintaining, as well as starting to look at the patches in the SourceForge patch tracker:

Once we have some more merging done, I will spin a release tarball and invite the various Linux distributions to switch over to bundling the KernelLabs version of tvtime.

I’ve also started working on fixing various issues, starting with the VBI support. If you look below, this is a screen capture of tvtime running with a Hauppauge HVR-950 (an em28xx based device).

[lightbox title=”tvtime” href=”../../blog/wp-content/uploads/2009/11/tvtimecc.png”][/lightbox]

(Click the image above to see full version)

We also have the start of some patches for ALSA audio support. My hope is that between fixing the audio support and the closed captioning, this should address the two largest issues that users run into.

The goal here is to have a single upstream version that reflects all the patches of the various distros, reducing their overhead and breathing some new life into the project so it works better with modern hardware.

It’s worth noting that this is a KernelLabs project that is not tied to a paying customer. It’s just something we are doing because we are tired of people not having a simple application to easily “just watch tv”.

  • Users’ lives will be made easier by having an application that just works.
  • KernelLabs developers’ lives will be made easier having an application for testing that reliably reflects the V4L2 APIs.
  • Distribution maintainers’ lives will be made easier by not having to keep forward-porting patches as their distribution evolves (because nobody was merging their patches upstream).

It’s a WIN-WIN for all parties involved!

11 thoughts on “tvtime

  1. Hi,
    I’ve a 340e, a WinTV-FM PCI (analog, with audio out, so no need to test) and a HVR-1200.
    For the moment, only thw wintv analog is working fine for me.
    I’m waiting to find time to test your 340e drivers if ever they support analog (PAL-BG) and I don’t know yet if there’re hvr-1200 drivers who support analog?
    Let me know if this is af any help for you, I can dig into this asap if you need any feedback.

    • Hi Dan,

      Well even when the 340e is finally working, there won’t be analog support because of a lack of support in the dvb-usb framework. THe HVR-1200 should support analog, although there is currently no ALSA audio support so you will not be able to use tvtime to watch the raw video stream (Steven Toth is working on this).



  2. Great! I agree. Personally, I use AverMedia’s Hybrid Volar HX with their binary driver. Although, I primarily use MythTV, the need is still great for a flexible and usable viewing application like TVTime on ALL *nix computers.

    • Hello tpreitzel,

      Yeah, I’m not making any guarantees that tvtime is going to work with a company’s binary driver that violates the GPL by linking against v4l-dvb code. Tell them to comply with the GPL and open source it, and I will start to care (and in fact I might even help them get it into the mainline kernel if they send me a free sample).

      And I don’t have *any* real interest in operating systems other than Linux. While I don’t plan on doing anything that will break other operating systems that might be using tvtime, I will be doing *zero* testing against anything other than modern Linux distributions. If people who care about those distributions want to submit patches though, I will happily merge them.

      With the above comment, the point I’m trying to make is there is a need to stay focused. Without prioritizing, you end up with a situation where you never actually ship *anything*. At this point, my goal is to make tvtime work well under Linux with about a dozen different modern tuner products (while not breaking backward compatibility with any older products).


  3. Hi Devin,

    my only problem with the “original” tvtime is the lack of analog sound on my PCTV Usb Stick.
    (lsusb says: ID 2304:0226 Pinnacle Systems, Inc. [hex] PCTV 330e).
    To screw around with sox is terrible. It is not a solution, anyway. And in Ubuntu Lucid this method is not work for me… If I understand well, you solved this problem with your patches… Or not (yet)?

    I tried building tvtime from your source, but ./configure says:
    “checking for snd_pcm_open in -lasound… no
    configure: error: asound needed”

    I tried installing package “liboss-salsa-asound2”, but it wanted to uninstall
    big amount of important packages… I have no more ideas 🙁
    Could anyone help me? (Ubuntu 10.04)

    Thank you for your work!


Leave a Reply