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

mp4 transcoding appears to be eliminated

Discussion in 'TiVo Home Media Features & TiVoToGo' started by larry99, Feb 18, 2009.

  1. Feb 21, 2009 #61 of 297
    moyekj

    moyekj Well-Known Member

    11,130
    27
    Jan 23, 2006
    Mission...
    I can confirm that mp4 container with h.264 video + ac3 audio works fine as well as long as you use pyTivo as the video server. Tivo Desktop doesn't allow it probably because the codecs it's using don't support it.

    Dan, one can use ffmpeg to generate such a video so handbrake is not the only option. The key is the moov atom must be at front of file for it to work, so if that's not the case then you can run qt-faststart on the file.

    And yes unfortunately the pushes still make the mp4 files on the Tivo copy protected so you can't transfer off the Tivos.
     
  2. Feb 21, 2009 #62 of 297
    moyekj

    moyekj Well-Known Member

    11,130
    27
    Jan 23, 2006
    Mission...
    So for others who may want to try this out but aren't clear on the details here's a condensed summary of changes to get it going for now (until pyTivo developers have a chance to properly integrate changes to support native mp4 pushes)
    NOTE: Keep backup copies of all the files since these changes will break pyTivo for mpeg2 transfers. I would recommend installing a new pyTivo installation in a separate location and then make these changes.

    pyTivo file changes:
    1/ mind.py
    - Change 'mpeg2ProgramStream' to 'avcL41MP4' in both places in the file

    2/ plugins/video/video.py (send_file procedure):
    change Content-Type from 'video/x-tivo-mpeg' to 'video/mp4'

    3/ plugins/video/transcode.py (tivo_compatible procedure):
    - add following after 1st vInfo line of the procedure:
    message = True, 'mp4'
    logger.debug('%s, %s' % (message, inFile))
    return message

    4/ Make sure your pyTivo.conf file has proper tivo_username & tivo_password settings (your tivo login information) in the [Server] section. Also make sure you have proper ffmpeg path set in your pyTivo.conf as that is needed to collect video information.

    5/ Put your test mp4 clips in pyTivo video share directory

    6/ Finally start pyTivo & initiate a push from browser:
    http://localhost:9032
    click on Video shares link
    select the mp4 video and Tivo to push to and click on 'Send to Tivo'
    NOTE: You should leave pyTivo running while the push process happens and it can take a few minutes to start which you'll know when the blue light appears on your Tivo.

    CHECKING TRANSFER RATE
    You can check the transfer rate of your mp4 pushes from Network Diagnostics:
    TC->Messages&Settings->Settings->Phone&Network->View Network Diagnostics->Transfer history->Video Download
    You will note that you can get quite significantly higher transfer rates for mp4 pushes compared to mpeg2 pulls & pushes. I'm getting 20+ Mbps for my mp4 pushes to my S3 compared to about 13 Mbps for mpeg2.
     
  3. Feb 21, 2009 #63 of 297
    PaulS

    PaulS Member

    674
    1
    Sep 16, 2002
    Southern NH
    Nice! Great work guys!
     
  4. Feb 21, 2009 #64 of 297
    westside_guy

    westside_guy Annoyingly ephemeral

    461
    1
    Mar 13, 2005
    The soggy...
    Personally I don't see this as a significant issue, given the circumstances.

    Thanks to all of you for the work you've done so far on this! I prefer to rip my DVDs to x.264, since the space savings is substantial and the quality drop isn't significant enough to matter to me (I could always watch the original DVD if it really mattered anyway). This way there's no additional tradeoff to using the same repository/server for streambaby and pyTivo (unless I've missed something).
     
  5. Feb 21, 2009 #65 of 297
    westside_guy

    westside_guy Annoyingly ephemeral

    461
    1
    Mar 13, 2005
    The soggy...
    Oops, never mind. Pay no attention to that man behind the curtain...
     
  6. Feb 21, 2009 #66 of 297
    ryanrk

    ryanrk New Member

    18
    0
    Oct 13, 2006
    When I click on the Video Share link all i get is an XML feed back. Nothing to click on or select or anything to push it back.
     
  7. Feb 21, 2009 #67 of 297
    moyekj

    moyekj Well-Known Member

    11,130
    27
    Jan 23, 2006
    Mission...
    That's probably stupid Internet Explorer at work. If you try a proper browser like Firefox then it works fine.
     
  8. Feb 21, 2009 #68 of 297
    wmcbrine

    wmcbrine Ziphead

    10,362
    22
    Aug 2, 2003
    Internet Explorer, right? The Push page doesn't work there -- try Firefox or some other browser (I can only vouch for Firefox). Sorry.

    K & K, exciting stuff! :D

    Keary, while you have your spy gear hooked up, there are a couple more things you might want to look at:

    1. There are, or used to be, some TiVoCasts that aren't copy prohibited. If we can find one of those, we might be able to get the info we need to turn it off on pyTivo pushes. Unfortunately the only one that I know had this was DL.TV.

    2. The HME side of Netflix and YouTube, which are also SSL'd.
     
  9. Feb 21, 2009 #69 of 297
    moyekj

    moyekj Well-Known Member

    11,130
    27
    Jan 23, 2006
    Mission...
    Perhaps Tivo/Netflix as well? Would be wonderful to figure out how to get rid of that pesky 1.1GB streaming limit
     
  10. Feb 21, 2009 #70 of 297
    ryanrk

    ryanrk New Member

    18
    0
    Oct 13, 2006
    Yet it works in Firefox.

    However the push didn't. I got this error for some reason. I can pull this file

    Code:
    ----------------------------------------
    Exception happened during processing of request from ('192.168.0.185', 51127)
    Traceback (most recent call last):
      File "/usr/lib/python2.5/SocketServer.py", line 464, in process_request_thread
        self.finish_request(request, client_address)
      File "/usr/lib/python2.5/SocketServer.py", line 254, in finish_request
        self.RequestHandlerClass(request, client_address, self)
      File "/usr/lib/python2.5/SocketServer.py", line 522, in __init__
        self.handle()
      File "/usr/lib/python2.5/BaseHTTPServer.py", line 316, in handle
        self.handle_one_request()
      File "/usr/lib/python2.5/BaseHTTPServer.py", line 310, in handle_one_request
        method()
      File "/home/ryan/pyTivo/httpserver.py", line 103, in do_GET
        method(self, query)
      File "/home/ryan/pyTivo/plugins/video/video.py", line 288, in Push
        file_info['valid'] = transcode.supported_format(file_path)
      File "/home/ryan/pyTivo/plugins/video/transcode.py", line 707, in supported_format
        if video_info(inFile)['Supported']:
      File "/home/ryan/pyTivo/plugins/video/transcode.py", line 507, in video_info
        stdin=subprocess.PIPE)
      File "/usr/lib/python2.5/subprocess.py", line 594, in __init__
        errread, errwrite)
      File "/usr/lib/python2.5/subprocess.py", line 1091, in _execute_child
        raise child_exception
    OSError: [Errno 2] No such file or directory
    ----------------------------------------
    
     
  11. Feb 21, 2009 #71 of 297
    westside_guy

    westside_guy Annoyingly ephemeral

    461
    1
    Mar 13, 2005
    The soggy...
    Doesn't work in Safari, either - surprisingly. Fortunately Firefox is cross platform.
     
  12. Feb 22, 2009 #72 of 297
    moyekj

    moyekj Well-Known Member

    11,130
    27
    Jan 23, 2006
    Mission...
    I got that same error when trying to send a wmv file (I know that's not mp4 but I was trying it anyway). I bet you if you try with a known good file such as the ones posted earlier in this thread you will find those work OK.
    (Pull works because it transcodes to mpeg2 for an unmodified pyTivo installation)
     
  13. Feb 22, 2009 #73 of 297
    westside_guy

    westside_guy Annoyingly ephemeral

    461
    1
    Mar 13, 2005
    The soggy...
    One thing that messed me up at first - despite it having been mentioned more than once in this thread - is not making sure qt-faststart had been run on the video in question. :D

    This is kinda cool!
     
  14. Feb 22, 2009 #74 of 297
    moyekj

    moyekj Well-Known Member

    11,130
    27
    Jan 23, 2006
    Mission...
    That's one advantage of Keary's streambaby - it takes care of the moov atom so you don't have to worry about qt-faststart. Actually, aside from the 1.1GB limitation streaming mp4 is better than transfers in many other respects:
    * random access anywhere in the file instantly, even beyond buffer
    * flexible jump n minutes forwards/backwards
    * closed captioning capability
    * can access your files in a flexible folder structure of your choosing
    * fancy metadata with graphics
    * easy access from any series 3 tivo
    ...

    Still, it's nice to have the option to transfer mp4 files natively as well. Would be nice if it would work with the pull method instead of just push and hopefully something Tivo should be looking into for next TD update.
    Nice to have capability in pyTivo now and ironic that it can already do better than TD (supports mp4 with ac3 audio that doesn't work in TD) - I already uninstalled the Tivo Desktop monster.
     
  15. Feb 22, 2009 #75 of 297
    westside_guy

    westside_guy Annoyingly ephemeral

    461
    1
    Mar 13, 2005
    The soggy...
    I totally agree, and it's nice to have options. Thanks to this new ability that you guys have developed, I'm thinking I'll keep using streambaby for all my TV/anime/etc. rips (which all fall well under the 1.1GB limit) but start pushing movies when I want to watch them.

    The most ideal solution IMNSHO is if, eventually, someone figures out how to take advantage of whatever way Netflix et. al. stream without being limited by the 1.1GB limit (as you mentioned earlier). But all the currently available options are already great; and speaking as someone who's basically mooching off of all the hard work you guys are doing... I'm certainly not going to complain! :D
     
  16. Feb 22, 2009 #76 of 297
    wmcbrine

    wmcbrine Ziphead

    10,362
    22
    Aug 2, 2003
    OK, I've fixed this. It was just some missing MIME types. (Imagine, Internet Explorer caring more about MIME types than Firefox -- what is the world coming to?) Tested now in IE7, Opera and Safari, as well as Firefox.
     
  17. Feb 22, 2009 #77 of 297
    westside_guy

    westside_guy Annoyingly ephemeral

    461
    1
    Mar 13, 2005
    The soggy...
    I'm beginning to think you guys who develop pyTivo, streambaby, and the like never sleep! :D Thank you very much for fixing this.

    Regarding IE and mime types - wha? IE cares about mime types now? I know in the past I've had to work around IE's lack of caring. But maybe enough exploits have come down the pipe that MS has learned... at least in some cases... :p
     
  18. Feb 22, 2009 #78 of 297
    Clusty

    Clusty New Member

    42
    0
    Jun 11, 2007
    I have the same version as you - is it a beta?
     
  19. Feb 22, 2009 #79 of 297
    moyekj

    moyekj Well-Known Member

    11,130
    27
    Jan 23, 2006
    Mission...
    This seems to happen for several valid mp4 files I have. I think the problem is that video_info procedure in transcode.py does not work properly for some mp4 videos. So looks like some more patching would be needed to make this more robust for mp4 pushes. I'm going to be out most of today so probably won't be looking into it further for a while...
     
  20. Feb 22, 2009 #80 of 297
    ryanrk

    ryanrk New Member

    18
    0
    Oct 13, 2006
    That was a good file. It was a regular mpeg2 file that I can pull using the Tivo box. I never tried the push stuff before.
     

Share This Page