# Handbrake (PC): How to Convert MPEG movies to H.264 for TiVo playback



## nrnoble (Aug 25, 2004)

I am looking for some Handbrake config suggestions for converting MPEG movies (ie ripped DVDs) to H.264 (MP4) for playback on S3 TiVo.

I have ripped a few DVDs and converted them using Handbrake, and stream them to the TiVo using Steam baby. This works without any problems.

*Main Problem:* the movies converted to H.264 have frame stuttering. It's very subtle, but the video does not have the smooth flow as the original. This problem only occurs on the TiVo; playback on the PC does not have the stuttering problem, only on the TiVo.

Suggestions?


----------



## dlfl (Jul 6, 2006)

Is the "-O" switch being used in the HB transcode?


----------



## orangeboy (Apr 19, 2004)

Which TiVo? I know my Premiere handles higher bitrate videos much better than my OLED Series 3 does.


----------



## nrnoble (Aug 25, 2004)

dlfl said:


> Is the "-O" switch being used in the HB transcode?


I am using the UI, so I don't if "-O" is being used when converts the video to H.264.



orangeboy said:


> Which TiVo? I know my Premiere handles higher bitrate videos much better than my OLED Series 3 does.


I have two S3s TiVos and they both have the stuttering problem. Doesn't seem to matter if it is high\low bit rate.

I did convert one BluRay movie (SinCity) and it didn't appear to have the stutter problem, or at least I couldn't notice it.

Overall, the stutter problems appears to be a frame rate issue, like running at 24fps on a 60hz HDTV. I've tried to mess around with the frame rates using Handbrake, setting to convert 24fps to 30fps, but that has not corrected the problem.


----------



## dlfl (Jul 6, 2006)

The command lline window is the "Query Editor". It is hidden by default and can be enabled in the program options menu The HB GUI is just a front end for a command-line program. You can edit the "-O" into this window before starting the encode.


----------



## txporter (Sep 18, 2006)

I am fairly certain that what you are seeing IS related to framerate. A number of us had a discussion a while back about H.264 playback. I think what you are probably seeing is what I was describing as subtitle shimmer. This problem that is very obvious if you have hardcoded subtitles but it also exists without them, it is just harder to spot. I am not positive on this since I do not have a S3 OLED, but I saw this on my TivoHDs. It is still there on my Premiere, but more muted and not so intermittent as it was on the TivoHD. I still see slight shimmering of subs with H.264 shows running at 23.976fps, but it is consistent and less pronounced. Shows running higher framerates (59.94fps for sure and I think 29.97fps/25fps as well) do not show the shimmering.

For the -O parameter that dlfl is talking about, I think you need to check the Web Optimized radio button. That just moves the moov atom to the beginning of the video stream. It will be fixed by pytivo anyways and is not related to your problem.

I noted before that my shimmering subtitle problem was less obvious for larger frame video (720p or 1080i). I am not sure why that is, but the fact that you seemed to sense less stutter issue further makes me believe we are talking about the same thing.

If you take one of your handbrake 23.976fps (or same as source) video and PULL it up to your tivo (rather than push), do you notice the same stuttering? In my experience, even at the same framerate, MPEG2 playback is more stable than H.264.

edit: I just re-read your OP and see that you are using Streambaby. Do you have pytivo set up? H.264 decoding is the same whether you stream or transfer video, but pytivo has ffmpeg built-in so transcoding back to MPEG2 is easier.


----------



## Stuxnet (Feb 9, 2011)

On an mp4 (264) converted from DVD, I saw this effect on a scene focused on a house as a bicyclist passes by... the bicycle's action stutters while the background remains stable. The odd thing is that I previously used the same settings converting another DVD with lots of motorcycle action, and there was no jumpiness in the actions shots. 

Both DVDs were ripped with DVDFab and converted to mp4 with RipBot, and then pushed w/pytivo. Out of curiosity I pushed the vobs of the "jumpy" video w/pytivo, and saw no stuttering/jumpiness in the same frames.

I'm guessing here, but I wonder if there are artifacts from the DVD encryption process that interfere with the mp4 process... cause otherwise I'm stumped. I'll try the "-O" option w/HB and see if things improve.


----------



## rfryar (Feb 15, 2008)

Stuxnet said:


> I'm guessing here, but I wonder if there are artifacts from the DVD encryption process that interfere with the mp4 process... cause otherwise I'm stumped. I'll try the "-O" option w/HB and see if things improve.


Check your Source DVD if it is interlaced content. If so that is the issue as DVDFab has issues auto deinterlacing in some of the recent builds.

Currently I have a two custom profiles for creating H264s, one for non-interlaced content and one for known interlaced content. This has fixed the jerky content for me.

Rick


----------



## nrnoble (Aug 25, 2004)

I will try the suggestions provided and see if I can get rid of the stuttering side effect when playing on the TiVo.

