HVR-950q Closed Captioning support

Hello all!

If anyone is interested in closed captioning support for the HVR-950q, you can get it from the following tree:


Unfortunately, the work exposed a bug in tvtime which prevented it from working, which I fixed here:


But it *is* working with zvbi-ntsc-cc out of the box.

Comments welcome, as always. Next stop: HVR-950q quality improvements!

4 thoughts on “HVR-950q Closed Captioning support

  1. does CC only work on the analog side of this device? could I actually use it with the digital broadcast as well? I keep hearing zvbi-atsc-cc has certain deficiency but i am not sure if it works at all.

    • Devin Heitmueller

      Hello vientito,

      Closed captioning for digital support does not require any driver work for *any* card. The device just passes through the entire MPEG stream and it’s the responsibility of the application to extract the CC data.

      To see it working, just play the resulting stream in an application such as VLC and enable the closed captions.

      I cannot really comment on how well zvbi-atsc-cc works, as I don’t have any experience using it.


  2. Devin, thank you for the excellent work on closed captions for the HVR-950q. We got it working almost perfectly except for one problem. The value of b2 coming back from ccdecode() sometimes contains garbage which is then converted into a space as to not display that garbage on the screen. This results in an extra whitespace character being displayed in the captions both in between words and in the middle of words quite frequently. Further inspection of the data revealed that it was only b2 that contained bad data but b1 was always correct. We briefly considered trying to fix ccdecode() but the algorithm was complicated and we lacked sufficient documentation. Instead a much simpler solution proved to be very accurate in correcting this problem.

    When b1 was good but b2 contained garbage we stuffed b2 with a known good ascii character that was not in ccode array. In this case we used the caret ^ character. Then when vbiprint_screen() is called and a ^ character is encountered in c2 the character is eliminated entirely and not displayed. This problem was discovered on an Intel Atom D525 running Ubuntu 10.04.

    Here are the two code changes.

    +++ tvtime-1.0.1/src/vbidata.c 2011-09-26 22:14:42 UTC (rev 13822)
    @@ -51,6 +51,8 @@
    /* “stuvwxyz347367245244240”;*/
    – “stuvwxyzcoNn “;
    + “stuvwxyzcoNn ^”; //83 -96

    @@ -956,7 +960,7 @@
    } else if( b1 ) {
    /* use ccode */
    if( b1 < 32 ) b1 = 32;
    – if( b2 < 32 ) b2 = 32;
    + if( b2 verbose ) fprintf( stderr, “vbiscreen: Print (%d, %d)[%c %c]\n”, vs->curx, vs->cury, c1, c2);

    • Hi Jeff,

      The changes I made to tvtime for CC were largely oriented just around getting the capture to work properly with other devices such as the 950q. There are a large number of outstanding issues with the rendering of the captions (in fact I did an entire project where I did rendering improvements for VLC). That said, this patch does look good and you should send it to the linux-media mailing list, since they have taken over official maintainership of tvtime.



Leave a Reply