# Handbrake and Tivo



## dforemsky

Two questions about using Handbrake for Windows to rip DVDs for viewing on Tivo:

1. Which preset do you use for ripping DVDs for viewing on Tivo? I would like to find a preset that works both for Tivo and an iPod nano (3rd gen - the "chubby" one). File size is not an issue.

2. In the past, I used the iPod High Rez preset which seems to have been deprecated in the latest release. I still use it, but occasionally get rips that do not work with Tivo - the filename shows up on my Tivo, but has the red slash next to the name. This does not happen with all or even most of the files, but the only way to tell when it happens is to look at the list of files from a Tivo. Generally if I rerip the episode (with the exact same settings), the file will then be fine. Any thoughts on why this is happening?

thanks!


----------



## Yoav

dforemsky said:


> Two questions about using Handbrake for Windows to rip DVDs for viewing on Tivo:
> 
> 1. Which preset do you use for ripping DVDs for viewing on Tivo? I would like to find a preset that works both for Tivo and an iPod nano (3rd gen - the "chubby" one). File size is not an issue.
> 
> 2. In the past, I used the iPod High Rez preset which seems to have been deprecated in the latest release. I still use it, but occasionally get rips that do not work with Tivo - the filename shows up on my Tivo, but has the red slash next to the name. This does not happen with all or even most of the files, but the only way to tell when it happens is to look at the list of files from a Tivo. Generally if I rerip the episode (with the exact same settings), the file will then be fine. Any thoughts on why this is happening?
> 
> thanks!


There is a 'Quicktime Universal' setting that is supposed to work for iphone, appleTV, and whatnot. And there is an 'iPod' setting that's just aimed for iPods.

File size isn't the problem. The problem is that ipods only accept files that are up to a very low resolution, and tivo (S3/HD) will accept anything up to full HD. So you can either make a file that works on both (very low resolution) or make a file that works on the HD but that needs to be re-encded to work on the ipod...

Depending on how you get the file to the tivo, it's not clear that you can use mp4 encodes anyways (the ipods need an mp4 containers, and I thought the tivo only accepts mpeg-2 containers).


----------



## jlb

For ripping my own DVDs and watching on the TiVo, I just use DVDShrink to "reauthor" as "movie only". Then I rename the VOB file to MPG. Sometimes, to help with possible minor A/V sync issues, rather than rename the file, I run the VOB through the "Quickstream Fix" function in Video Redo. Then I either copy the file to the TiVo or, if sending a bunch of files back, I use TD+ to push a folder of files over.

For putting movies onto my daughter's Nano, I use the iPod low-res setting in handbrake.


----------



## westside_guy

It might be helpful if you'd tell us how you get the file to your Tivo - Tivo Desktop, pyTivo, streambaby/tivostream, ...?


----------



## dforemsky

Right now, I'm using Tivo Desktop Plus. 

Thanks for the replies so far!


----------



## westside_guy

I don't know if you'd consider this a "solution" or not - but the most recent versions of handbrake do have a way to set up a queue for encoding. It's simple, you just hit "Add to queue" instead of "Start" (then you do hit "Start" when you're ready for Handbrake to begin encoding). So you could set up the iPod encode, hit "add to queue", then set up the Tivo encode, hit "add to queue" and then hit "start".

It's two encodes so it takes longer - but it's about as easy as setting up the single encode.


----------



## Yoav

dforemsky said:


> Right now, I'm using Tivo Desktop Plus.
> 
> Thanks for the replies so far!


Ok, well tivo desktop plus will gladly re-encode the file for you so that the tivo can play it (for many types of input files). Similarly, iTunes will gladly re-encode the file so that your ipod can play it. So you *could* make one common file and then wait a LONG time for it to be re-converted to work on your iPod and on your tivo.

So the only real problem now is that ipods will not accept an mp4 with resolutions higher than 320x240 (I don't know if gen 3 ipods are even more stringent?).

So, you can encode to that (apple/ipod in handbrake), and it will play on your ipod, on the tivo, and anywhere else. Unfortunately, it will look like crap.

The alternative, rip it to a higher quality mp4, and let iTunes and tivodesktopplus do their conversions on the fly... Try it and see if that delay is acceptable? Use a setting like Apple/Universal or Apple/Quicktime (the latter will be higher quality, but I'm not 100% if iTunes will correctly convert that to use on the ipod).

* note: * Make sure you have the latest version of handbrake. A LOT of changes went in...


----------



## txporter

Yoav said:


> The alternative, rip it to a higher quality mp4, and let iTunes and tivodesktopplus do their conversions on the fly... Try it and see if that delay is acceptable? Use a setting like Apple/Universal or Apple/Quicktime (the latter will be higher quality, but I'm not 100% if iTunes will correctly convert that to use on the ipod).


This will work, but will result in two un-needed transcodes for the Tivo file which will result in quality loss. I think your best bet is to follow what jlb wrote above and rip the files to your HDD. Use one program to merge all of the VOB files into a single mpg (DVDshrink re-author, VideoRedo, VOB2MPG, etc etc). This can be done without a need for a transcode and therefore no quality loss.

Then using those same ripped VOB files, use Handbrake to convert to mp4 for ipod.

Jason


----------



## Ladd Morse

Are there Mac programs that will combine multiple VOBs into a single VOB?


----------



## Voluptua

I once got Handbrake to encode a file that my Tivo S3 was able to play. Ever since then, I haven't been successful. I wish I had saved the successful rip into a preset. 

I run Handbrake 0.9.3 on a Mac, and am attempting to encode .m4v (unprotected) files. 

Any hints?


----------



## westside_guy

Voluptua said:


> I once got Handbrake to encode a file that my Tivo S3 was able to play. Ever since then, I haven't been successful. I wish I had saved the successful rip into a preset.
> 
> I run Handbrake 0.9.3 on a Mac, and am attempting to encode .m4v (unprotected) files.
> 
> Any hints?


Try the AppleTV preset.

The streambaby wiki has a list of the video stream types that S3 Tivos understand, so you should be able to use that as a guideline too.


----------



## StanSimmons

For my TiVoHD, the following example works well for the HandBrake CLI:


Code:


HandBrakeCLI.exe -i "C:\AnyDVD RIP\My_DVD\VIDEO_TS" -t 1 -c 1-13 -o "C:\My DVD.mp4" -f mp4 -O  -p  -e x264 -b 1500 -2  -T  -a 1 -E faac -B 160 -R 0 -6 dpl2 -D 1 -s 4 -F  --markers="C:\Temp\VIDEO_TS-1-chapters.csv" -x ref=2:bframes=2:me=umh -v

For the HandBrake GUI, use AnyDVD to fix any glitches and RIP the DVD to a local hard drive. Then point the HandBrake "source" to that directory. Choose your destination directory and filename, then set the format to MP4 and check "Web optimized".

Set Crop to Automatic and Size I leave the same as source, setting Anamorphic to Strict.

Set the Video Codec to H.264 with a Avg bitrate of 1500, with 2-pass Encoding.

Set the Audio to AAC and Subtitles to English, Forced Subtitles only.

That will create a MP4 video that the TiVoHD can use. I use PyTivo to push the videos to my TiVoHD. I don't like all the extra processes that TiVo Desktop leaves running on my PC.


----------



## jcthorne

That sequence works great for SD video but for 720p it fails on the Tivo. Tivo still has a bug with non-full frame 720p video streams. IE it will not correctly play a video of resolution 1280x528, it must be encoded to 1280x720 to display correctly.

Also, if you want 5.1 audio, you must use ac3 audio in the file, not aac.

As yet, handbrake is unable to build a file with all these requirements. I switched to MeGUI and accomplish it as a multi step process. Sure would be great if handbrake was able and a proper template developed for Tivo HD. Heck if ANY software could do it in a single pass.


----------



## StanSimmons

The OP was asking about ripping DVD's... I have yet to see a 720p DVD. (BluRay is not DVD)


----------



## dbtom

I rip movies to the xbox handbrake preset. I haven't had any problems using Tivo Desktop Plus to transfer the files. Seems to work very well.


----------



## jcthorne

Still the problem with using Handbrake is that it cannot encode an ac3 audio file with 5.1 channels and a bitrate of 448kbps or less. Therefore using handbrake as the encoder gets you 2 channel audio at best on Tivo.

I suggest using Fair Use Wizard or MeGUI for DVD to h264 with the correct parameters for Tivo.


----------



## westside_guy

jcthorne said:


> Still the problem with using Handbrake is that it cannot encode an ac3 audio file with 5.1 channels and a bitrate of 448kbps or less. Therefore using handbrake as the encoder gets you 2 channel audio at best on Tivo.


Are you claiming that Handbrake's "AC3 Passthrough" setting doesn't work?


----------



## jcthorne

Yes, I am claiming Handbrake's ac3 passthrough setting does not work FOR TIVO as the vast majority of DVDs have AC3 audio tracks recorded as far higher than 448kbps. They have to be re-encoded for Tivo to play them. Handbrake cannot do that....yet. Its a major missing component in an otherwise great tool.


----------



## stsanford

westside_guy said:


> I don't know if you'd consider this a "solution" or not - but the most recent versions of handbrake do have a way to set up a queue for encoding. It's simple, you just hit "Add to queue" instead of "Start" (then you do hit "Start" when you're ready for Handbrake to begin encoding). So you could set up the iPod encode, hit "add to queue", then set up the Tivo encode, hit "add to queue" and then hit "start".
> 
> It's two encodes so it takes longer - but it's about as easy as setting up the single encode.


I love Handbrake's encoding queue, and have used it extensively, it worked fine for a number of workout videos I ripped for my wife, but now, it's not doing anything usable on the TiVo... Go figure.

My uber-setup (I can almost taste it) is to have all the TiVo programming offloaded to my Windows Home Server, which has 4TB of storage. I'm also ripping the DVDs to files to be able to transfer back (so the kids don't scratch them anymore) when they want to watch.

So, I'm stumpped, it worked for say, 10 items, but now, the files are unusable on TiVo. They play fine on the computers... The files which are encoded using KMTTG (ffmpeg) are viewable on TiVo, but not on computers.


----------



## stsanford

jcthorne said:


> I suggest using Fair Use Wizard or MeGUI for DVD to h264 with the correct parameters for Tivo.


Sorry, but I must have missed it... those correct parameters are???


----------



## stsanford

Browser glitch, didn't see the middle posts... Sorry for the wasted bandwidth..


----------



## stsanford

Actually those settings didn't work for me either.
But, I had a rocket-scientist idea: Why not just change extensions from mp4 to mpg.
Viola`
Worked.
Thanks for all your help,
Scott


----------



## wmcbrine

jcthorne said:


> ... the vast majority of DVDs have AC3 audio tracks recorded as far higher than 448kbps.


As I understand it, the maximum AC3 bit rate for DVD _is_ 448 Kbps. DTS and PCM tracks can be higher, though.

http://en.wikipedia.org/wiki/DVD_Video#Audio_data


----------



## westside_guy

Yeah, I haven't had any trouble with AC3 passthrough - but I've never tried to use the DTS track. I don't think Tivo can handle DTS anyway (although I don't have the sound system to give it a go, in any case).


----------



## jcthorne

Tivo cannot handle DTS. Also I have come across quite a few movie DVDs and BluRay disks with ac3 at 640kbps. Did not know there was a 'standard' below that as its so prevelent.


----------



## jcthorne

stsanford said:


> Actually those settings didn't work for me either.
> But, I had a rocket-scientist idea: Why not just change extensions from mp4 to mpg.
> Viola`
> Worked.
> Thanks for all your help,
> Scott


Sorry that did not work for you. FUW builds mkv files with all the correct content for tivo that can then be remuxed to mp4. Its not one step but it works. FUW cannot mux ac3 audio into an mp4 file and handbrake cannot encode ac3 at all, only passthrough so neither tool does it all. At least handbrake is still under development. Sure wish they would include an ac3 encoder as its h264 encoding and mp4 mux capabilities are pretty good and even more so when working with HD files.

What worked? You may have stumbled across something we did not know worked....or at least I did not. You have an mp4 file that you renamed to .mpg and you did what with it? And Tivo played it? Without transcoding while transferring?


----------



## wmcbrine

jcthorne said:


> Also I have come across quite a few movie DVDs and BluRay disks with ac3 at 640kbps.


Blu-ray is a whole other thing. But I haven't seen anything like that on a regular DVD. Are you sure you have?


----------



## stsanford

jcthorne said:


> What worked? You may have stumbled across something we did not know worked....or at least I did not. You have an mp4 file that you renamed to .mpg and you did what with it? And Tivo played it? Without transcoding while transferring?


Yup, Tivo played it fine, while transferring!


----------



## jcthorne

wmcbrine said:


> Blu-ray is a whole other thing. But I haven't seen anything like that on a regular DVD. Are you sure you have?


I was quite sure until you of all people asked. Now I have to research and be sure. Perhaps I am not remembering correctly as I don't do DVDs very often any more. Only BluRay and downloaded mkv in HD resolutions.


----------



## jcthorne

stsanford said:


> Yup, Tivo played it fine, while transferring!


Push or pull? What was the codecs for the content of the mp4? What resolution?


----------



## ppartekim

As I posted in another thread.

So my set will be my mac mini(s) with external RAID (maybe a Drobo), streamed to my two original Tivo Series 3 (not the HD or HD-XL).

After trying out several different dozens settings on a Dr. Horrible featurette (only 7mins and well, who doesn't like Dr. Horrible) all encodings that used a m4v container had stuttered video on Tivo unless I selected a lower bitrate on the Tivo before playing. But every mkv container had smooth video from straight a play (no changes needed on the Tivo). Also, noticed that all mkv containers showed "same" on the Tivo, while all m4v containers showed "same - xxxx kbps" which is clue that unless I lower the bitrate stuttering will occur.

Since I also have a iPhone, I HB'd the mkv file into a m4v version for the iPhone as well as a "normal" m4v file for comparison. The iPhone version looks darn perfect on the iPhone and at actual size on the mac. The "normal" m4v file had its audio track slighty off track (kinda like those really old japanese film).

Now, the mkv file doesn't have a nice QT preview like the m4v files (it display the generic VLC icon); at least it plays without issue within VLC and Plex so no biggie. If I truly need a QT version, I will just watch the iPhone version which I will have anyway for travel.


----------



## westside_guy

I've never had much trouble with a handbrake-produced m4v file on my Tivo. Your mkv file is, of course, being transcoded to something else with the quality loss and transfer speed hit that entails.

Diagnosing this sort of reported issue at a distance tends to be problematic, of course - it's not like we can see what all's going on with your computer.


----------



## ppartekim

westside_guy said:


> I've never had much trouble with a handbrake-produced m4v file on my Tivo. Your mkv file is, of course, being transcoded to something else with the quality loss and transfer speed hit that entails.
> 
> Diagnosing this sort of reported issue at a distance tends to be problematic, of course - it's not like we can see what all's going on with your computer.


Which Tivo do you have? I have heard that what works on a S3 doesn't work the same on a HD and visa versa. At one point, I had a file encoded the exact same way but one version in a mkv container and one version in a m4v container. The mkv worked straight from play (no extra work on my part), the m4v stuttered from play and only had smooth video after I set the Tivo side to a lower bitrate (requiring 3 extra steps). Now both files might have been transcoded on the fly but at least the mkv version required no extra work on my part beyond hitting the play button.


----------



## westside_guy

ppartekim said:


> Which Tivo do you have? I have heard that what works on a S3 doesn't work the same on a HD and visa versa. At one point, I had a file encoded the exact same way but one version in a mkv container and one version in a m4v container. The mkv worked straight from play (no extra work on my part), the m4v stuttered from play and only had smooth video after I set the Tivo side to a lower bitrate (requiring 3 extra steps). Now both files might have been transcoded on the fly but at least the mkv version required no extra work on my part beyond hitting the play button.


My apologies, you were very clear on which Tivo you owned yet I read it as a "generic Series 3". 

I have a Tivo HD, so it certainly is possible that your experiences differ from mine for that reason. It's also possible, depending on the makeup of the mkv file, the "transcoding" might just have been a matter of pulling out the video and audio streams and recombining them - if no format conversion was required, then I'd think there'd be no significant penalty in terms of transfer speed.

I guess the bottom line is - do your mkv files transfer in "real time" or better? If they do, and the quality you see on the TV meets your expectations, then figuring out the "handbrake problem" is still interesting from an academic standpoint, but of less importance practically.

One thing that might be worth trying (since I have no practical help to offer!), if you haven't done this already, is grabbing the beta version of handbrake. While I have no idea if it'll solve your encoding issue, it solved a vexing problem I'd had with certain DVDs. It's always possible one of the fixes that's been included in the beta might address whatever the cause of your "handbrake stutter" issue is.


----------



## jcthorne

mkv and m4v both have to be transcoded before sending to Tivo. If you remuxed your mkv into an mp4 container, it can be pushed to tivo in its original form and played directly without transcoding. Also transferrs MUCH faster and takes up much less space on the Tivo.


----------



## ppartekim

jcthorne said:


> mkv and m4v both have to be transcoded before sending to Tivo. If you remuxed your mkv into an mp4 container, it can be pushed to tivo in its original form and played directly without transcoding.


According the files I HB'd the m4v files are mp4 containers they just a .m4v as a suffix. Or are you talking about the MP4(FFmpeg) vs H.264 codec.



> Also transferrs MUCH faster and takes up much less space on the Tivo.


Much less space? Are you talking about transfers (Push/Pull) to the Tivo. I am not worried so much about the time or space during that process yet, but will later when I rip my TV DVDs.

I was discussing the streaming option using Streambaby to stream my ripped movies to my S3 which consumes no space on the Tivo.


----------



## ppartekim

jcthorne said:


> mkv and m4v both have to be transcoded before sending to Tivo. If you remuxed your mkv into an mp4 container, it can be pushed to tivo in its original form and played directly without transcoding. Also transferrs MUCH faster and takes up much less space on the Tivo.


Ok, I tried a few more HB encodings using the mp4 container (.m4v) on my Dr. Horrible Featurette (it is only 7mins long and has a couple of zoom shots that make and video stuttering extremely obvious). I used the Film setting and only changed the container (mkv/mp4) and codec (h.264/mp4-ffmpeg) all other settings were the same (AC3 passthru, 2-pass, 1800kbps, etc)

A mkv container (.mkv) with a mp4 or h.264 codec inside streams from just play with no stutter.

A mp4 container (.m4v) with a h.264 codec inside stutters unless the bitrate on the Tivo is adjusted now forcing a transcode.

A mp4 container (.m4v) with a mp4 (ffmpeg) codec insides streams from just play with no stutter.

Cannot tell if a transcode is done unless someone can tell me where to look while a file is being streamed.

As for the Push/Pull: jcthorne is correct in that mp4 is faster & less space but, both still required a transcode.

A mkv container (.mkv) with a h.264 codec inside required a transcode to (mpeg2video) which took 6 minutes to transcode/transfer and 0.31GB of disk space.

A mp4 container (.mkv) with a mp4-ffmpeg codec inside required a transcode to (mpeg2video) which took 4 minutes to transcode/transfer and 0.23GB of disk space.


----------



## ppartekim

ppartekim said:


> As for the Push/Pull: jcthorne is correct in that mp4 is faster & less space but, both still required a transcode.


Just an FYI. While the mp4 container with the mp4-ffmpeg codec ended up being smaller on the Tivo, the both mp4/mkv containers that contained the h.264 codec was smaller on the Mac (but the size was extremely minimal <.1Mb) for the 7 minute file.


----------



## jcthorne

You still have not tried what I suggested.

h264 video and ac3 audio in an mp4 container (.mp4) NOT and mkv or m4v. Tivo does not recognize m4v or mkv as native files.

an hd video in an mp4 container (NOT m4v) will stream faster and with MUCH less bandwidth. It will NOT require transcoding so long as the streams inside are h264 and ac3 ONLY


----------



## Yoav

jcthorne said:


> You still have not tried what I suggested.
> 
> h264 video and ac3 audio in an mp4 container (.mp4) NOT and mkv or m4v. Tivo does not recognize m4v or mkv as native files.


m4v is an mp4 container that contains video (and m4a is an mp4 container that contains audio). So if he's made it in m4v he made an mp4 (h.264/ac-3). You can rename the file with an .mp4 at the end if it makes things 'better' for you.

The problem being reported is that the h.264 encoding seems too 'complex' for Series 3 tivos, but ok for Tivo HD. He's asking about what h.264 encoder settings in handbrake will generate an mp4 that can be streamed without transcoding AND that plays correctly.


----------



## moyekj

The Handbrake profiles listed in video_compatibility Wiki page work fine for me (streaming or pushing) on my original S3s (at least for SD & HD recordings originating from my S3 Tivos). Those profiles are available in kmttg as hb_tivo_sd or hb_tivo_hd and their roughly equivalent ffmpeg versions (faster encoding) are available as ff_tivo_sd and ff_tivo_hd.
You can of course create your own profile in Handbrake GUI based on those profiles if you wish.


----------



## jcthorne

The point was, regardless of what is in the file, a file with an extension of .m4v will not pass to the Tivo without transcoding on the fly. A file with an extension of .mp4 with the correct content WILL. For Tivo, .m4v does not equal .mp4

h264 video, level 4.1 or less, ac3 audio 448kbps or less. I have used bitrates up to 18k for video and tivo still played them fine but thats a bit much for a dvd source, usually something in the 1800 to 2000 range for SD video is sufficient.

These settings work fine, been using them for months.


----------



## ppartekim

Sorry, for the delay but work and life called....

Ok, I went back and found the Streambaby logs on my system. I then used the HB lines mentioned in both video_compatibility Wiki page and the two HD/SD lines from kmttg (there are differences in all three) to create new HB versions to try and see what the logs say. I also tried a version without the optimization option turned on.

Each one was used as .mp4 and .m4v, the Tivo saw no difference between the two suffixes. The streambaby logs said all four was "|master|VideoModuleHelper|quality setting is above quality of video, streaming normally" and yes they loaded faster on my Series 3. And yet, all four showed obvious stutter on playing. I guess if the video is streaming normally then both my Series 3 are dropping frames.

The fifth mkv container (made from the HB-HD line with the container changed to mkv), even tho this one also logged the same "setting is above quality of video streaming normally", the very next log line stated "Using ffmpeg transcode args:" and the video was transcoded and played with no stutter.

Any ideas..


----------



## wmcbrine

jcthorne said:


> The point was, regardless of what is in the file, a file with an extension of .m4v will not pass to the Tivo without transcoding on the fly.


That might apply (probably does) if there's no MIME type. If there _is_ a MIME type, that determines how the TiVo handles the stream, and the extension is irrelevant.


----------



## digger69

moyekj said:


> The Handbrake profiles listed in video_compatibility Wiki page work fine for me (streaming or pushing) on my original S3s (at least for SD & HD recordings originating from my S3 Tivos). Those profiles are available in kmttg as hb_tivo_sd or hb_tivo_hd and their roughly equivalent ffmpeg versions (faster encoding) are available as ff_tivo_sd and ff_tivo_hd.
> You can of course create your own profile in Handbrake GUI based on those profiles if you wish.


I tried to decifer the HB CLI on the Wiki to the corresponding GUI settings for a DVD source. I have
Picture


Size: 720x480
Anamorphic: Strict
Cropping: Auto
Video Filter - Everything Off

Video


Video Code: H.264
Framerate: Same
Quality: Constant Quality (60.78% RF:20) - *Note:* _This one I wasn't sure about._
Audio


Source: Automatic
Audio Codec: AC3 Passthru. Everything else was disabled (mixdown=auto,bitrate=32, drc=0)
Subtitles - None

Chapters - all of them, create chapter markers disabled.

Advanced


Reference Frames: 3
Mixed References: Checked
B-Frames: 3
Adaptive B-Frames: Default (Fast)
Direct Prediction: Default (Spatial)
Weighted B-Frames: Checked
Pyramidial B-Frames: Checked
Motion Esimation Method: Default (Hexagon)
Subpixel Motion Estimation: 6
Analysis: All 8x8 DCT: Checked
CABAC Entropy Coding: Checked Trellis: 0
Physchovisual Rate Distortion: Slider all to the right .
No Fast-P-Skip: Checked
No DCT-Decimate: Checked
Deblocking: Default (0) Default (0)

I'm sure this is a situation where a lot of this comes down to preference. I was just trying to reproduct what was in the Wiki (and perhaps get it up there). I appreciate any feedback on what I've got so far.

Note: I had been using AutoGK to create AVIs from DVD. Can anyone give me the thumbnail of why (if) H.264 would be better, especially for DVD content? When I just tried HB with the above settings on Astro Boy DVD, it created a 863MB MP4. The same movie through AutoGK set at 80% quality created a 1.2GB AVI.

Thank you.


----------



## txporter

digger69 said:


> I tried to decifer the HB CLI on the Wiki to the corresponding GUI settings for a DVD source. I have
> Picture
> 
> 
> Size: 720x480
> Anamorphic: Strict
> Cropping: Auto
> Video Filter - Everything Off
> 
> Video
> 
> 
> Video Code: H.264
> Framerate: Same
> Quality: Constant Quality (60.78% RF:20) - *Note:* _This one I wasn't sure about._
> Audio
> 
> 
> Source: Automatic
> Audio Codec: AC3 Passthru. Everything else was disabled (mixdown=auto,bitrate=32, drc=0)
> Subtitles - None
> 
> Chapters - all of them, create chapter markers disabled.
> 
> Advanced
> 
> 
> Reference Frames: 3
> Mixed References: Checked
> B-Frames: 3
> Adaptive B-Frames: Default (Fast)
> Direct Prediction: Default (Spatial)
> Weighted B-Frames: Checked
> Pyramidial B-Frames: Checked
> Motion Esimation Method: Default (Hexagon)
> Subpixel Motion Estimation: 6
> Analysis: All 8x8 DCT: Checked
> CABAC Entropy Coding: Checked Trellis: 0
> Physchovisual Rate Distortion: Slider all to the right .
> No Fast-P-Skip: Checked
> No DCT-Decimate: Checked
> Deblocking: Default (0) Default (0)
> 
> I'm sure this is a situation where a lot of this comes down to preference. I was just trying to reproduct what was in the Wiki (and perhaps get it up there). I appreciate any feedback on what I've got so far.
> 
> Note: I had been using AutoGK to create AVIs from DVD. Can anyone give me the thumbnail of why (if) H.264 would be better, especially for DVD content? When I just tried HB with the above settings on Astro Boy DVD, it created a 863MB MP4. The same movie through AutoGK set at 80% quality created a 1.2GB AVI.
> 
> Thank you.


I think you have seen the main difference for the move from AVI (XVID) to MP4 (H.264). You can get away with a lower bitrate with h.264 encodings compared with xvid with similar quality. There are simply newer and better compression algorithms with the h.264 codec that allow for more compression without sacrificing quality. The downside is that they are harder to both encode and decode.

As far as your settings go, I think you are fine with what you have. Generally, people consider CRF 18 (Handbrake calls this Constant Quality or RF) to be transparent to the source. Meaning that there is no visual difference between them (h.264 is lossy, so there are always differences). I generally use between 19 and 21 CRF. You can try encoding some clips at various settings (higher CRF is lower quality) to see what looks good to you. Make sure to check it on whatever you will be viewing them on. I have heard people suggest finding the highest CRF setting that looks good to you still and then decreasing it by 1 for all of your encodes (22 looks good, 23 looks bad, then use 21). I am fairly certain that the psychovisual settings are ignored because trellis is set to 0.


----------



## xyth

I use Handbrake to create .m4v (mp4) files out of Standard def. DVD rips. I store these on a network server for streaming to a Tivo HD using StreamBaby. I use H.264 with a fixed 29.97 FPS setting for video, RF20, and AC3 passthru for audio. It works flawlessly. I have used the same settings for HD .TIVO files (converted to MPG2 first) with equally great results. Only difference is I use a higher RF18 setting on the HD file to preserve the quality at the expense of file size.

I did have a vertical stuttering issue with StreamBaby when Handbrake used the default "same as source" frame rate setting, but fixed 29.97 took care of that issue. YMMV.


----------



## DaveTheNerd

I have an S3 TiVo. I've been using Handbrake, MP4, H.264, 29.97, RF: 20, and AC3 passthrough. I play either with Streambaby or I push the MP4 to the TiVo and play from the drive.

Half the time the movie will play fine, the other half the audio pops and stutters. If I pause the movie or replay 10 seconds *sometimes* that will fix it, and then 10 minutes later it's popping and stuttering again. The problem only affects audio, video looks smooth throughout. This only happens with AC3 passthru but, of course, AC3 passthru is the only way I get 6-channel sound.

Anyone else experiencing this with an S3? I've tried it 6 ways from Sunday and can't seem to figure out what the solution is.


----------



## DaveTheNerd

ppartekim said:


> After trying out several different dozens settings on a Dr. Horrible featurette (only 7mins and well, who doesn't like Dr. Horrible) all encodings that used a m4v container had stuttered video on Tivo unless I selected a lower bitrate on the Tivo before playing.


I ran into this stuttered video thing, too. The issue is that the TiVo is *much* happier with a constant framerate. Apparently (and I don't fully understand and am oversimplifying) DVDs are NOT encoded with a consistent framerate, and handbrake is happy to pass that along.

Short answer: I was having video stuttering issues until I set my Framerate (FPS) to "29.97 (NTSC Video)" and it now works fine.

(of course, I now have the audio stuttering issues I mentioned in a previous post... I wonder if that's because the video's framerate is being altered by handbrake but I'm passing the audio through and they're out of sync??).


----------



## txporter

DaveTheNerd said:


> I ran into this stuttered video thing, too. The issue is that the TiVo is *much* happier with a constant framerate. Apparently (and I don't fully understand and am oversimplifying) DVDs are NOT encoded with a consistent framerate, and handbrake is happy to pass that along.
> 
> Short answer: I was having video stuttering issues until I set my Framerate (FPS) to "29.97 (NTSC Video)" and it now works fine.
> 
> (of course, I now have the audio stuttering issues I mentioned in a previous post... I wonder if that's because the video's framerate is being altered by handbrake but I'm passing the audio through and they're out of sync??).


TivoHD (and likely S3) do not like h.264 files with framerates below 25fps. DVDs are all encoded with a constant framerate (29.97fps), it is just that most DVDs originate from FILM content (23.976fps) which is then pulled down to 29.97fps. Handbrake normally recognizes the original 23.976fps film rate and will IVTC the video back to that framerate. By forcing a fixed framerate in Handbrake, it is likely processing the video with IVTC to get the original framerate back and then it adds duplicate frames to get to your requested framerate. (It could also be keeping the telecined frames.) TivoJerry has replied to me in PM and verified that playback of h.264 material with 23.976fps framerate is fixed with Tivo Premiere but is unlikely to be addressed with TivoHD/S3.


----------



## DaveTheNerd

txporter said:


> TivoHD (and likely S3) do not like h.264 files with framerates below 25fps. DVDs are all encoded with a constant framerate (29.97fps), it is just that most DVDs originate from FILM content (23.976fps) which is then pulled down to 29.97fps. Handbrake normally recognizes the original 23.976fps film rate and will IVTC the video back to that framerate. By forcing a fixed framerate in Handbrake, it is likely processing the video with IVTC to get the original framerate back and then it adds duplicate frames to get to your requested framerate. (It could also be keeping the telecined frames.) TivoJerry has replied to me in PM and verified that playback of h.264 material with 23.976fps framerate is fixed with Tivo Premiere but is unlikely to be addressed with TivoHD/S3.


Here's something interesting (in all these examples, push and streambaby streaming act the same): If I have my Handbrake (GUI) Framerate set to 29.97, video plays fine, but AC3 audio stutters and pops. If I have my Handbrake (GUI, of course) Framerate set to 23.976 or "Same as source" the video stutters but the audio is perfect. Any ideas on that? I was thinking that it was because the DVD's AC3 was synced to a lower framerate, but based on what you're saying the DVD audio (as AC3 Passthru) should be perfect for 29.97. For me, it's not. :-(

If you have a settings preset you use for DVD->S3 TiVo with AC3 I'd sure appreciate taking a peek at it (either the file or simply screenshots or something!). I adapted the one on the Streambaby Wiki to GUI, but it still happens as I describe in the above paragraph.

Any thoughts?


----------



## txporter

DaveTheNerd said:


> Here's something interesting (in all these examples, push and streambaby streaming act the same): If I have my Handbrake (GUI) Framerate set to 29.97, video plays fine, but AC3 audio stutters and pops. If I have my Handbrake (GUI, of course) Framerate set to 23.976 or "Same as source" the video stutters but the audio is perfect. Any ideas on that? I was thinking that it was because the DVD's AC3 was synced to a lower framerate, but based on what you're saying the DVD audio (as AC3 Passthru) should be perfect for 29.97. For me, it's not. :-(
> 
> If you have a settings preset you use for DVD->S3 TiVo with AC3 I'd sure appreciate taking a peek at it (either the file or simply screenshots or something!). I adapted the one on the Streambaby Wiki to GUI, but it still happens as I describe in the above paragraph.
> 
> Any thoughts?


Perhaps moyekj has some advice for you. I don't own a S3 (only HD), but I know that he has had a lot of issues with h.264 playback on his S3. Not sure if he has worked something out or not.

The audio problem is an odd one. Audio doesn't really have a framerate, but a duration. For a TV show, let's say the entire episode is 43 minutes. That's how long your audio track is. Now, the number of video frames that you display during each second can vary depending on the content/encoding. FILM content displays ~24 frames per second, while NTSC content is played back at ~30 frames per second. In either case, you want the total video duration to be 43 minutes for the video to stay in sync with the audio. If you are encoding at FILM framerate, you have display 61858 frames in 43 minutes. If you are encoding at NTSC framerate, you will display 77323 frames.

The audio popping is a weird one. I am not sure why that is happening. Maybe try downloading yamb and remuxing the mp4 file with the ac3 track first and video track second? That is known to fix the garbled opening video with h.264 playback. Not sure if it helps with the audio popping.


----------

