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

    moyekj Well-Known Member

    11,150
    33
    Jan 23, 2006
    Mission...
    For Tivo purposes you can preserve ac3 5.1 audio as is and transcode to h.264 video. However be warned that since ac3 audio in mp4 container has only recently been ratified some players can't handle that yet. For example Quicktime and Windows Media Player won't play mp4 with ac3 audio but recent versions of VLC do. So if you are targeting other means to play back those files other than Tivo you should check whatever players you plan to use to see if they can handle it. If you use 6 channel aac audio instead that would make it compatible with most players but not sure how Tivo outputs 6 channel aac as far as surround sound goes.
     
  2. moyekj

    moyekj Well-Known Member

    11,150
    33
    Jan 23, 2006
    Mission...
    Don't know much about Matroska container but probably is very different than mp4 container so doesn't have the same restriction. For mp4 depending on encoder you use it may not be necessary either. If you use ffmpeg to encode to mp4 container then qt-faststart is still necessary (ffmpeg ships with qt-faststart utility).
     
  3. westside_guy

    westside_guy Annoyingly ephemeral

    464
    1
    Mar 13, 2005
    The soggy...
    This is great! Thank you very much for making those changes, and for doing it so quickly to boot!
     
  4. moyekj

    moyekj Well-Known Member

    11,150
    33
    Jan 23, 2006
    Mission...
    Can you post the details of a sample .mkv file that works with native push? I wasn't able to get a .mkv container with h.264 video & ac3 audio to push natively to Tivo (and it won't stream to Tivo natively either).
     
  5. BobAd

    BobAd New Member

    2
    0
    Feb 24, 2009
    My experiences with mp4 push.

    Videos were recoded into Digital AVC format, Main Profile. Max ref frames = 1, Max keyframes = 300, Max b frames = 3, CABAC and Weighted Prediction enabled.

    Video Results: Choppy video motion at both 480p and 720p recodes. Files below approx. 1gb (around 1Mbs) showed lack of detail on 60" screen, and choppiness on high motion scenes. Files of approx. 2Gb size (around 3Mbs) had better detail but exhibited more choppiness on even slow motion playback. There were no observed problems on computer playback (24" monitor, WMP).

    Audio Results: Files were transcoded into 5.1 AAC ( confirmed through examination of file properties on computer). However, my receiver indicated that only 2 channel was being passed from S3.

    High Profile transcodes would not push.
     
  6. wmcbrine

    wmcbrine Ziphead

    10,368
    22
    Aug 2, 2003
    Mine look great so far.

    You don't say what encoder you're using.

    I think you have to use AC3 for 5.1 to work on the TiVo.
     
  7. wmcbrine

    wmcbrine Ziphead

    10,368
    22
    Aug 2, 2003
    Integrated qt-faststart into my pyTivo fork with a patch from Keary.
     
  8. euckersw

    euckersw New Member

    23
    0
    Jan 30, 2004
    Looks like we're having varying success (or limited success, for that matter) with pushing native .mkv files. Anybody else have any luck?
     
  9. BobAd

    BobAd New Member

    2
    0
    Feb 24, 2009
    Used NERO Recode (from version 8)- Could you be so kind as to share your encoder process/settings to allow me a little more success?

    THANKS!
     
  10. moyekj

    moyekj Well-Known Member

    11,150
    33
    Jan 23, 2006
    Mission...
    FYI looks to me like qt-faststart only works for mp4 container. I haven't yet found another container that works (I tried mkv and transport stream) so may not be a big deal, but probably the code could use a patch to restrict qt-faststart run for mp4 container type only just in case.
     
  11. moyekj

    moyekj Well-Known Member

    11,150
    33
    Jan 23, 2006
    Mission...
    Try ffmpeg with something like:
    ffmpeg -y -i INPUT_FILE -vcodec libx264 -coder 0 -level 41 -sameq -g 300 -bufsize 14745k -b 5000k -maxrate 16000k -bug "+autodetect+ms" -me epzs -trellis 2 -mbd 1 -acodec copy -f mp4 OUTPUT_FILE
    (You can adjust the bit rate to suit your size vs quality tradeoff with -b argument)

    P.S. If you are looking for maximum quality then a multi-pass encode would probably be necessary. Nice thing about ffmpeg is you can google for recipes all over the place.
     
  12. kearygriffin

    kearygriffin New Member

    346
    0
    Jan 31, 2008
    The qt-faststart code is only run when the mime type is video/mp4 and the video has already been determined to be TiVo compatible. This should only occur when it is an mp4 container. (Because video/mp4 mime type implies an MP4 container).

    Currently (as wmcbrine mentioned in an earlier post) only the codec is checked for h264, not the container, so more video is being marked as "no transcode needed" and marked with video/mp4, which will end up triggering the qt-faststart. Once we determine exactly what formats the TiVo supports as untranscoded (which I think is probably just mpeg-ps & mp4) and this is changed (at a higher level than the qt-faststart code) I think the issue you are mentioning will go away.
     
  13. burnside

    burnside New Member

    42
    0
    Jan 12, 2009
    So Keary, does this mean that if our mp4s contain h264 then we should be fine?
     
  14. moyekj

    moyekj Well-Known Member

    11,150
    33
    Jan 23, 2006
    Mission...
    The current check is mp4 should contain h.264 video and aac or ac3 audio. With latest wmcbrine code now you no longer have to worry about potentially having to run qt-faststart on your mp4 since pyTivo will do it if necessary.
     
  15. kearygriffin

    kearygriffin New Member

    346
    0
    Jan 31, 2008
    I'm sure there are always going to be "exceptions", but an MP4 that has the following characteristics should work.

    1. h264 video, high profile level 4.1 or below
    2. AAC or AC3 audio3
    3. Possibly needs to be well "interleaved"

    The last one is the hardest to define, but it basically means that the audio and video within the file are interleaved correctly. This means that audio sample for a particular frame is somewhere "near" the video sample for that frame. (I don't know what the TiVo's definition of "near" is going to be...) The TiVo has problems streaming poorly interleaved files, I don't know how well it will do with downloading poorly interleaved files.

    I noticed someone mentioned "choppy" video earlier, and for MP4 streaming to the TiVo this is sometimes caused by poorly interleaved files.
     
  16. moyekj

    moyekj Well-Known Member

    11,150
    33
    Jan 23, 2006
    Mission...
    Just to add to what Keary said, I haven't actually tried it but it's likely MP2 & MP3 audio would probably also work in addition to AAC and AC3 audio formats.
     
  17. berkshires

    berkshires New Member

    463
    0
    Feb 22, 2007
    This sounds like a fascinating topic all to itself. Would love to learn more.
     
  18. burnside

    burnside New Member

    42
    0
    Jan 12, 2009
    Thanks for explaining all this to me. Never knew about interleaved either! Totally new to me.
     
  19. tchescat2000

    tchescat2000 New Member

    5
    0
    Jul 5, 2002
    I have mkv files that are 1080p using DTS as audio. I know that the mkv is still up in the air for passthru, but how about the DTS audio? Is AC3 the only supported passthru audio type?
     
  20. euckersw

    euckersw New Member

    23
    0
    Jan 30, 2004
    I have had success with 3 of 4 mkv files I have pushed using pyTivo, so while I'm still unsure as to why the 4th file did not work, I think the passthrough process is working (in general) for mkv files. You bring up a good question on the DTS audio. I have a file that I pushed via pyTivo this morning, which was originally a mkv file with DTS, however when I play the file my stereo shows Dolby Digital 5.1. However, when I stream the same file using my PS3, my stereo shows DTS. Any idea on what's happening to the DTS?
     

Share This Page