1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

pyTivo - Transcoding server

Discussion in 'TiVo Home Media Features & TiVoToGo' started by armooo, Nov 25, 2006.

  1. Dec 3, 2007 #1221 of 5687
    rgr

    rgr Member

    582
    6
    Feb 21, 2003
    Thanks for the advice. I was guessing that the tivo request to the pytivo server to re-enumerate the complete file list might be causing a hiccup. On the use of the Tivo button to back out - do you use it as soon as you select the file to transfer, or at the screen where it prompts you to cancel or return to the folder?

    Two additional questions:
    1) is there a way to correct the Time? I'm at gmt-8, but the time displayed for transferred files is another -8 (for example it's 2:04 pm here - a transferred file ould have today's date but be at 6:04 am)
    2) can pytivo be set to bypass transcoding? I was thinking about using winff to transcode and dumping the output to a share used by pytivo, but want to avoid re-transcoding.

    Thanks
     
  2. Dec 3, 2007 #1222 of 5687
    dlfl

    dlfl Cranky old novice

    7,005
    19
    Jul 6, 2006
    Near...
    pyTivo will send without transcoding if the file is a .Tivo or if it meets the standards set by tivo for TTCB mpeg2 files.. The specs are at the bottom of the linked page.

    pyTivo knows these standards and applies them (actually just that it's mpeg2 and has a valid width and height). You wouldn't want to send a file that didn't meet them. The exception would be if your tivo model will accept a format that pyTivo doesn't know about, and that could be a possibility, especially for HD tivo's. Since pyTivo doesn't know the exact valid file resolutions for every TiVo model it's also possible it could send a file without transcoding that would NOT be acceptable to a particular model.

    Actually if you're up to doing some simple editing of the pyTivo code you can find these two functions in config.py:

    Code:
    def getValidWidths(): 
         return [1440, 720, 704, 544, 480, 352] 
      
    def getValidHeights(): 
        return [720, 480]
    
    Warning: do not disturb indentation when you edit a Python source file!

    I think it's obvious how you could add (or remove) "valid" widths or heights.
    Note that the logic doesn't actually work on WxH pairs. For example you could have something 352x720 that pyTivo would consider valid, but I doubt if any TiVo model would accept that particular combo, or certainly some models wouldn't.

    Note the 1440 width and 720 height that are not in the TiVo spec page. These have been added for HD tivo's and the TiVo spec has not been updated (possibly because they don't officially support TTCB on those models? -- Not sure).

    I'm wondering if we need a config item where you could specify Tivo-compatible resolution sets in addition to the built in ones?
     
  3. Dec 3, 2007 #1223 of 5687
    TreborPugly

    TreborPugly Unreal!

    4,542
    0
    May 2, 2002
    Eastern TN

    I do it when I get to the screen asking me if I want to view the show, or return to browsing.
     
  4. Dec 4, 2007 #1224 of 5687
    rsilvers

    rsilvers New Member

    33
    0
    Dec 3, 2007
    If I already paid for Tivo Desktop Plus, is there any reason why I would want to run pyTivo?
     
  5. Dec 4, 2007 #1225 of 5687
    smilerz

    smilerz Guest

    7
    0
    Nov 9, 2007
    A small feature request - not even sure if its possible.

    When you set the autoshare feature on, is it possible for this list of shares to be displayed in alphabetical order? It seems to display randomly on my Tivo.
     
  6. Dec 4, 2007 #1226 of 5687
    smilerz

    smilerz Guest

    7
    0
    Nov 9, 2007
    I just installed the latest version (pyTivo-2007-12-03-master-c1d881f21b141fb2f7e119a80670ac76774dcf2e.zip)
    When I attempt to download a video I get "no information available" and no option to start the transfer.

    Am I missing something?

    here is my config:
     
  7. Dec 4, 2007 #1227 of 5687
    wmcbrine

    wmcbrine Ziphead

    10,369
    22
    Aug 2, 2003
    Sure.

    1. pyTivo doesn't hog the machine. It doesn't insist on running at startup, or as Administrator.

    2. In some cases*, clips transferred with Tivo Desktop get a time bar labelled only in seconds. The same clips transferred with pyTivo don't have this problem.

    3. [New] You can add descriptions and other metadata to all files, not just .TiVo files.

    4. You can run it on Linux.

    5. You can modify it pretty easily.

    6. You can have multiple shares.

    7. I think it still supports more formats than TD+.

    * I personally saw this in all cases, but that was with the non-plus TD, with MPEGs that didn't have to be reencoded. I'm told that it doesn't happen when the clip is reencoded by TD+; I don't know.
     
  8. Dec 4, 2007 #1228 of 5687
    dlfl

    dlfl Cranky old novice

    7,005
    19
    Jul 6, 2006
    Near...
    1. Comment out the [_tivo_00000DEADBEEF] line. (This is not a valid TSN).
    2. Check the ffmpeg line: Is this the exact path to ffmpeg_mp2.exe ? For example is C:\pyTivo where you installed pyTivo? C:\program files\pyTivo is another common location or C:\program files\pyTivoXXX where XXX is the version number.

    Please post your TiVo model(s), network configuration, pc OS if you need more help.
     
  9. Dec 4, 2007 #1229 of 5687
    BillB

    BillB New Member

    23
    0
    May 19, 2002
    Thanks for the clear explanation. I did read the whole thread, it took six hours, and did not find as clear an explanation as this one.

    I will try the "new share" method you suggested on the Master Edition.
     
  10. Dec 4, 2007 #1230 of 5687
    rsilvers

    rsilvers New Member

    33
    0
    Dec 3, 2007
    I am trying to get pyTivo working. I get these errors. What is wrong?

    [​IMG]
     
  11. Dec 4, 2007 #1231 of 5687
    PaulS

    PaulS Member

    674
    1
    Sep 16, 2002
    Southern NH
    The last line of output for each error says :

    NoOptionError : No option 'ffmpeg' in section: "Server"

    You haven't defined the ffmpeg parms line in the pytivo.conf configuration file. This varies depending upon which version of pyTivo you're using. What's your version, and what's you pytivo.conf file look like ?
     
  12. Dec 4, 2007 #1232 of 5687
    rsilvers

    rsilvers New Member

    33
    0
    Dec 3, 2007
    I downloaded this file: pyTivo-208.zip from here: http://armooo.net/~armooo/pyTivo/downloads/



    -----------------------------------

    [Server]
    port=9032


    #Full path to ffmpeg including filename
    #ffmpeg=d:\Program Files\pyTivo\plugins\video\ffmpeg_mp2.exe
    #For linux: ffmpeg=/usr/bin/ffmpeg
    #ffmpeg=/usr/bin/ffmpeg

    #This will make a large debug.txt file in you base directory. It only debugs
    #transcode.py right now.
    #debug=false

    # Audio bit-rate, default 192K
    #audio_br=192K

    # Video bit-rate, default 4096K
    #video_br=12Mi

    #Beacon broadcast address(es)
    #Typically use 255.255.255.255 but on some multihomed machines you may
    #need to specify the subnet broadcast address(es) of your Tivo boxes
    beacon=255.255.255.255

    #Output Pixel Width: if you have an HDTV you might want to try 720 or 704
    #Valid: 720, 704, 544, 480, 352
    #width=1440
    #height=720
    #ffmpeg_prams=-vcodec mpeg2video -r 29.97 -b %(video_br)s -maxrate %(max_video_br)s -bufsize %(buff_size)s %(aspect_ratio)s -comment pyTivo.py -ac 2 -ab %(audio_br)s -ar 44100 -f vob -

    ##Per tivo options
    # section named _tivo_TSN with the tsn in all caps
    [_tivo_00000DEADBEEF]

    #If you want to use 16:9 or 4:3 on this tivo
    aspect169=true
    width=1440
    height=720
    audio_br=320K
    video_br=12Mi
    ffmpeg_prams=-i %(in_file)s -vcodec mpeg2video -r 29.97 -b %(video_br)s -maxrate %(max_video_br)s -bufsize %(buff_size)s %(aspect_ratio)s -comment pyTivo.py -ac 2 -ab %(audio_br)s -ar 44100 -f vob -

    #audio_br=320K
    #video_br=12Mi

    [pyTivo]
    #Type can be either 'video' or 'music'
    type=video

    #Path is the full path to your files (No trailing slash needed)
    path=c:\Downloads
    #For linux: path=/media
    #path=/home/armooo/Videos


    ##You can have more than one share
    #[MyTelevision]
    #type=video
    #path=d:\television
     
  13. Dec 4, 2007 #1233 of 5687
    PaulS

    PaulS Member

    674
    1
    Sep 16, 2002
    Southern NH
    I'll highlight the problem areas.

    #1 : You need to tell pytivo where to get ffmpeg from. In your file, both the Linux and Windows flavor definitions are commented out. You need to uncomment one, based upon what type of system pytivo is running on.

    #2 : [_tivo_00000DEADBEEF] isn't a valid TSN, so it's not going to match your TiVo's TSN. You need to either comment this line out, or provide the correct TSN.


     
  14. Dec 4, 2007 #1234 of 5687
    rsilvers

    rsilvers New Member

    33
    0
    Dec 3, 2007

    Thanks. The instructions said:

    You need to edit pyTivo.conf in 3 places

    1. ffmpeg=
    2. [<name of share>]
    3. path=


    So I did not know to change that also.
     
  15. Dec 4, 2007 #1235 of 5687
    PaulS

    PaulS Member

    674
    1
    Sep 16, 2002
    Southern NH
    If you don't intend on using the per-TiVo configuration stuff, or if you're using pyTivo with a single TiVo, you can simply comment that line out.
     
  16. Dec 4, 2007 #1236 of 5687
    rsilvers

    rsilvers New Member

    33
    0
    Dec 3, 2007
    I got much further. Now my Tivo can see it and browse and initiate a transfer. But I still get this error:

    [​IMG]
     
  17. Dec 4, 2007 #1237 of 5687
    Stu_Bee

    Stu_Bee New Member

    887
    0
    Jan 14, 2002
    Silicon...
    Just a case history:
    PyTivo on my Ubuntu stopped transcoding files that had .ac3 audio... This probably occured due to my upgrade from Ubuntu versions (Fiesty -> Gutsy), where somehow ffmpeg was changed to one without all the previous codecs of the prior.

    Anyways, this thread here helped me get back in order by
    1) Uninstalled, compiled and reinstalled ffmpeg (resulting in ffmpeg with needed codecs)
    Compiling ffmpeg from upstream cvs snapshots
    https://wiki.ubuntu.com/ffmpeg
    2) edited transcode.py to get correct frame size from ffmpeg output:
    http://tivocommunity.com/tivo-vb/showthread.php?p=5642515#post5642515
    3) edited transcode.py to get correct fps from ffmpeg output:
    http://tivocommunity.com/tivo-vb/showthread.php?p=5749111#post5749111

    thanks to the above posters.
     
  18. Dec 4, 2007 #1238 of 5687
    rsilvers

    rsilvers New Member

    33
    0
    Dec 3, 2007
    It is working now.

    I had to comment this line:

    #ffmpeg_prams=-i &#37;(in_file)s -vcodec mpeg2video -r 29.97 -b %(video_br)s -maxrate %(max_video_br)s -bufsize %(buff_size)s %(aspect_ratio)s -comment pyTivo.py -ac 2 -ab %(audio_br)s -ar 44100 -f vob -


    and uncomment this line:
    ffmpeg_prams=-vcodec mpeg2video -r 29.97 -b %(video_br)s -maxrate %(max_video_br)s -bufsize %(buff_size)s %(aspect_ratio)s -comment pyTivo.py -ac 2 -ab %(audio_br)s -ar 44100 -f vob -

    It seems real slow. I know it is upconverting to 1440x720 though, which is nice because I don't have to zoom the display later to fill the screen (which has the negative effect of cropping a bit).

    Tivo Desktop Plus seems to be multi-threaded. This is not, so it only using 1/2 my CPU.
     
  19. Dec 4, 2007 #1239 of 5687
    rsilvers

    rsilvers New Member

    33
    0
    Dec 3, 2007
    At 1440x720, it is just about exactly 1/2 the speed of Tivo Desktop.
    At 960x540, it is about 15&#37; faster than Tivo DTP. Kinda makes sense as 960x540 has exactly 1/2 the number of pixels as 1440x720.

    When I change ffmpeg to ffmpeg -threads 2, it does not seem to speed it up any.
     
  20. Dec 4, 2007 #1240 of 5687
    rsilvers

    rsilvers New Member

    33
    0
    Dec 3, 2007
    Ok, I am confused. The PyTivo docs say:

    "Then there is the issue that the largest dimension of file TiVo will accept it 720x480."

    Does that mean that pyTivo always converts to 720x480?

    If no, then what does that quote mean?

    If yes, then what is the width= and height= for in the pyTivo.conf file?

    What should I set them to? If they make no difference, then my speedup is because I changed video_br from 12 to 8 and audio_br from 320 to 192.
     

Share This Page