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. TheAmigo

    TheAmigo New Member

    13
    0
    Dec 28, 2001
    Glendale...
    Before there was kmttg, I wrote my own similar tool (using Net::TiVo and tivodecode). Since the tivo often reports incorrect file sizes, I needed a better way to tell if I had downloaded the entire show. Instead, I query the tivo for the duration of the show and then run ffmpeg -i on the downloaded .tivo file (before running tivodecode) to make sure it's complete. While the encrypted video stream may not be playable, the MPEG headers are not encrypted and most tools can query the file just fine.

    Do you have some shows that give you .tivo files that ffmpeg doesn't like?
     
  2. wmcbrine

    wmcbrine Ziphead

    10,369
    22
    Aug 2, 2003
    I never even thought to try it. I see that it works. Huh.

    OK, expect some revision in pyTivo's handling of .TiVo files soon...
     
  3. Gavroche

    Gavroche New Member

    398
    0
    May 26, 2007
    State of...
    I could also re-encode the files, but that's not the point. The point is why is it ONLY my 649 series Tivo that doesn't play these corectly? Every other player I have, including my series 540 tivo, plays it fine. It's only on my S2DT that it doesn't play correctly. PyTivo picks the wrong aspect ratio. For my S2ST it picks the correct aspect ratio.

    Why?
     
  4. wmcbrine

    wmcbrine Ziphead

    10,369
    22
    Aug 2, 2003
    OK, I just took most of the special casing for ".TiVo" out. Duration is shown now, as well as the "HD" flag. Let me know if this causes problems for anyone -- maybe with older versions of ffmpeg?
     
  5. Shanezam203

    Shanezam203 New Member

    787
    0
    Jul 27, 2007
    I downloaded PyTivo but am not able to get it to run.

    I am looking to do 2 things.

    1. Create folders on my Tivo + 1tb HD.
    2. Transfer movies over from my PC or DVD into my My Tivo Recordings video and play on Tivo.

    Thank you,
    Shane
     
  6. wmcbrine

    wmcbrine Ziphead

    10,369
    22
    Aug 2, 2003
    So, what problems do you have? Post them here, or on pytivo.krkeegan.com. Please don't solicit private help unless there's a good reason to keep it private. Others can learn from your experiences... and the people that help you won't have to repeat themselves as much.

    Gavroche: In fact, it's not displayed correctly on the 540, either. The PAR and DAR are ignored, the raw aspect ratio of ~1.5:1 (608:404) is used, and the video is padded with small (28-pixel) letterbox bars to reach 4:3 (~1.33:1). You might lose the bars in overscan. The behavior on the 649 is worse, I agree. (I don't have a 649, but I simulated it.) But the surprising thing is that it comes out apparently correct on the S3.

    The 649 is treated differently from other S2's because it can supposedly handle 16:9 video natively, letterboxing it if needed. But what pyTivo is doing here is just messed up. I'll see what I can do.
     
  7. Gavroche

    Gavroche New Member

    398
    0
    May 26, 2007
    State of...
    Yeah, what you say is all true of course. It does letterbox on the 540 it's just a very small amount and I can't even see it due to over-scan, as you suggest. But, it doesn't DISTORT the image (at least not perceptibly). This is what I'm getting at. It does play "correctly" (perhaps not technically but to my eyes) for the way the video is encoded. It does not, on the 649. It distorts the video terribly as you rightly surmise with your simulator.

    And you are correct in that it also plays just fine on my S3. In fact, this is why I never noticed the issue before (and didn't realize I was forgetting to check the "square pixel" box when encoding). I mostly watch on my S3, but have been doing more viewing on my S2 lately.

    I have to admit I'm not using your fork. I used yours originally, but then went to a different one to be able to use a modified version of ffmpeg that has the right-center channel swapping problem fixed. I'm guessing this is fixed in your current version as well?

    By the way, thanks for all your help with this.
     
  8. Shanezam203

    Shanezam203 New Member

    787
    0
    Jul 27, 2007
    Thank you for the help. All I have done was downloaded the Zip for Python26 & then phTiVo.

    That is as far as I got. I can find the folder in my C: but then am not sure what to do after that.

    Thank you.
     
  9. reneg

    reneg Member

    699
    0
    Jun 19, 2002
    What pyTivo did you download? If you downloaded a git zip file, it does not contain ffmpeg which is needed.
     
  10. tbear334

    tbear334 New Member

    11
    0
    Sep 12, 2007
    First, let me apologize if this has been answered before, but I did search the thread and did not find anything. Can pytivo have passwords set up for specific directories similar to what StreamBaby can do? I have a couple of directories of content not suitable for the children in the house. Thanks for great software.
     
  11. Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    I believe that's not technically possible to do. since pyTivo uses HMO to communicate, and the tivo doesn't support a password for access via HMO, then that won't work.

    HOWEVER. You can set a rating for all movies in the directory you don't want kids to access (check out the pytivo metadata information). Set all that to something like NC-17, and then require a password on the tivo to view anything rated NC-17 or above. The downside is that even shows on TV that are rated NC-17 will now require a password. You can even control ratings on a per-file basis.
     
  12. wmcbrine

    wmcbrine Ziphead

    10,369
    22
    Aug 2, 2003
    Another thing you can do with pyTivo is restrict which shares are shown to which TiVos, if that helps.
     
  13. Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    So, while working on an issue with pyTivoX, it occurred to me:

    Any reason *NOT* to turn on the debug flag with pytivox? I was looking at the amount of logging it does and it doesn't seem 'insane'. It also feels like it's useful to help debug problems. Can you think of any issues with defaulting to 'debug=true' in the config file I write out?
     
  14. wmcbrine

    wmcbrine Ziphead

    10,369
    22
    Aug 2, 2003
    Go for it. Of course you could also let it be toggled in the UI...
     
  15. Gavroche

    Gavroche New Member

    398
    0
    May 26, 2007
    State of...
    I run PyTivo AND Galleon. The only reason I still use Galleon is because the mp3 player is exceptionally nice, being that it displays the embedded album art from mp3's.

    Are there any plans to add this feature to PyTivo?
     
  16. wmcbrine

    wmcbrine Ziphead

    10,369
    22
    Aug 2, 2003
    It's not really up to us. pyTivo uses the HMO player, which is built into the TiVo. It only asks for certain pieces of information, and album art is not among them. Galleon is HME-based, which means that it controls the screen layout itself.

    Album art is documented in the HMO spec as a potential future expansion, but I doubt that TiVo will ever implement it.
     
  17. Gavroche

    Gavroche New Member

    398
    0
    May 26, 2007
    State of...
    Bah, Galleon it is then.

    Thanks for the explanation, though!

    (Why Tivo would not implement this rather obvious and simple feature in HMO is beyond me, though.)
     
  18. wmcbrine

    wmcbrine Ziphead

    10,369
    22
    Aug 2, 2003
    So, I finally had a chance to try TiVo Desktop again and see what it said. Here's an example response to "QueryItem":

    Code:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <TiVoItem>
      <Item>
        <Details>
          <Title>03 - Im Good Im Gone</Title>
          <ContentType>audio/*</ContentType>
          <SourceFormat>audio/mpeg</SourceFormat>
          <SourceBitRate>256000</SourceBitRate>
          <SourceSampleRate>44100</SourceSampleRate>
          <MusicGenre>Alternative Rock</MusicGenre>
          <ArtistName>Lykke Li</ArtistName>
          <AlbumTitle>Youth Novels</AlbumTitle>
          <Duration>190368</Duration>
          <AlbumYear>2008</AlbumYear>
          <SongTitle>I&apos;m Good, I&apos;m Gone</SongTitle>
          <FileName>03 - Im Good Im Gone.mp3</FileName>
          <CreationDate>0x49E6D309</CreationDate>
          <LastAccessDate>0x49E6D30A</LastAccessDate>
          <LastChangeDate>0x49E6D309</LastChangeDate>
          <SourceSize>6091784</SourceSize>
        </Details>
      </Item>
    </TiVoItem>
    
    I think this is pretty much identical to a QueryContainer request with optimal details, but I haven't verified that yet.

    "FlushServer" returns absolutely nothing at all, except 200 OK. So I've implemented that already. :)
     
  19. dig_duggler

    dig_duggler losing enthusiasm

    835
    0
    Sep 18, 2002
    Birmingham, AL
  20. Rdian06

    Rdian06 New Member

    463
    0
    Apr 12, 2008
    The 5.1 channel swapping problem is ffmpeg's fault, not pyTivo's. It's fixed in the current Windows installer by including a version of ffmpeg compiled from code I hacked to change the Dolby Digital decoder/encoder output/input ordering.

    If you're comfortable setting up pyTivo manually, then you should use wmcbrine's fork as it is the most up to date code. You can just grab my ffmpeg compile from here to fix the channel swapping:

    http://pytivo.krkeegan.com/post3557.html#3557

    The most recent Windows installer is based on wmcbrine's fork, though I choose a particularly bad time to snapshot his code and there are some bugs which he's since fixed. I'm just a little too overwhelmed with work right now to update the installer.
     

Share This Page