Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

pacmania1982

macrumors 65816
Original poster
Nov 19, 2006
1,220
606
Birmingham, UK
Hey all

I've just been transcoding some MKV files for my Apple TV using the default Apple TV profile. But when I tried streaming one of the videos, it was stuttering really badly - streaming over the WiFi. So I synced it to the hard drive and played it back. The performance was much better but on complex scenes, it still stutters. So I opened up the video in Quicktime Player 7 and played back the video on my 13" MBP and it plays back fine. I opened up the movie properties and the video is just under 7Mbit/s which explains why the Apple TV is having problems.

Is there anyway to change the bit rate in Handbrake so it isn't so high?

pac
 

Attachments

  • Screen shot 2010-03-11 at 20.44.46.jpg
    Screen shot 2010-03-11 at 20.44.46.jpg
    196.6 KB · Views: 390
Hey all

I've just been transcoding some MKV files for my Apple TV using the default Apple TV profile. But when I tried streaming one of the videos, it was stuttering really badly - streaming over the WiFi. So I synced it to the hard drive and played it back. The performance was much better but on complex scenes, it still stutters. So I opened up the video in Quicktime Player 7 and played back the video on my 13" MBP and it plays back fine. I opened up the movie properties and the video is just under 7Mbit/s which explains why the Apple TV is having problems.

Is there anyway to change the bit rate in Handbrake so it isn't so high?

pac

On the advanced tab of Handbrake, down at the bottom, replace what is in the box with this
cabac=0:ref=3:me=umh:b-adapt=2:weightb=0:trellis=0:weightp=0:no-fast-pskip=1:no-dct-decimate=1:vbv-bufsize=5000:vbv-maxrate=14000:direct=auto

This will help out TONS. Right now, your bitrate is WAY to high for AppleTV to play properly, which is why you are getting the stuttering effect.

You can take the attached HB_Export.txt file I uploaded, and rename it to HB_Export.plist and import it into Handbrake.
 

Attachments

  • HB_Export.txt
    3 KB · Views: 375
Based on testing performed by myself and some of the Handbrake dev team, the latest AppleTV preset (available in the development snapshot posted on the Handbrake forums) uses the following vbv settings to help limit bitrate spikes.

vbv-maxrate=9500:vbv-bufsize=9500

Since adding this to my preset, I've had zero problem with HD encodes (720p24) stuttering or excessive buffering.
 
I just started using Handbrake/vlc literally one week ago. With the default :apple:TV preset on the latest version of Handbrake, I seem to be getting decent results on my :apple:TV with the movies I've converted so far.
 
On 720p material, it also seems to help to set it to force the frame rate to "24 fps", instead of leaving it at "same as source".
 
On 720p material, it also seems to help to set it to force the frame rate to "24 fps", instead of leaving it at "same as source".

I disagree, for content that is 23.976 or 24fps to start off with, I have had no problems leaving it "same as source". Only if it's higher than 24 fps do I set it manually to 24fps, and that's only because you have to in order to get compatibility with the Apple TV.
 
I had a similar problem which was caused with having the AppleTV set to the incorrect TV settings... sorting that I could happily encode in default HB ATV profile... took me ages to find out thinking it was my encoding....
 
I disagree as well; so far I've used "Same as Source" for 100% of my HDDVD and Bluray encodes and had zero issues.

Then you really are not in a position to compare, are you?

I have encoded movies both ways, "24fps" and "Same as Source" With all other parameters the same, the encodes at "24fps" were smoother and had less stuttering when played on AppleTV.

YMMY
 
Then you really are not in a position to compare, are you?

I have encoded movies both ways, "24fps" and "Same as Source" With all other parameters the same, the encodes at "24fps" were smoother and had less stuttering when played on AppleTV.

YMMY

But that's just it, I have had zero stuttering/smooth playback issues using "Same as Source" so why would I change it? We found that using vbv to restrict bitrate spikes was much more useful to prevent these sort of issues than hardcoding the FPS for the source.

Anyways, I was just relaying what my experience has been.
 
All mine so far (10 blurays) are encoded at '24fps', and not as 'Same as Source', and they work perfect, looks great and there is no shuttering at all.
 
I've encoded about 25 blu-rays using "Same as Source" and mine all play perfectly with no stuttering. As NightStorm said capping bitrate spikes using the vbv commands is the most useful thing to do, as if you don't you may get spikes so high that the ATV just can't handle them and it will drop frames causing stuttering.
 
I don't think it is necessary to get into a debate over this. I agree that the max bit rate is the key factor in avoiding stuttering video, I just wanted to point out that based upon my experimentation it is a fact that for some reason setting the frame rate a 24 fps instead of "same as source" resulted in smoother playback on AppleTV at very high bit rates. Maybe at very high bit rates the AppleTV can handle 24fps easier than 23.976fps. I do not know why. If you want to double check my results, encode the first battle scene in Gladiator at "Same as Source" at a bit rate that makes it choke. Then try it again at 24fps. I encoded that damn scene 20 times looking for the right mix.
 
