1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Breaking News - The sale is back... "Our “once in a lifetime” PLS promotion was such a hit, that we’ve decided to launch it again! The PLS Transfer Sale will be available again for the last 3 days of the month. This will include the BOLT+ 3TB, and 4 refurb units (BOLT 500GB, BOLT 1T, Roamio Pro and the TiVo Mini)." https://www.tivo.com/secondchancelifetimesale#/secondchancelifetimesale

pyTivo - Transcoding server

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

  1. Dec 4, 2007 #1241 of 5893
    dlfl

    dlfl Cranky old novice

    7,162
    75
    Jul 6, 2006
    Dayton OH
    Do you mean compared to TD that is also producing 1440x720?

    First the pyTivo documentation (Wiki) is only as good as volunteers make it. Hopefully after you've learned some lessons you will contribute and make it better. ;) The pyTivo.conf.dist example config file needs cleaning up and the configuration instructions too.

    The width and height parameters do control the video size that pyTivo outputs. Each TiVo model has a selection of width/height combinations that it will accept on TTCB. The combinations for Series 2 models are given here at the bottom of the page. You should select width and height from the valid combinations for your Tivo model, and choose a combo that is appropriate for your TV. For a 27" non-HD TV, 544x480 will be plenty.

    If you have a wide-screen TV, set your Tivo to 16:9 aspect ratio and set aspect169=true in your pyTivo.conf file. pyTivo makes a valiant effort at either letterboxing or pillarizing videos that don't match your selected aspect ratio.

    The transcoding speed is determined primarirly by the sum of video_br and audo_br (subject to limitations of your PC and network of course), regardless of video dimensions. This sum determines how many bytes it takes to encode each second of your video.
     
  2. Dec 4, 2007 #1242 of 5893
    rsilvers

    rsilvers New Member

    33
    0
    Dec 3, 2007
    Thanks.

    I have a 45 inch 16:9 Sharp LCD with a Tivo-3.

    Here is what I found out...

    With my config file set to:

    width=1440
    height=720

    Made Atlantis go from 640x352 to 1440x720
    Made Weeds go from 1280x720 to 1440x720
    Made Heros go from 960x528 to 1440x720

    And when I comment those out:

    #width=1440
    #height=720

    Made Atlantis go from 640x352 to 544x480
    Made Weeds go from 1280x720 to 544x480
    Made Heros go from 960x528 to 544x480


    This is not optimal enough as it is too slow to make all files 1440x720, and a shame to downres true HD files. What it needs are a choice of two or three valid Tivo sizes, such as 1440x720, 960x540, and 720x480. It should then scale to the size above the size closest to the actual file. To someone who knows Python, this should be a very easy change.

    For example, my Atlantis file of 640x352 would be converted to 720x480. My Weeds file of 1280x720, would be converted to 1440x720, and my Heros file of 960x528 would be scaled to 960x540.
     
  3. Dec 4, 2007 #1243 of 5893
    snedecor

    snedecor Member

    84
    0
    Jun 27, 2001
    Angleton, TX
    I downloaded and installed python, pytivo, configured it correctly (I think).
    PC has Tivo Desktop Server (paused) on it.
    Tivo is 540 Series 2

    My share is visible in the NP, and I can select a video. However, when I select the video, a second window pops up, with the only option being select to return. No play, no error that I can see. All videos do this, mpg's, .tivos that came from the tivo I was trying, and .avi's

    Here is a dump of the CMD line:
    (sorry, had to do an image, how do you get text from Python window?)

    Contents of pytivo.conf
    -----------------------------
    [Server]
    port=9032

    ffmpeg=e:\pyTivo\plugins\video\ffmpeg_mp2.exe

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

    #If you want to use 16:9 or 4:3 on this tivo
    aspect169=true

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

    #Path is the full path to your files (No trailing slash needed)
    #For windows: path=c:\videos
    #For linux: path=/media
    path=C:\Documents and Settings\Gayle\My Documents\My TiVo Recordings
    #Make all subfolders in to top level shares
    auto_subshares= True
     

    Attached Files:

  4. Dec 4, 2007 #1244 of 5893
    armooo

    armooo pyTivo Developer

    81
    0
    Feb 1, 2003
    rsilvers you can thank wfaulk for his patch 9ec1d
     
  5. Dec 4, 2007 #1245 of 5893
    smilerz

    smilerz Guest

    7
    0
    Nov 9, 2007
    I commented out the line and confirmed (again) that the path to ffmpeg is correct - without success.

    The odd thing is that it displays the content correctly - it just won't transfer the data.
    MP3s work fine.
    Another oddity - for shares that contain many files I can't scroll, it merely jumps to the top of the list.

    I have a TivoHD with everything connected via ethernet (same subnet, no firewalls - even desktop firewalls.)
    The PC running pytivo is on XP fully patched.
     
  6. Dec 5, 2007 #1246 of 5893
    dlfl

    dlfl Cranky old novice

    7,162
    75
    Jul 6, 2006
    Dayton OH
    Enhancements:

    Added vSeriesGenre and vProducers

    Pull down selection box to select different file extensions in case you are not always doing .mpg files (e.g., .mkv.txt, .mp4.txt etc.)

    Download the installer here.

    Be sure to uninstall the previous version first, if you had it!
     
  7. Dec 5, 2007 #1247 of 5893
    rsilvers

    rsilvers New Member

    33
    0
    Dec 3, 2007
    Thanks. That is what I wanted. It seems to work. I mean, it took me a long time but only because I don't know Python and it took me a while to get the diffs in place because there was some version differences with what I was running and what this mod was based on.

    Now:

    Atlantis 640x352->704x480
    Weeds 1280x720->1440x720
    Heros 960x528-720x480

    This seems optimal assuming Tivo3 only has two heights -- 720 or 480. I suppose it does.

    I like how pyTivo supports mkv files. I was screwed with Tivo Desktop Plus whenever I had that format.

    Someone said pyTivo is 'easy' to install. If you change the word 'easy' to 'possible,' I would agree. It takes a while just to find compatible versions of dependent software. It is very far from easy. Easy is when my mother can do it. It could be made easy just by the website having direct links to a known tested version with a working config file and very clear links to a compatible version of Python and ffmpeg.
     
  8. Dec 5, 2007 #1248 of 5893
    Mandabar

    Mandabar New Member

    22
    0
    Oct 15, 2003
    Orlando,...
    Ok. WOW. I'm going to sleep, but before I go, Let me lay my problem on you gurus.

    First for the Quotes, I so agree with you Rsilver, Wish they had a easy working version, 1/4th as easy to setup as Tivo.net.

    2. Armoo I have no idea how to use that patch thing that you had there, tried direct overwrites and it wouldn't work anymore..

    But annnyway. (I'm a bit sleepy, overlooking spelling or aimlessy talk/typing)

    I got Installed. Working? No, But 98% there.
    Erm, Installed using pyTivo_182_setup.exe.
    That Installed the Python that my computer is using. Also that service thingy that I'M NOT BOTHERING WITH yet... Heh.
    It Also put pytivo 182 in my program files, not using that though.

    THEN, I went and used the newest least weird verison (Without a 40+char name), So thats pyTivo-208.zip. Unzipped to my desktop. Using that. Then I played with my config file for a good long while, Mention, rsilver your post last page helped me out with an example, and other people correcting helped. I had the issue with infile, and i changed the quotes around like rsilver did too.

    So It Sorta works. Heres the config file.

    Code:
    [Server]
    port=9099 [B][I]Changed server so it would run even though tivo.net was, I'm guessing the defualt server port is the most used one for hmo stuff[/I][/B]
    
    #Full path to ffmpeg including filename
    #For windows: ffmpeg=c:\Program Files\pyTivo\plugins\video\ffmpeg_mp2.exe
    #For linux:   ffmpeg=/usr/bin/ffmpeg
    ffmpeg=C:\Documents and Settings\Mike\Desktop\Pytivo\plugins\video\ffmpeg_mp2.exe
    #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=1024K
    
    #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
    #aspect169=true
    #width=720
    #width=704
    #width=480
    width=352
    height=480
    [B]ffmpeg[/B]_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_590123456789012] [B][I]TSN Changed after first 3 from orignail i had[/I][/B]
    
    #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
    [B]#ffmpeg[/B]_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 -
    
    [MyMovies]
    #Type can be either 'video' or 'music'
    type=video
    
    #Path is the full path to your files (No trailing slash needed)
    #For windows: path=c:\videos
    #For linux:   path=/media
    path=C:\Documents and Settings\Mike\My Documents\Azureus Downloads\Tivo
    
    
    ##You can have more than one share
    #[MyTelevision]
    #type=video
    #path=d:\television
    Ok. so. It works. I can see the directory My Movies. I see all my stuff.. I can get a transfer going. Nice to see the input/output info from ffmpeg on the server/cmd line.

    The video's try to transfer just fine, I haven't let one finish yet for one issue. Everything transfers full black screen with working audio.

    Annoying eh? =)

    I tried all sorts of HxW that I could think off as you can see in the code. From this link. http://tivosupport2.instancy.com/Ti...-79c3-4238-96c8-a27b323d1413/ins_content.html . I tried them with aspect169=true on and off.

    My TV is 16:9 32inch hdtv
    My Other tv is also 16:9 27inch hdtv.

    Both are 590 S2 Tivo's Humax. They are both set to be 16:9 Video (Not that I've seen it makes a difference).

    16:9 Worked on TDN?!Per Link, Tivo.net works for doing video's (pretty much any format works) in 4:3, but after a very brief period when 16:9 worked on my tv from tivo.net i want to have that work again. That and it's a "dead" project with no author around anymore, and mod calling it "stale" *Cries*.

    I'll mess with your fancy complicated metadata stuff after I get the basics working

    Do really need tivo server running paused on your computer? Tivo.net seems to run just fine w/o that software on your computer. I think.

    There was something else... i forgot. If I left out any info.. er.. I'll try to answer it tommorow when I'm more coherent

    edit: ps, further testing, of all my files a few do work, the 4:3 ones do.. the rest are widescreenish format. and i do have that trigger off right now, though it didn't seem to make a difference. So Clarification, 4:3 I can watch, doesn't get pillarized though so that means its streched to 16:9. My 16:9 files won't transcode at all
     
  9. Dec 5, 2007 #1249 of 5893
    wmcbrine

    wmcbrine Ziphead

    10,458
    67
    Aug 2, 2003
    It'll also do 1080.

    I'm pretty sure that every version of pyTivo I've downloaded came with a Windows binary of ffmpeg. Not that I've used it, since I run pyTivo in Linux. Are you saying that the bundled ffmpeg doesn't work?

    The only other dependency, if you don't already have it installed, is Python. Just grab the latest from python.org and you're set.

    That's a very narrow definition. I don't agree.
     
  10. Dec 5, 2007 #1250 of 5893
    rsilvers

    rsilvers New Member

    33
    0
    Dec 3, 2007
    I see it does come with ffmpeg. I did not notice because the download site said:

    "In order to run pyTivo you will need: 1. A compatible TiVo; 2. A python interpreter; 3. FFmpeg; 4. The pyTivo script."

    I took this to mean I would have to get a python interpreter and FFmpeg so I went right to work trying to find where to download FFmpeg binaries. That took a long time because there are no official binaries.

    Other things that made it take a while to come up to speed:

    1. Config file has Tivo TSN param uncommented when nearly everyone will want to comment it. Also it does not say what a TSN is or where to find it. And the README file says to edit three other areas but not this line. But it won't work unless you do edit it.

    2. There were two ffmpeg_prams lines - one of which if you uncomment it does not work. Of course I uncommented the one which does not work and got stuck.

    3. Nothing in the file says you can leave that line commented and the program has hardcoded defaults. A comment in there saying something like 'you can optionally uncomment and customize these following lines' would have helped something to get running right away.

    4. I was unsure about how it exactly used width and height, and felt like I needed to find out to optimize the speed as when I first ran it it was 1/2 the speed of Tivo Desktop Plus. I am very happy with the mod to optimize it. That took a while to get working because of a bug/typo in it where config was called Config and that took knowledge of Python to fix.

    I like it better than Tivo Desktop Plus because I am now confident in how it is transcoding and I am unsure how TDP rescales files. It also is now running faster than TDP at what might be equivalent settings, and it is using about 40% less CPU on my PC.
     
  11. Dec 5, 2007 #1251 of 5893
    dlfl

    dlfl Cranky old novice

    7,162
    75
    Jul 6, 2006
    Dayton OH
    Yes it's not easy even for someone in the know to initially understand configuring pyTivo and to keep up with the rapid development and many versions of the code -- but it's worth it! Good thing we have this forum, eh?

    I would note that TSN is explained in the Wiki, configuration section.

    What we need is to commercialize pyTivo :rolleyes: . Then the documentation effort could be put in to make it easy for beginners. Of course that costs money so the product would no longer be free, probably costing $49.95 or ??.

    Anyone can contribute to the Wiki !

    Anyway, congratulations on making it through the maze!
     
  12. Dec 5, 2007 #1252 of 5893
    smilerz

    smilerz Guest

    7
    0
    Nov 9, 2007
    I'm reposting this in case it got buried in the replies:
    I commented out the line and confirmed (again) that the path to ffmpeg is correct - without success.

    The odd thing is that it displays the content correctly - it just won't transfer the data.
    MP3s work fine.
    Another oddity - for shares that contain many files I can't scroll, it merely jumps to the top of the list.

    I have a TivoHD with everything connected via ethernet (same subnet, no firewalls - even desktop firewalls.)
    The PC running pytivo is on XP fully patched.
     
  13. Dec 5, 2007 #1253 of 5893
    greg_burns

    greg_burns Now in HD

    6,387
    1
    May 21, 2004
    Slower...

    It is not Tivo.NET nor pyTivo, it is what is broken with our Tivos since 9.1.

    Can anyone confirm this (no video, only audio for 16x9) is still a problem? I personally have not tried in awhile.

    My 240 didn't have the probelm, only my 540.
     
  14. Dec 5, 2007 #1254 of 5893
    gonzotek

    gonzotek tivo_xml developer

    2,429
    9
    Sep 24, 2004
    Outside...
    I can't confirm, but I can say I keep a close eye on this thread and the HMF forum in general and I haven't seen any reported success stories, just failures.
     
  15. Dec 5, 2007 #1255 of 5893
    jcthorne

    jcthorne Well-Known Member

    2,799
    25
    Jan 28, 2002
    Houston
    I thought it was pretty common knowledge but guess not from the exchange on resolutions for the TivoHD above.

    I have stopped having pyTivo convert resolution AT ALL. I have yet to find a resolution below 1080i that the TivoHD will not display correctly if the file's aspect ratio is internally correct. I know I have transferred numerous 1280xXXX (fixed width 720p) and quite a number of 720xXXX and 640xXXX. All play in thier native resolution without conversion by ffmpeg. Most are left at 23.98fps as well. I just let ffmpeg (via pyTivo) convert to mpeg2video and ac3 at 320kbps.

    Am I missing something with this overly simplistic approach? I know it will not work for series 2 units and have no idea on S3 but assume it would be the same as the THD.
     
  16. Dec 5, 2007 #1256 of 5893
    rsilvers

    rsilvers New Member

    33
    0
    Dec 3, 2007
    How do you keep it from converting resolution? Just edit the FFmpeg params line to not give a new size? That might be the best idea as let the Tivo hardware scale it in realtime. As long as pyTivo pads it to 16:9. Someone with experience please comment on if this is the best idea. I would assume it was except that pyTivo puts in the effort to resize the file so I figured that must be for a good reason.

    I did have audio get out of sync and it was when I left a file at 23.97 fps, so I thought maybe the 29.97 was important for Tivo -- though I have not tested that.
     
  17. Dec 5, 2007 #1257 of 5893
    jcthorne

    jcthorne Well-Known Member

    2,799
    25
    Jan 28, 2002
    Houston
    I edited the ffmpeg params line. FFmpeg will default to the input size and frame rate if none are specified. So long as the file's AR is correctly specified, TivoHD seems perfectly capable of padding and resizing to the screen in real time. I only had a problem with audio sync when ffmpeg converted FROM 23.98 to 29.97, never if I left the frame rate of the file alone as received (unless the file was out of sync to begin with).

    The whole resolution conversion and AR sequence was very important for S2 tivos. Does not seem necessary for most of what I have encountered on the THD.

    I noticed that armoo's latest build now skips reencode for all mpg2 files on S3 tivos. Have not installed it yet.
     
  18. Dec 5, 2007 #1258 of 5893
    mitch2k2

    mitch2k2 New Member

    110
    0
    Aug 2, 2006
    Are there any ffmpeg parameters to tweak things like brightness and/or contrast during conversion?
     
  19. Dec 5, 2007 #1259 of 5893
    Mandabar

    Mandabar New Member

    22
    0
    Oct 15, 2003
    Orlando,...
    Well I'm still having an issue, Regardless of the 16:9 issue. Also I take this to mean that for pytivo, 16:9 video doesn't work (tivo issue, s2) either?

    So this value doesn't change anything? aspect169=true

    Any Video I have that is 16:9ish won't transfer to my tivo with video, only audio.

    The only files I can watch are the 4:3 ones, which are taking all the 4:3 space and becoming 16:9. I guess the term is not pillarizied.

    Also, any comments on my config file?
     
  20. Dec 5, 2007 #1260 of 5893
    snedecor

    snedecor Member

    84
    0
    Jun 27, 2001
    Angleton, TX


    Can anyone comment on why my TiVo can see the share generated by Pytivo, but when I select a video, I get a blank page with "no information available", and the only option is to press select to go back?

    I did however find out that if you press PLAY while on this screen, you will reboot your TiVo.

    Snedecor
     

Share This Page