I own a legitimate copy of AnyDVD and use it to rip the DVD to an uncompressed\non-transcoded ISO which is saved to a backup storage server (Several hundred ISOs). From there I mount individual ISOs and then use Handbrake to convert just the main movie to H.264, which is stored on separate streaming content server with a 2TB HDD strictly used for steaming content to my TiVos.

The other option I am considering is not converting the main movie to H.264, and just use VideoRedo to extract the movie and just leave it as a MPEG2 file. The only reason for converting to H.264 is so that I can fit more movies onto streaming server. It just maybe easier to just add more HDD space rather than convert movies to H.264.

The reason I have chosen to use Streambaby is because it is my understanding that the TiVo will playback H.264 video without having to convert it back to MPEG2, and I prefer to stream to rather upload to my two S3s. Streambaby has been very reliable for me; the only problem I am having is the video stutter.

Thanks for all the suggestions.


----------



## Stuxnet (Feb 9, 2011)

rfryar said:


> Check your Source DVD if it is interlaced content. If so that is the issue as DVDFab has issues auto deinterlacing in some of the recent builds.
> 
> Currently I have a two custom profiles for creating H264s, one for non-interlaced content and one for known interlaced content. This has fixed the jerky content for me.


I can't confirm the source until I get back home, but I compared the VOBs from the two films... the one which plays smoothly is progressive, the other isn't identified either way. I'll compare DVDFab w/DVD Decryptor out of curiosity. Can you share how you set up profiles for non/interlaced content.


----------



## rfryar (Feb 15, 2008)

Stuxnet said:


> I'll compare DVDFab w/DVD Decryptor out of curiosity. Can you share how you set up profiles for non/interlaced content.


I have attached two of my DVDFab profiles. The main idea is H264 Level 4.2 video codec defaults to around 1700 KB, with AC3 Audio. One does not deinterlace, the other forces deinterlacing.

The main problem is that my experience with DVDFab's MP4 container is iffy, so I use MKV for both, then use the MKV2Tivo script from these forums to remux these to MP4. That script also fixes the audio if it is DTS on the DVD instead of AC3.

Good luck,

Rick


----------



## Stuxnet (Feb 9, 2011)

Thanks... that will give me something else to play with...


----------



## dlfl (Jul 6, 2006)

Here is the StreamBaby wiki Video Compatibility page:
http://code.google.com/p/streambaby/wiki/video_compatibility
Be sure to take this into account. I note that H.264 *Level 4.1* is listed as the highest compatibile level.


----------



## rfryar (Feb 15, 2008)

dlfl said:


> Here is the StreamBaby wiki Video Compatibility page:
> http://code.google.com/p/streambaby/wiki/video_compatibility
> Be sure to take this into account. I note that H.264 *Level 4.1* is listed as the highest compatibile level.


Yep you are right, the profiles I listed above are 3.0. My BluRay rips are set to 4.1. I do not know where I got 4.2 in my head from. 

Rick


----------



## larrs (May 2, 2005)

After a months long journey, and tons of input on the forums, I finally settled on mpeg2 for all my Tivo needs because of all of the little mpeg4 issues. Until Tivo changes the Premiere to a true media streamer, there are so many issues involved that it makes one headache after another. Streambaby works fine, but with a rebuffer occurring every 1GB, it is problematic for HD sources.

I have managed to get a 1080P h264 source of 20+GB down to 8.5GB 1080P mpeg2 (5.1 AC3) with VideoRedo and it transfers with TivoDesktop just fine, even on a TivoHD.

If you are staying with mpeg4, I found MeGUI as a slightly better encoding solution for a Tivo.


----------



## jcthorne (Jan 28, 2002)

I also gave up on handbrake for most encoding for tivo. MeGUI these days does a much more reliable job creating mp4s that the tivo plays well. There are a few parameters to avoid/keep to but within tivo's limits, it works well.

All my media is stored on our server in mp4 format as it plays well on computers, the tivo and a WDTV player we use in our motorhome. 

If someone wants some help with MeGUI parameters and use for tivo, please start a new thread on that subject and ask away. There are folks here that can help.


----------



## nrnoble (Aug 25, 2004)

jcthorne said:


> I also gave up on handbrake for most encoding for tivo. MeGUI these days does a much more reliable job creating mp4s that the tivo plays well. There are a few parameters to avoid/keep to but within tivo's limits, it works well.
> 
> All my media is stored on our server in mp4 format as it plays well on computers, the tivo and a WDTV player we use in our motorhome.
> 
> If someone wants some help with MeGUI parameters and use for tivo, please start a new thread on that subject and ask away. There are folks here that can help.


I have created a new MeGUI thread. I will give a try by using it to convert a few DVD movies.

Could you post your TiVo preset settings and\or provide a link where the preset can be downloaded.

Thx!


----------

