Results 1 to 12 of 12

Thread: tivovbi development

  1. #1
    Join Date
    Jan 2002
    Posts
    1,777

    tivovbi development

    This thread continues cross-platform development for embeem's tivovbi. tivovbi is a userland program that grabs VBI (closed caption and XDS) data destined for the video outputs, and dumps it to the console, a file, or the on-screen display. tivovbi is commonly used to produce transcripts of television programs, and to implement on-screen captions on monitors that do not support CC.

    Changes in the 20050202 release:

    - added preliminary series2.5 osd support (surface creation may be faulty)
    - added -r (remote) option and -w (wait) option

    Prior work on tivovbi can be found in these threads:

    Original tivovbi 1.03 release thread (tivovbi-1.03.zip is mirrored in this post)
    Series2 OSD and tivovbi work

    The -r option allows the user to toggle captioning from the remote control. More details are in the README. This option requires a Series2.0/Series2.5 machine at TiVo software 4.0 or above, and the routerplus kernel module found here.

    On a Series1, tivovbi will run as-is.

    On a Series2.0/Series2.5, tivovbi requires the s2vbi/pxmpegdecode module (in post #2).

    Usage examples can be found in the README. This is how I run it on startup:
    Code:
         export VBI_MODULE=/lib/modules/pxmpegdecode.o
         /usr/local/bin/tivovbi -c1 -oC -r0 -w
    tivovbi is GPL software.
    Last edited by alldeadhomiez; 07-29-2007 at 04:17 PM.

  2. #2
    Join Date
    Jan 2002
    Posts
    1,777
    This is s2vbi, a kernel module for Series2.0 and Series2.5 units that implements the "pxmpegdecode" interface needed by tivovbi. pxmpegdecode.o is the name of the kernel module used to drive the IBM CS22 MPEG decoder on Series1 units. This module intercepts ioctl() and writev() syscalls, buffers outbound VBI data, and exports the symbols tivovbi needs to grab that data from kernel memory.

    s2vbi is copyright (c)2005 alldeadhomiez. You MAY NOT redistribute this package under any circumstances. This program is provided with NO WARRANTY of any kind.

    s2vbi is free for noncommercial, personal use, but it is NOT GPL.

    Changes from the 20040602a release to the 20050202 release:

    - added support for "elmo" (Series2.5 DVD combo units)
    - implemented "jump" code so that the module can be removed for debugging purposes
    - small changes to kernel log messages
    - added binaries for 2.4.4, 2.4.18, and 2.4.20

    DO NOT DOWNLOAD THE ATTACHMENT IF YOU DO NOT AGREE TO THE LICENSE.

  3. #3
    Join Date
    Nov 2003
    Posts
    36

    20 tvbi.o for S1 combo boxes running 3.5

    Back in the spring, I got updated to 3.5 and didn't notice until I tried to run tivovbi about a month later. Once I realised it was a software update that was keeping me from logging in, I installed the CacheCard drivers and added upgradesoftware=false. Then I set to porting embeem's tvbi.o to 3.5, but I found I couldn't compile modules. Or rather, I could, but the text segment was empty, even on s1-palette-snoop.o (a module I compiled myself a couple of years ago (yikes, has it been that long?!)). I set it aside, planning to eventually compare the pxmpegdecode.os from 3.1 and 3.5 and simply patch the tvbi.o that worked on 3.1, but I couldn't work out where the offsets were based.

    A few days ago, I tried again, and the modules worked. The only difference I can remember in the invocation was leaving out the -O2 that I read somewhere absolutely must be used when compiling modules/drivers/something like that.

    Anyway, I got it going. Here's a bzip2ed tar file with the new version as well as the old ones. I put mine in /var/hack/lib/ and did

    Code:
    $ cd /var/hack/lib/
    $ ln -s tvbi-3.5.o tvbi.o
    . Now I can put

    Code:
    insmod /var/hack/lib/tvbi.o
    in my /etc/rc.d/rc.sysinit.author (or not).

    Wheee!

    --
    Dave Norman

  4. #4
    Join Date
    Mar 2005
    Posts
    235
    Has anyone been able to run this on a Series2.5 with 7.2.2b(or above)? I'm trying to port osdcons and libosd using this as an example, but cannot get this running. Any help/hints would be greatly appreciated.

    I get an error when I run "tivovbi.mips -oc". It appears to fail in bcm_open(bcmosd.c) at:
    Code:
            if(1 || newsurf)
                    memset(s->surf.bufptr, 0, 720 * 480 * 4);
    [EDIT]
    More information on this issue can be found here as it seems more active on support:
    http://www.dealdatabase.com/forum/sh...221#post272221

    If progress or a fix is available I will put it here in the future.
    Last edited by jkozee; 12-23-2006 at 01:11 PM.

  5. #5
    Join Date
    Dec 2005
    Posts
    296
    tivovbi-20050202 never got past this error on my 6.2 DTivo:
    Code:
    bcm_open(): can't get hw version
    alldeadhomiez told me to check the bcm_get_series function. The purpose of that function is to check whether tivovbi is running on a Series 1 or 2. It checks the /dev/ttyDSS symlink, which points to either ttyS1 (for a Series2.5), ttyS2 (Series2), or ttyS3 (Series1), for the last number of the serial device. (tivovbi doesn't actually do anything with the serial console, this is just to check if it's S2 or 2.5.)

    At first I couldn't get a cross compiler going, so I tried to workaround the problem so that I wouldn't have to recompile anything. By making a file with 64 characters in length with the number 2 (because my Tivo uses ttyS2,) tivovbi ran successfully and displayed captions on screen.

    Code:
    cd /dev
    touch 2222222222222222222222222222222222222222222222222222222222222222
    ln -sf 2222222222222222222222222222222222222222222222222222222222222222 /dev/ttyDSS
    After I showed ADH my workaround, he noticed the error in the code and he wrote this patch:
    Code:
    --- bcmosd.c    2 Feb 2005 21:36:49 -0000
    +++ bcmosd.c    24 Dec 2006 05:55:47 -0000
    @@ -456,10 +456,10 @@
            char tmp[64];
            int i;
     
    -       if(readlink("/dev/ttyDSS", tmp, 64) < 0) return(0);
    -       tmp[63] = 0;
    -       i = strlen(tmp);
    -       if(i == 0) return(0);
    +       i = readlink("/dev/ttyDSS", tmp, 64);
    +       if(i <= 0)
    +               return(0);
    +       tmp[i] = 0;
            switch(tmp[i - 1])
            {
                    case '3':




    Not only is tivovbi useful for small and old TVs without a CC decoder, it's also useful for conviently turning captions on/off with just one remote. That's what attracted me to tivovbi in the first place. Now I only have to use Tivo remote and I can finally put that TV remote away forever.


    After you replace the stock /lib/modules/router.o with ADH's router.o (a.k.a. routerplus) you should be able to use a remote button you want to toggle the captions off and on.

    But no matter what remote address I specified, tivovbi kept using the default "Clear button pressed three times" (mentioned in the README) to toggle captions on and off.

    I didn't wan't to spend too much time debugging why that wouldn't work, so I just hardcoded it to use the Window button (which is utterly useless on a S2 SD DTivo, but used on the HR10-250 to change the Aspect Ratio.)

    Also, I changed it to require only two button presses instead of three. (I couldn't get it to require only one button press.)

    Here's the quick hack I wrote for that:

    Code:
    --- remote.c    2005-02-02 16:36:49.000000000 -0500
    +++ remote.c    2006-12-25 20:00:02.000000000 -0500
    @@ -222,7 +222,7 @@
                            return(-1);
                    }
                    if(! mupdown) return(-1);
    -               if(mkey != 0x1b /* CLEAR */)
    +               if(mkey != 0x35 /* WINDOW */)
                    {
                            consec = 0;
                            return(-1);
    @@ -236,7 +236,7 @@
                            consec = 0;
                            return(-1);
                    }
    -               consec++;
    +               consec+=2;
                    if(consec < 2) return(-1);
     
                    consec = 0;
    I've attached two MIPS binaries (for Series 2 and Series 2.5), a kinda-late Christmas present.

    One has only the bcmosd.c patch, and therefore uses the standard Clear button three times to toggle captions.

    The other has both ADH's bcmosd.c patch and my remote.c patch (for the Window button and two button presses.)

    Some quick instructions:

    1) upload tivovbi to the folder of your choice. make a new one, put in with your busybox/tivotools binaries, etc.
    2) upload pxmpegdecode.o to /lib/modules (from s2vbi-20050202.zip)
    (Tivo version 6.x+ use a 2.4.20 kernel, so use /s2vbi/obj/2.4.20/pxmpegdecode.o)
    3) backup your stock /lib/moudules/router.o and replace it with ADH's router.o (a.k.a. routerplus... maybe it should get moved from that forum to ddb...)
    (rename router.o to something else, upload routerplus-2.4.20.o to /lib/modules, rename routerplus-2.4.20.o to router.o)
    4) Add this to your rc.sysinit.author:

    Code:
    export VBI_MODULE=/lib/modules/pxmpegdecode.o
    /folder/you/uploaded/it/to/tivovbi -oc -r0 -w
    For a translucent background on the captions, use this instead (I find it hard to read. you might prefer it...):

    Code:
    export VBI_MODULE=/lib/modules/pxmpegdecode.o
    /folder/you/uploaded/it/to/tivovbi -ocC -r0 -w
    5) Reboot. Captions will disabled by default. Press the Window button twice or the Clear button three times (depending on the version you used) to toggle between Captions on and off. Enjoy your captions.

    You'll see "Captions Enabled", "Captions Disabled" on screen when you switch between the modes.





    !!!!!!Read the README,etc from the zip attached in the first post!!!!!!





    UPDATE: A newer version has been posted in the next post. The new tivovbi-window_button only requires one button press.
    Last edited by drez; 12-27-2006 at 01:02 AM.

  6. #6
    Join Date
    Dec 2005
    Posts
    296
    UPDATE: alldeadhomiez cleared up some things for me.
    1) I misunderstood what the remote address was for. Remote address is not the remote button but the remote address option that's used when you have multiple Tivos in the room. (Listed in your System Information screen.)

    2) ADH recommended a better transparent/translucent background color (the -C option) for tivovbi. He said tivovbi used to have a darker translucent shade but it was changed to be compatible with Series 1. Since I'm not including Series1 binaries... I changed it back to the darker translucent shade.

    It's definitely much easier to read than the old one and it looks good. I recommend it.

    3) He also told me what lines to remove to require just one button press.


    Since tivovbi is GPL, here are the changes (against the 20050202 release):

    This is the same as the patch in the last post plus it changes the transparent color that tivovbi uses with the -C option to a *MUCH* better one.

    Code:
    --- bcmosd.c	2005-02-02 16:36:49.000000000 -0500
    +++ bcmosd.c	2006-12-26 02:06:32.000000000 -0500
    @@ -456,10 +456,10 @@
     	char tmp[64];
     	int i;
     
    -	if(readlink("/dev/ttyDSS", tmp, 64) < 0) return(0);
    -	tmp[63] = 0;
    -	i = strlen(tmp);
    -	if(i == 0) return(0);
    +        i = readlink("/dev/ttyDSS", tmp, 64);
    +        if(i <= 0)
    +                return(0);
    +        tmp[i] = 0;
     	switch(tmp[i - 1])
     	{
     		case '3':
    @@ -602,7 +602,7 @@
       /*[  2] =*/ 0xff8a8a8a,
       /*[  3] =*/ 0xff9f9f9f,
       /*[  4] =*/ 0xffb9b9b9,
    -  /*[  5] =*/ 0x55111111,
    +  /*[  5] =*/ 0x80000000,
       /*[  6] =*/ 0xff8e90ad,
       /*[  7] =*/ 0xff4f6f5a,
       /*[  8] =*/ 0xff25342f,
    This changes the Closed Caption toggle button to the Window button and changes tivovbi to require only one button press (instead of three) to toggle between "Captions Enabled" and "Captions Disabled".

    Code:
    --- remote.c	2005-02-02 16:36:49.000000000 -0500
    +++ remote.c	2006-12-26 02:00:53.000000000 -0500
    @@ -222,24 +222,12 @@
     			return(-1);
     		}
     		if(! mupdown) return(-1);
    -		if(mkey != 0x1b /* CLEAR */)
    +		if(mkey != 0x35 /* WINDOW */)
     		{
     			consec = 0;
     			return(-1);
     		}
     
    -		last = (last + 1) % 2;
    -		gettimeofday(&lastpress[last], NULL);
    -		if(time_diff(&lastpress[last], &lastpress[(last + 1) % 2])
    -			> 750000)
    -		{
    -			consec = 0;
    -			return(-1);
    -		}
    -		consec++;
    -		if(consec < 2) return(-1);
    -
    -		consec = 0;
     		ccstate ^= 1;
     		return(ccstate);
     	}









    I've attached MIPS binaries for Series 2 and Series 2.5. I recommend the transparent background (tivovbi -ocC -r0 -w) with these binaries. Same instructions as above.

    Both these binaries have the new transparent color patch.

    tivovbi-clear_button still requires three button presses still to toggle Captions On or Off, but tivovbi-window_button now only requires one button press.
    Last edited by drez; 12-27-2006 at 01:23 AM.

  7. #7
    Join Date
    Mar 2005
    Posts
    235
    I am now able to run this on my Humax Series2.5. I'm not sure if this requred for any other 2.5, but here is the patch I'm using:

    Code:
    diff -ruN tivovbi.orig/bcmosd.c tivovbi/bcmosd.c
    --- tivovbi.orig/bcmosd.c       2005-02-02 16:36:49.000000000 -0500
    +++ tivovbi/bcmosd.c    2006-12-28 00:08:51.000000000 -0500
    @@ -437,7 +437,12 @@
    
            if(i.ret)
                    return(i.ret);
    -       surf->bufptr = mmap(NULL, surf->xbytes * surf->ysize, PROT_READ | PROT_WRITE, MAP_SHARED, bcmfd, (int)surf->bufptr);
    +       if(s->series == 25)
    +       {
    +                surf->bufptr = mmap(NULL, surf->xbytes * surf->ysize + 2048, PROT_READ | PROT_WRITE, MAP_SHARED, bcmfd, (int)surf->bufptr - 0x800);
    +       } else {
    +               surf->bufptr = mmap(NULL, surf->xbytes * surf->ysize, PROT_READ | PROT_WRITE, MAP_SHARED, bcmfd, (int)surf->bufptr);
    +       }
            return(surf->bufptr == NULL);
    
            /* sampled: surf->bufptr before "mmap adjustment" = 0x1c40000 */
    @@ -671,7 +676,12 @@
            int start;
    
            /* XXX not really sure why the "+ 40" is necessary */
    -       start = osd->start - 18588 + 40;
    +       if(s->series == 25)
    +       {
    +               start = osd->start;
    +       } else {
    +               start = osd->start - 18588 + 40;
    +       }
    
            for(c = 0 ; c < osd->len ; ++c)
            {

  8. #8
    Join Date
    Dec 2004
    Posts
    1

    Lightbulb tivovbi zoom mode for widescreen TVs

    Here's my own modest contribution. More and more, I've been watching widescreen programming in zoom mode on my widescreen TV so that it fills up more of the screen. Unfortunately, in zoom mode, the top and bottom line of tivovbi's OSD captioning are no longer fully visible.

    This patch adds a -Z widescreen zoom mode flag which moves the on-screen captions one row towards the center.

    Code:
    --- tivocc.c   2005-02-02 15:33:00.000000000 -0800
    +++ tivocc.c  2007-03-18 14:22:35.000000000 -0700
    @@ -39,6 +39,7 @@
     #define CCPOPUP     0
     #define CCPAINTON   1
     
    +int widescreen_zoom;
     int CUR_X, CUR_Y, kludge = 0, kludge2 = 0;
     int CC_stat = CCNONE, OLD_stat = CCNONE;
     char CC_buf[256];
    @@ -194,6 +195,8 @@
           int old_y = CUR_Y;
           CUR_Y = CC_row[((b1 << 1) & 14) | ((b2 >> 5) & 1)];
           if (debug > 3) printf("<< preamble %d: %02x %02x (stat=%d) >>\n",CUR_Y,b1,b2, CC_stat);
    +      if (widescreen_zoom)
    +       CUR_Y = CUR_Y < 8 ? CUR_Y + 1 : CUR_Y - 1;
           if (CC_stat > CCPAINTON && CC_stat > CUR_Y) CUR_Y = CC_stat;
           if ((CUR_Y!=old_y)&&(flags&OSD_MODE)&&!(flags&DECODE_TEXT))
            if(CC_stat > CCPAINTON && !kludge)
    @@ -707,7 +710,7 @@
     
     void help()
     {
    -  printf("tivovbi [ -t ] [ -o ] [ -c1 | -c2 | -X1 | -X2 ] [ -d | -dd |-ddd | -dddd ] [ -x ] [ -T ] [ -C ]\n"
    +  printf("tivovbi [ -t ] [ -o ] [ -c1 | -c2 | -X1 | -X2 ] [ -d | -dd |-ddd | -dddd ] [ -x ] [ -T ] [ -C ] [-Z]\n"
              " DISPLAY MODE: \n"
              "  -t\ttext output\n"
              "  -o\tOSD display\t\t(requires -c or -X)\n"
    @@ -719,6 +722,7 @@
              "  -X1\tText1 data\n"
              "  -X2\tText2 data\n"
              "  -C\ttranslucent captions\t(requires -o)\n"
    +         "  -Z\twidescreen zoom\t\t(requires -o)\n"
              "  -d\tDEBUG MODE\t\t(requires -t)\n");
       
       exit(0);
    @@ -762,7 +766,7 @@
     
       while (1) {                        //commandline parsing
         int arg;
    -    if (-1 == (arg = getopt(argc, argv, "h?otcxdT12CXwr:"))) break;
    +    if (-1 == (arg = getopt(argc, argv, "h?otcxdT12CXwr:Z"))) break;
         switch (arg) {
           case '?':
           case 'h': help();
    @@ -776,6 +780,7 @@
           case '1': CC_mode = 0; break;
           case '2': CC_mode = 1; break;
           case 'd': debug++;     break;
    +      case 'Z': widescreen_zoom = 1;     break;
     #ifdef TIVO_S2
           case 'r': remote = atoi(optarg); break;
           case 'w': wait_for_user = 1; break;

  9. #9
    Join Date
    Apr 2005
    Posts
    22

    finding tvbi.o

    I had an issue and lost my hacks. I am in the process of trying to find them online and reinstall them.

    I just installed tivovbi but I am having a hard time finding tvbi.o. All I have found so far are dead links. Does anyone know where to get this file?

    Thanks,

    BrendaG4

  10. #10
    Join Date
    Jul 2013
    Posts
    1
    Requires of tivovbi is set cross compiler of PC.


    http://howtomakeslime.org
    www.howtocookbutternutsquash.org | plagerism checker online
    Last edited by Brendon77; 12-04-2013 at 03:55 AM.

  11. #11
    Join Date
    Aug 2013
    Posts
    2

    Mohsin

    This post is so great and nice

    I had an issue and lost my hacks. I am in the process of trying to find them online and reinstall them.

    I just installed tivovbi but I am having a hard time finding tvbi.o. All I have found so far are dead links. Does anyone know where to get this file?

    Thanks,
    MOHSIN

  12. #12
    Join Date
    Oct 2009
    Posts
    40
    The tivovbi dies on my HR-10/250 from time to time with the following messages in /var/log/kernel:
    Nov 17 04:29:49 (none) kernel: emulate_load_store_insn: sending signal 10 to tivovbi(5556)
    Nov 17 04:29:49 (none) kernel: $0 : 00000000 9001fc00 ffffffff 9fff7ab4 00002710 7fff7b00 00000000 00000000
    Nov 17 04:29:49 (none) kernel: $8 : 0000fc00 7fff7b04 00000000 ffffffff 80151b78 000042b9 0000215c 80184020
    Nov 17 04:29:49 (none) kernel: $16: 2ab01008 ffffffff 7fff7b00 7fff7ab8 c01b7b10 ffffffff 00000001 c01b7b14
    Nov 17 04:29:49 (none) kernel: $24: 00000000 020cfe48 1000b570 7fff7a98 7fff7af8 00406144
    Nov 17 04:29:49 (none) kernel: Hi : 00000000
    Nov 17 04:29:49 (none) kernel: Lo : 0000003f
    Nov 17 04:29:49 (none) kernel: epc : 00406194 Tainted: P
    Nov 17 04:29:49 (none) kernel: Status: 8001fc13
    Nov 17 04:29:49 (none) kernel: Cause : 00000010
    Nov 17 04:29:49 (none) kernel: 8001e9fc 8001eac0 80022bb4 800215b4 8001d6b8 00406194
    Nov 17 04:29:49 (none) kernel: 00406194 (Bad trace)
    Any idea what to do about this?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •