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

pyTivoX

Discussion in 'TiVo Home Media Features & TiVoToGo' started by Yoav, Dec 10, 2008.

  1. Feb 19, 2009 #301 of 1437
    wmcbrine

    wmcbrine Ziphead

    10,363
    22
    Aug 2, 2003
    I do use pyTivo for pictures and music, but I don't use iTunes. (Well, not seriously -- I do have 700 megs of MP3's on my Mac, but no playlists.) And really I'm the only one who works on the music plugin. So, yeah.

    I'd think that the computer was too slow, but it's only MP3's... I have an idea, though; let me get back to you on it.

    Not odd; that one's definitely connected to the speed of the machine. Not in a completely straightforward way, though. I've written about this extensively elsewhere, but the bottom line is that I haven't been able to fix it, except by using a faster machine.

    The same #5-6 errors afflict the music plugin, although this is a separate issue from the skipping.
     
  2. Feb 19, 2009 #302 of 1437
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    I don't believe handbrake is able to output mpeg-2 files, so that's out. VLC can if you prefer a gui...

    I suspect the easiest thing to do is simply use
    Code:
    /Applications/pyTivoX.app/Contents/Resources/ffmpeg -i <input> -acodec ac3 -vcodec mpeg2video -f vob -async 1 -r 29.97 -v 0 -threads 2 -sameq -ab 384k <output>
    
    This is just stolen from streambaby's defaults for 'same quality'. You may want to drop the -r 29.97 unless you have a REALLY weird framerate in your source. That will output an mpeg-2 with ac-3 audio. I'm sure there are probably tons of 'better' solutions too...
     
  3. Feb 19, 2009 #303 of 1437
    Sevenfeet

    Sevenfeet Gentle Giant

    164
    0
    Jun 24, 2000
    Nashville, TN
    One thing a faster machine would solve is the inherit nature of how this application is designed. If its relying on python, it's going to be slower than a completely compiled application. There's just no way around that.

    One other thing I get in the pyTivoX.log file is a complaint about not finding the C version of Namemapper. Not sure if this is a standard warning or something you guys should know about.
     
  4. Feb 19, 2009 #304 of 1437
    Sevenfeet

    Sevenfeet Gentle Giant

    164
    0
    Jun 24, 2000
    Nashville, TN
    What I meant was what Mp4 method is best to transcode my MPEG2 based DVDs to something the Tivo will like without further processing? An MP4 + AC3 solution would be ideal.
     
  5. Feb 19, 2009 #305 of 1437
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    That is normal. (I get the warning too... I assume cheetah is not required, so I didn't bother getting and compiling it on every installation... I'm happy to be told otherwise and I'll install it with pyTivoX).
     
  6. Feb 19, 2009 #306 of 1437
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    Ahh.
    As of right now, pyTivo will transcode all mp4s to mpeg-2s (there is some talk of new support for mp4 downloads, but this is all very prelim).

    streambaby *will* stream mp4's, although there are some limitations. I unfortunately don't know the 'full list' of limitations (I think people are still figuring them out in fact), I would ask that in the streambaby thread. Personally I'd stick to 'safe' settings (no b-frames, no cabac, h.264 level 4 or lower, etc). It's definitely worth trying it with a file or two and see what happens.

    That said, I'm curious why you'd rather convert them to mp4s? high-bitrate mpeg-2 will look just as good as high bitrate mpeg-4, and will be a LOT faster to encode (I'd guess an HD movie on your computer will take several days to encode as an mpeg-4 -- unless you reduce the resolution). The advantages of mpeg-4 show up at lower bitrates, which I assume you're not planning on using if this is for movie viewing on a good TV.
     
  7. Feb 19, 2009 #307 of 1437
    kearygriffin

    kearygriffin New Member

    346
    0
    Jan 31, 2008
    I think the big advantage of MP4's is transfer speed and bitrate. Mp4's get (something like) twice the quality at half the bitrate. So a 4000kbs mp4 has the same quality as an 8000kbs mpeg2. (I'm not sure it's really twice, but it is very significant)

    Combine that with the fact that the TiVo is able to receive MP4's much quicker than mpeg2 (mpeg2 bandwidth is restricted by TiVo processing) you end up being able to stream in realtime much higher quality videos via MP4 than you can with mpeg.

    (So TiVo can probably handle streaming hi-def MP4 files pretty well, but won't be able to handle streaming hi-def mpeg2 files)
     
  8. Feb 19, 2009 #308 of 1437
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    fwiw, mpeg-2 outperforms mp4 (avc) at high bitrates. i.e. 20 mbps mpeg-2 video looks better than 20mbps mpeg-4. It's at low bitrates that mpeg-4 looks significantly better than mpeg-2. From what little I understand of avc, at anything over 10mbps, the quality returns diminish, whereas for mpeg-2, that only happens at around 40mbps. I suspect that at around the 5mbps mark both formats look about the same to most viewers, and then when you go lower (like 2mbps, which is what I tend to use for my movies) mpeg-4 clearly wins.

    However, if mp4 files can be streamed to the tivo at a faster rate, then it's a definite win. I was mostly concerned for the fact that encoding mp4 is extremely CPU-intensive, and the OP was complaining about slow performance on his computer....
     
  9. Feb 19, 2009 #309 of 1437
    TadK

    TadK New Member

    19
    0
    Oct 19, 2007
    Just a quick update- all seems to be working well following the port and beacon change. The restart did help as well. I want to thank you for your attention and dedication to the project. I look forward to exploring it and wanted to thank you for you attention to my issue and all those others who wrote looking for help. Your passion is clear and you've made my experience thus far amazing. I thank you.:up:
    Tad
    Port Richey, FL
     
  10. Feb 20, 2009 #310 of 1437
    Sevenfeet

    Sevenfeet Gentle Giant

    164
    0
    Jun 24, 2000
    Nashville, TN
    I keep forgetting that I need to refer to pyTivoX and Streambaby seperately for the sake of clarity. First, I keep forgetting that pyTivoX will convert MP4s on the fly to MPEG2s if you're just doing a transfer. That by itself is pretty neat but I don't really use that feature much, Streaming on the other hand (i.e. Streambaby) is better to hand it pre-encoded MP4s that the Tivo can swallow whole (and you get to make HD versions if you like versus MPEG2s). My dream is to be able to convert most of my DVDs that are in rotation for my kids to MP4s that any of us (or babysitters) could fire up without getting a physical disc out (i.e. Handbrake). The Tivo has access to my ripped DVDs as well which play just fine...one vob file at a time. Not exactly user friendly!

    BTW, I don't use my elderly server for Handbrake encoding. (that would be torture) I use either an Intel iMac that I have or my wife's MacBook Pro. The problem is that up until now, I haven't found an encoding scheme I've liked enough to dedicate enough encoding time to do a large number of movies. I'll have to revisit the Streambaby thread.
     
  11. Feb 20, 2009 #311 of 1437
    wmcbrine

    wmcbrine Ziphead

    10,363
    22
    Aug 2, 2003
    I remembered reports from Mac users that the Python process (and not just ffmpeg) was taking up an inordinate amount of CPU when transcoding video, and that this had been fixed by adding a buffer to the subprocess setup. (Only the Mac was affected, oddly.) But this hadn't been done for the music plugin. So I did, and it makes a big difference. I can't guarantee it will eliminate the skips (I didn't have any to begin with on my G4 Mini), but it does cut the CPU usage significantly. The change is in my repo now.
     
  12. Feb 20, 2009 #312 of 1437
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    Ok, just uploaded beta 21. This has the new wmcbrine pyTivo. Try it out and see if it helps out with your music?

    (also, I don't really know what the difference is between wgw's and wmcbrine's, so if anything new breaks, tell me and we can try and fix it).
     
  13. Feb 20, 2009 #313 of 1437
    pmd

    pmd New Member

    32
    0
    Dec 14, 2004
    Yes, that transcode works successfully. The .mpg file produced plays fine in VLC on the Mac, but when it's streamed to the Tivo via pyTivoX the audio sounds too high-pitched (chipmunk effect) - the video is fine. I'm not sure if it's getting transcoded again.
     
  14. Feb 20, 2009 #314 of 1437
    matelot

    matelot New Member

    12
    0
    Feb 6, 2009
    Thanks for the response. I'll look into it.
     
  15. Feb 20, 2009 #315 of 1437
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    Download the latest beta, and hit 'apply' to take the new changes.
    Really the problem seems to stem from the fact that your source audio is very low-frequency-ranged, and I guess ffmpeg is refusing to convert it to a high-bitrate ac-3. The new code will default to a combined 192kbps across all channels, and hopefully that will work for you.

    As for vlc, vlc can play a LOT more formats than the tivo can, and ffmpeg is doing its best to convert it to one that tivo likes, but *crap* does happen.
     
  16. Feb 20, 2009 #316 of 1437
    kearygriffin

    kearygriffin New Member

    346
    0
    Jan 31, 2008
    I've also noticed that the more recent the version of ffmpeg, the more problems it seems to have with audio transcoding. Sometimes it refuses to convert, other times the effect I get most often is a high pitched "warbling effect". I just switched back to using an older ffmpeg (the default one that comes with my Linux distro). I get the impression that the audio transcoding is under heavy development recently. (but that is just an impression)

    I wish I could be more help with which versions of ffmpeg do what/support what, but it's really just trial and error for me.
     
  17. Feb 20, 2009 #317 of 1437
    pmd

    pmd New Member

    32
    0
    Dec 14, 2004
    Closer. The TiVo plays the file, but the audio is still messed up - stuttering *and* the wrong frequency. Perhaps we should do as Keary said and wait for ffmpeg to get fixed :)

    No big deal, there are worse things in life. Thanks for the help, I appreciate your efforts. I wish I could help with this stuff (I'm a programmer) but I have a screaming baby to look after. :p Speaking of which...
     
  18. Feb 21, 2009 #318 of 1437
    wmcbrine

    wmcbrine Ziphead

    10,363
    22
    Aug 2, 2003
    From what I'm reading, it sounds like the sample rate is the issue, not the bitrate.
     
  19. Feb 21, 2009 #319 of 1437
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    my *complete and utter guess* is that the sample rate is half, and the number of channels is 1 or 2, and so the original requested target bitrate of 384 was higher than it was willing to go (it was happy but distorted at 278 or whatnot, but it errored out with invalid bitrate at 384).

    Either way, I'm taking it back to 384 on the next release, since lowering it didn't fix anything -- and I suspect people with 5.1 audio want to still have it sound 'good'.
     
  20. Feb 21, 2009 #320 of 1437
    pmd

    pmd New Member

    32
    0
    Dec 14, 2004
    You're right. I added -ar 48000 to the ffmpegexe.transcode in streambaby.ini and the audio plays fine on Tivo now. Would we want that setting for all transcodes, or should it be used only when the input audio is at an odd rate like 24000 like in this case?

    Now the audio isn't distracting me, I can see that the frame rate is probably half what it should be. I'll investigate.
     

Share This Page