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 7, 2007 #1281 of 5683
    refried

    refried New Member

    145
    0
    Dec 21, 2005
    Brunswick, ME
    I think your version of ffmpeg is a little too new. I started on this patch which should handle the output and video_info parsing changes.
     

    Attached Files:

  2. Dec 7, 2007 #1282 of 5683
    dlfl

    dlfl Cranky old novice

    6,996
    17
    Jul 6, 2006
    Near...
    Not really..... r8047 is the rather old version of ffmpeg that has been distributed with pyTivo for many months now. No version as new as 208 should have trouble parsing it. Current versions are r10051 and newer and there have been mods to transcode.py (after 208) to make it handle both the older and newer versions.
     
  3. Dec 7, 2007 #1283 of 5683
    randyo

    randyo New Member

    22
    0
    Oct 31, 2005
    Is it possible to play DVDs through pyTivo? For example, I'd like to buy a 500gig harddrive and install it to my computer. Then, I could rip 100 of my DVDs (probably as .iso images?) to the PC and be able to access them from the tivo anytime I wanted.
     
  4. Dec 7, 2007 #1284 of 5683
    dlfl

    dlfl Cranky old novice

    6,996
    17
    Jul 6, 2006
    Near...
    pyTivo (i.e., ffmpeg) will not play .iso files AFAIK. However you could easily rip to .vob files and concatenate them to make the entire movie in one .vob, then pyTivo should transcode them OK. (Possibly you would need to rename the combined file as .mpg.)

    Here is a helpful info page on combining VOB's, courtesy of VideoReDo. It gives you enough information to do it for free using a command window. I and many others would highly recommend you purchase VRD -- it will facilitate this process and that isn't even its main purpose. The DVDDecrypter program mentioned is old but free and generally very good still. OP can suggest other good free rippers.
     
  5. Dec 7, 2007 #1285 of 5683
    Danimal4326

    Danimal4326 New Member

    47
    0
    Apr 8, 2003
    YES!! I do this with pyTivo now. You will not get the menus but it will display the mpeg stream and play 5.1 audio.

    what I do is extract the main movie mpeg stream with no re-encoding.

    on a TiVoHD it will display the movie wit hthe correct aspect ratio.

    I do all the ripping on my linux server in a 2 part process (ssomewhat automated , but since the 5.1 stream is not alaways the first one, i re-run the 2nd process manually.)

    <code>

    ###
    # 1 Rip DVD
    ###
    ## this rips the dvd to a .vob
    mplayer dvd:// -dumpstream -dumpfile "${SOURCE_DIR}/${MOVIE}.vob"

    ###
    # 2 Rip out only movie and 5.1 audio
    ###
    ffmpeg -i "${SOURCE_DIR}/${MOVIE}.vob" -vcodec copy -acodec copy -f vob "${BASE_DIR}/${MOVIE}.mpg"

    </code>

    what you end up with is a mpg file that pyTivo will send directly to the TIVO without re-encoding (i modified some of the pytivo code to allow the audio to be passed directly but i think the latest versions do this)


    no I have a library of all my movies that i can watch without getting up off my ass , finding the dvd, putting it in...
     
  6. Dec 8, 2007 #1286 of 5683
  7. Dec 8, 2007 #1287 of 5683
    PaulS

    PaulS Member

    674
    1
    Sep 16, 2002
    Southern NH
    Here are the complete SeriesID lists, sorted by name and by ID. Enjoy!
     

    Attached Files:

  8. Dec 8, 2007 #1288 of 5683
    naclone

    naclone New Member

    118
    0
    Feb 11, 2002
    this is awesome.

    out of curiosity, what is the easiest way to determine the SeriesID of a show that is not on your list or is not listed at zap2it? i'd like to group all of my sports content under an appropriate seriesID and there are a couple shows in my guide like "Sports Room" on WPXN or "Sports Fan" on HSN, but I can't seem to track down Ids for them.
     
  9. Dec 8, 2007 #1289 of 5683
    wgw

    wgw New Member

    217
    0
    May 16, 2007
    Thanks. The default string used by Winff worked so well on a problematic interlaced cable recording I was trying to encode that I decided to try replacing my pyTivo ffmpeg template with it. Hopefully it works just as well on other sources.

    Code:
    audio_br=384K
    video_br=8Mi
    width=720
    height=480
    
    ffmpeg_prams=-vcodec mpeg2video -r 29.97 -b %(video_br)s -maxrate %(max_video_br)s -bufsize %(buff_size)s %(aspect_ratio)s -mbd rd -flags +trell -mv0 -cgop -cmp 2 -subcmp 2 -comment pyTivo.py -acodec ac3 -ab %(audio_br)s  -ar 48000 -f vob -
     
  10. Dec 8, 2007 #1290 of 5683
    dlfl

    dlfl Cranky old novice

    6,996
    17
    Jul 6, 2006
    Near...
    smilerz reported this "no info" problem first, and I have it too. It is ticket #52 on the Wiki, which I just updated ("replied to" that is).

    Anyone have any new info or results on this? Are windows users stuck at d498... for now? Armooo took ownership of the ticket but he replied this version has no problems on linux and he has no windows box to test on. I just spent a few hours trying to track it down and got nowhere.
     
  11. Dec 8, 2007 #1291 of 5683
    wgw

    wgw New Member

    217
    0
    May 16, 2007
    No joy here.:( I've spent days comparing the code changes with Beyond Compare and making small changes here and there to no avail. I suppose my time would have been better spent starting from scratch reading python tutorials to learn the language.:eek:

    I ran across an interesting python path module. The author said he tired of typing os.path.join in 1994.:eek:

    http://www.jorendorff.com/articles/python/path/
     
  12. Dec 8, 2007 #1292 of 5683
    PaulS

    PaulS Member

    674
    1
    Sep 16, 2002
    Southern NH
    Wow. That path module sounds really slick. To be tired of doing something in Python way back in 1994 is funny...

    If d498 is truly the last fully functional version, then it should be relatively straight forward to determine what's busted in the later versions.

    Even between d4981 and e0d98, I see some significant changes. In container.tmpl, some pathing has changed ($file.path-> $file.name), and it seems to want to deal with files rather than dirs... although this might not be too serious.

    What's more interesting to me, and IMHO likely to be involved in the problem of "no info" for the individual video files, are the changes in video.py video_file_filter(). The full_path is being derived in a completely different manner, and makes an assumption that a full_path is being passed via the "file" parameter. Perhaps this assumption was not followed elsewhere in the code...
     
  13. Dec 9, 2007 #1293 of 5683
    MasterCephus

    MasterCephus New Member

    309
    0
    Jan 2, 2005
    Hueytown,...
    Just by looking, I don't see some shows...such as Stargate: SG1. How did you get this list?
     
  14. Dec 9, 2007 #1294 of 5683
    MasterCephus

    MasterCephus New Member

    309
    0
    Jan 2, 2005
    Hueytown,...
    After being away for a week because of business, it really seems obvious that pyTivo needs it's own forum. I realize that this probably wouldn't fall under the TivoCommunity forums, but there needs to be a forum completely devoted to just pyTivo

    You could have:

    pyTivo help
    Development
    feature requests
    general discussion

    probably a few more just to name a few...

    You could probably just buy the domain name pyTivo.com and then create the forum, move the wiki, and put the download through something like sourceforge with a link from the site.

    I think this little handy application is becoming big enough in the community to merit this...
     
  15. Dec 9, 2007 #1295 of 5683
    PaulS

    PaulS Member

    674
    1
    Sep 16, 2002
    Southern NH
    After those initial lists of SeriesID's were posted by everyone, I did some initial queries into zap2it, and saw that there was a direct relation between TiVo SeriesID's and a portion of the URLs that resulted from those web queries.

    Example :
    Dexter
    TiVo SeriesID : SH859795
    Zap2it URL : http : //tvlistings.zap2it.com/tvlistings/ZCSC.do?t=Dexter&pgmId=EP008597950025

    So, the URL breaks down into EP00 + SeriesID + 4digits.

    This worked out for quite a few manual checks that I made. So, I set up a web crawler to traverse the one million queries that fall into that six digit number space. Those remaining 4 digits appeared to be the episode number for that series, so I initially ignored them and used a value of "0001" for the queries. It took a week to complete. This resulted in my (initial) lists that I posted here.

    Now, as you've illustrated, it looks like it's incomplete.

    I'd rather not have to include those extra four digits in another crawl, since it would take 10,000 weeks, and I don't feel like waiting that long. :)

    Any ideas ?
     
  16. Dec 9, 2007 #1296 of 5683
    ghasty

    ghasty New Member

    7
    0
    Dec 28, 2004
    Bingo....thanx

     
  17. Dec 9, 2007 #1297 of 5683
    dlfl

    dlfl Cranky old novice

    6,996
    17
    Jul 6, 2006
    Near...
    Well wgw and I have spent some hours trying to uncover the problem by focussing on the revision differences you mention... with no results (although your logic is correct of course).

    Today I downloaded WireShark (just Google, the artist formerly known as Ethereal), and started looking at the TCP packets passing between Tivo and pyTivo, comparing them for d498 (good) and 9978 (bad). And I've definitely caught 9978 in the act!

    I have a share with just two videos and a subfolder on it. I captured packets for two sequences (1) initially selecting the share and (2) selecting a video in the share.

    I saw no suspicious differences for the first sequence but that was not true for the second one: When the video is selected, the Tivo requests a TivoContainer xml response from pyTivo. Then it requests a TVBus response which contains most of the details, including metadata, for the selected file. This works OK for d498 but for 9978 the TivoContainer returned by pyTivo is:

    Code:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <TiVoContainer>
        <ItemStart>-1</ItemStart>
        <ItemCount>0</ItemCount>
        <Details>
            <Title>USB-DivX</Title>
            <ContentType>x-container/tivo-videos</ContentType>
            <SourceFormat>x-container/folder</SourceFormat>
            <TotalItems>3</TotalItems>
        </Details>
    </TiVoContainer>
    
    Note the ItemCount is 0. The TVBus response is requested by the Tivo but 9978 doesn't send one, which is probably just because it thinks there are no items to send. [Edit: Correction: The Tivo never requests the TVBus xml, undoubtedly because 9978 told it the item count was zero!]

    I'm hoping this will narrow down the code search -- why is the item count being set to zero? Note that total items is correct (3). Is the ItemStart value of -1 correct?

    P.S. WireShark rocks! Very intuitive and yet refined interface!
     
  18. Dec 9, 2007 #1298 of 5683
    armooo

    armooo pyTivo Developer

    81
    0
    Feb 1, 2003
    I would take a look at the AnchorItem being sent by the tivo on the second request. Adding "print file_url, '==', anchor" on line 133 of plugin.py may also spot the problem.
     
  19. Dec 9, 2007 #1299 of 5683
    dlfl

    dlfl Cranky old novice

    6,996
    17
    Jul 6, 2006
    Near...
    We crossfired! Note my edit: the TiVo never requests the TVBus xml because it was told the item count was zero (I think).
     
  20. Dec 9, 2007 #1300 of 5683
    dlfl

    dlfl Cranky old novice

    6,996
    17
    Jul 6, 2006
    Near...
    I compared the TiVo GET requests for the TivoContainer when the video is selected -- identical for the two pyTivo versions.
     

Share This Page