Thanks for all of your responses. I've copied and pasted that line into Handbrake and trying a video now. Will see what the output is like :D

pac

:D:D:D
 
Thanks JGruber for the plist. I have successfully imported this into Handbrake and can confirm it works like a charm.

I just transcoded Body of Lies and i get about 3500Kbit bit rate. The quality is good all things considered

thanks

pac
 
Thanks JGruber for the plist. I have successfully imported this into Handbrake and can confirm it works like a charm.

I just transcoded Body of Lies and i get about 3500Kbit bit rate. The quality is good all things considered

thanks

pac

Awesome, glad I could help out. I've been using those settings, and have about 23 videos encoded already, a mix of BluRay and DVD, all with very close to perfect picture.
 
Then you really are not in a position to compare, are you?

I have encoded movies both ways, "24fps" and "Same as Source" With all other parameters the same, the encodes at "24fps" were smoother and had less stuttering when played on AppleTV.
Hmm, well since almost all sources are actually vfr (variable frame rate ) then forcing a constant framerate of 24fps would negate the fact that the source would likely... in a complex fast motion scene use a higher framerate. So, by capping the framerate like this it is likely hb is dropping frames from the original source material and allowing the atv more breathing room to play a higher bitrate at a lower fps. Using vbv like the appletv preset now does is another way to limit bitrate spikes while keeping the sources natural intended framerate and attempting to keep the sources original flow, if you will. In some sense it is two means to the same end.

HandBrake has decided that keeping the sources intended framerate ( vis a vis same as source + detelecine ) and capping bitrate spikes via vbv ( video buffer verifier ) is preferable.

Case in point would be try a forced framerate of say 15 which is way low and then crank up bitrate, you will notice the atv will play it fine at a much higher bitrate than the normal preset. However you will of course see jerky playback due to the many dropped frames.

Note: this is analogous to the atv playing back a different res at 29 fps vs. < 25 fps. Less fps is easier to decode in real time at a higher bitrate.
 
Apple tv bitrate

For JGruber

Hi, I am not transcoding blueray, but just converting my .mov home video into appletv format. However, with my new camera the handbrake appletv preset is giving me bitrates in excess of 8000.

Can I use any of what you provided in the post I have quoted to help fix this problem, and would I need to modify the details?

Lastly, I am shooting in 1280x720 at 30fps. Am I best to convert this to 960x540 at 30 fps (as handbrake wants to do) or should I try converting to 1280x720 at 24 fps (where the bitrate is even higher)?

Hope you can pick this message up,

Jim

On the advanced tab of Handbrake, down at the bottom, replace what is in the box with this


This will help out TONS. Right now, your bitrate is WAY to high for AppleTV to play properly, which is why you are getting the stuttering effect.

You can take the attached HB_Export.txt file I uploaded, and rename it to HB_Export.plist and import it into Handbrake.
 
For JGruber

Hi, I am not transcoding blueray, but just converting my .mov home video into appletv format. However, with my new camera the handbrake appletv preset is giving me bitrates in excess of 8000.

Can I use any of what you provided in the post I have quoted to help fix this problem, and would I need to modify the details?

Lastly, I am shooting in 1280x720 at 30fps. Am I best to convert this to 960x540 at 30 fps (as handbrake wants to do) or should I try converting to 1280x720 at 24 fps (where the bitrate is even higher)?

Hope you can pick this message up,

Jim

If your source is Progressive, ie. 30p, you should be able to transcode to 24p without issue. Try it out and see how it looks.
 
Data rate with appletv

If your source is Progressive, ie. 30p, you should be able to transcode to 24p without issue. Try it out and see how it looks.

Hi, I have tried the 24fps conversion and it plays on my computer (although a bit jerky). However, I cannot send this or the 30fps to the appletv as I get the message that "apple tv cannot play the video". I am reasonably sure that this is because of the high bitrate, which I do not know how to reduce!

If I convert using quicktime I get a much lower bitrate (around 3000) and the apple tv accepts and plays it ok.

Thanks

Jim
 
Personaly I'd rather lower the resolution and keep the original frame rate. Converting between frame rates is tricky to get right, especially going from a higher frame rate to a lower one as this means your basically dropping frames and may end up with playback thats not smooth or jerky as you've noticed. As for your bitrate being to high just increase(move slider to the left) the RF value in Handbrake to give you a lower bitrate in your encode.
 
Personaly I'd rather lower the resolution and keep the original frame rate. Converting between frame rates is tricky to get right, especially going from a higher frame rate to a lower one as this means your basically dropping frames and may end up with playback thats not smooth or jerky as you've noticed. As for your bitrate being to high just increase(move slider to the left) the RF value in Handbrake to give you a lower bitrate in your encode.

Thank you! It's easy when you know. Adjusted the slider and Apple TV now accepts the lower bitrate movies!

Thanks again.

Jim
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.