Results 1 to 9 of 9

Thread: TivoHD as MythTV tuner - proof of concept

  1. #1
    Join Date
    Jan 2006
    Posts
    12

    TivoHD as MythTV tuner - proof of concept

    I didn't see any solution for using a Tivo as a Mythtv tuner; if there's already one, please clue me in.

    This proof of concept waits for the show to finish recording and then transfers it to the mythtv machine for playback. I'm interested in making it live stream the recording, but I haven't seen any way to do that yet - still reading the mfs_ftp thread, etc

    This uses the mythtv Import tuner and the events interface (requires mythtv 0.23 iirc). In mythtv-setup, add an Import tuner (or two) and connect it to an appropriate "Video Source." Then, in the System Event editor, add a comment for "Recording started" like: /usr/local/bin/mythtv-record-event "%CARDID%" "%CHANID%" "%FILE%" "%STARTTIME%" "%ENDTIME%" "%TITLE%" "%SUBTITLE%" "%DESCRIPTION%" then install the attached script.

    It requires a fix to mfs_ftp.tcl fsids are not updated before a RETR, so one must do an ls before a get, but the script already knows the name.

    Code:
     proc RETR { fsock line } {
     global info db control_socket resume ; set p 2
      set line [string range $line 5 end]
      outd 1 "RETR:\n\"$line\""
    + update_rec_fsids 1
      set line [file tail $line] ;
    I haven't tested with two tuners yet, but it should theoretically work.

    mythtv-record-event.zip

  2. #2
    Join Date
    Jan 2006
    Posts
    12
    Reserved for future information.

  3. #3
    Join Date
    Jan 2002
    Location
    Sonoran Desert
    Posts
    2,829
    Quote Originally Posted by vandebo View Post
    I'm interested in making it live stream the recording, but I haven't seen any way to do that yet - still reading the mfs_ftp thread, etc
    The file transfer protocol doesn't really have streaming in mind. IMO the best way to accomplish this would be to write an SMBD or NFSD that runs on the tivo, either that or run vserver and then have the remote PC/server translate MFS to SMB/NFS.
    Before PMing me: Iím not your personal tech support. If you have a question, ask in public so I don't have to repeat if somebody else asks. If you want images or slices, use emule. I will ignore all support PMs.

    Sponsor a vegetarian! I have taken the pledge, how about you?

  4. #4
    Join Date
    Jan 2002
    Location
    Sonoran Desert
    Posts
    2,829
    I am curious, have you made any progress on this project?

    I've been toying with the idea of using the tivo as a backend for XBMC Eden, and having it function as a MythTV backend would work for that as well, as XBMC Eden intends on being a universal PVR front end.
    Before PMing me: Iím not your personal tech support. If you have a question, ask in public so I don't have to repeat if somebody else asks. If you want images or slices, use emule. I will ignore all support PMs.

    Sponsor a vegetarian! I have taken the pledge, how about you?

  5. #5
    Join Date
    Jan 2006
    Posts
    12
    I haven't gotten to it yet. I made a few minor tweaks to the script above (guessing you're not interested), but I needed to learn MFS a bit before attempting streaming support, so I merged the 64bit branch. I'm pretty determined to make it happen, it'll just take a bit of time.

  6. #6
    Join Date
    Jan 2002
    Location
    Sonoran Desert
    Posts
    2,829
    Quote Originally Posted by vandebo View Post
    I haven't gotten to it yet. I made a few minor tweaks to the script above (guessing you're not interested),
    I think it is a good idea in principle, but the hard disk in the tivo feels a bit wasted.

    Quote Originally Posted by vandebo View Post
    but I needed to learn MFS a bit before attempting streaming support, so I merged the 64bit branch. I'm pretty determined to make it happen, it'll just take a bit of time.
    I myself have been looking in this direction:

    http://lwn.net/Articles/57369/

    Tie that into vserver and you've got a winner.

    I've been picking up a bit of C here and there, but mucking with the kernel isn't quite my thing yet, and I don't think it will be for quite some time. I'm going for an IS degree with a specialization in networking, so few of my courses focus on programming, and the ones that do focus on higher level languages (e.g. C#.)

    I've also considered something more interesting:

    Simply pipe the live tuner output over the network and essentially have the tivo function the same as the hdhomerun does. The driver footprint on the HTPC side would be minimal if not non-existent. The tivo "tuners" would be a lot cheaper than an hdhomerun (Tivo HD's are easily found for less than $100) with the added benefit of ignoring broadcast flags.
    Before PMing me: Iím not your personal tech support. If you have a question, ask in public so I don't have to repeat if somebody else asks. If you want images or slices, use emule. I will ignore all support PMs.

    Sponsor a vegetarian! I have taken the pledge, how about you?

  7. #7
    Join Date
    Jan 2006
    Posts
    12
    Quote Originally Posted by AlphaWolf View Post
    I myself have been looking in this direction:

    http://lwn.net/Articles/57369/

    Tie that into vserver and you've got a winner.

    I've been picking up a bit of C here and there, but mucking with the kernel isn't quite my thing yet, and I don't think it will be for quite some time. I'm going for an IS degree with a specialization in networking, so few of my courses focus on programming, and the ones that do focus on higher level languages (e.g. C#.)
    In my setup, I don't have a particularly large disk in the TiVo (I just picked up an HD recently, used a Series 1 a few years back). But I do have several terabytes in the MythTV backend, so a file system driver isn't particularly attractive. If a virtual file system is your ideal solution, you should consider FUSE - it's a framework for file systems in user space. IIRC, sshfs uses FUSE. It seems that FUSE + mfs_utils + some glue would give you what you want here modulo in progress recordings.

    Quote Originally Posted by AlphaWolf View Post
    I've also considered something more interesting:

    Simply pipe the live tuner output over the network and essentially have the tivo function the same as the hdhomerun does. The driver footprint on the HTPC side would be minimal if not non-existent. The tivo "tuners" would be a lot cheaper than an hdhomerun (Tivo HD's are easily found for less than $100) with the added benefit of ignoring broadcast flags.
    This is the approach that is most interesting to me. I used the manual record approach above because it was the easiest to get going. Once I get the streaming part figured out, changing to streaming the live buffer should be pretty easy. One thing I haven't figured out yet is how to deal with dual tuners. The stuff in TWP doesn't seem to let you address each tuner individually.


    --
    Steve

  8. #8
    Join Date
    Jan 2002
    Location
    Sonoran Desert
    Posts
    2,829
    Quote Originally Posted by vandebo View Post
    In my setup, I don't have a particularly large disk in the TiVo (I just picked up an HD recently, used a Series 1 a few years back). But I do have several terabytes in the MythTV backend, so a file system driver isn't particularly attractive. If a virtual file system is your ideal solution, you should consider FUSE - it's a framework for file systems in user space. IIRC, sshfs uses FUSE. It seems that FUSE + mfs_utils + some glue would give you what you want here modulo in progress recordings.
    Neat.

    Thanks.

    Quote Originally Posted by vandebo View Post
    This is the approach that is most interesting to me. I used the manual record approach above because it was the easiest to get going. Once I get the streaming part figured out, changing to streaming the live buffer should be pretty easy. One thing I haven't figured out yet is how to deal with dual tuners. The stuff in TWP doesn't seem to let you address each tuner individually.

    --
    Steve
    I remember older generation tivo's (can't remember which, as I've had so many and today I only have two) actually had a virtual device associated with each tuner, and a separate (non-tivoapp) binary could issue commands to it to tune to specific frequencies and PID's (was it via dssapp? I don't recall) and it would spit out transport stream data. Anyways it is my guess that they've melded this functionality into tivoapp itself.

    Somebody with some leet haxor skills could pick that apart and force it to pipe the output over the network so that we don't have to write to the hard disk and immediately read back off of it, in which case we could just replace the tivo hard disk with one of these with one of these in it. Then the tivo can be a nice energy efficient tuner
    Before PMing me: Iím not your personal tech support. If you have a question, ask in public so I don't have to repeat if somebody else asks. If you want images or slices, use emule. I will ignore all support PMs.

    Sponsor a vegetarian! I have taken the pledge, how about you?

  9. #9
    Join Date
    Jan 2006
    Posts
    12
    BTW - I'm making progress on this: http://www.dealdatabase.com/forum/sh...ve-cache-on-S3

    --
    Steve

Posting Permissions

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