AppleTV Custom Presets - 0.9.4

Discuss encoding for devices and presets.
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

AppleTV Custom Presets - 0.9.4

Post by dynaflash » Wed Dec 02, 2009 7:49 pm

This thread replaces the previous advanced AppleTV Settings thread found here http://forum.handbrake.fr/viewtopic.php?f=7&t=7547 . However make sure to read below for an important HandBrake 0.9.4 caveat.

An important note for all AppleTV users that use a custom preset for their AppleTV: As of HandBrake 0.9.4 you *must* add weightp=0 to your advanced options for your custom presets. While x264's weightp is a fantastic development in encoding, unfortunately the modified Quicktime 7.1 that is currently used by the latest ( up to appletv 3.1) software as of this post is not compatible with weightp. I first oulined this issue here http://forum.handbrake.fr/viewtopic.php ... =75#p63980 .

Horrible blockiness and fantastically borked fades will ensue if you encode with weightp for the appletv.

Note: this is only required for your custom presets. The HandBrake 0.9.4 MacGui now automatically updates the Built-In presets and includes weightp where appropriate.

Also note that this post is going to replace the previous Advanced AppleTV preset topic which has now been un-stickied as much of its information is dated, though the last few pages are worth noting.

While this post addresses weightp=0 for *ALL* AppleTV custom presets, I want all discussion here - to - for to only address advanced settings for the AppleTV, therefore the rules should still apply from http://forum.handbrake.fr/viewtopic.php?f=7&t=7547 if not familiar with it...

Read it.
Know it.
Love it.
Cavlc need not apply.

dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Re: AppleTV Custom Presets - 0.9.4

Post by dynaflash » Wed Dec 02, 2009 9:28 pm

For the record I am currently using a constant quality RF of 19.25 for sd dvd and an rf of 23 for hd sources with these advanced options:

Code: Select all

ref=3:mixed-refs=1:bframes=3:me=hex:subq=7:b-adapt=2:weightb=0:trellis=0:weightp=0
This is for me a balance of quality, file size and encoding speed. Given my mbp c2d 2.16 encoding machine.

kiran_mk2
Posts: 65
Joined: Sat Oct 04, 2008 5:14 pm

Re: AppleTV Custom Presets - 0.9.4

Post by kiran_mk2 » Wed Dec 02, 2009 9:57 pm

What benefit does weightp bring? I feel a new AppleTV hardware model is about 6 months away so if it makes sense to delay a batch of encodes until then, I'll hold fire. I guess the overall benefit depends on the number of fades in the video.

dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Re: AppleTV Custom Presets - 0.9.4

Post by dynaflash » Wed Dec 02, 2009 11:31 pm

Realize that supporting weightp is independent of hardware, a simple software update to the qt decoder would bring weightp into use on the appletv. However what apple may or may not do to the hardware of the appletv is not the purpose of this thread.

A side note: the number of fades has nothing to do with the merits of weightp.

kvaruni
Posts: 56
Joined: Tue Mar 24, 2009 1:12 pm

Re: AppleTV Custom Presets - 0.9.4

Post by kvaruni » Thu Dec 03, 2009 3:12 pm

@dynaflash: any reason why you would turn off trellis? Just wondering. Perhaps you might also turn off analysis and turn on no-dct-decimate. This may seem strange, but analysis hardly increases quality in my testing (both SSIM and double-blind), yet it significantly hurts encoding speeds (+- 30%). Even though no-dct-decimate increases file size, it also increases quality and it has hardly any impact on encoding speeds. I do like it that you use hex as motion estimation, since umh seems to mostly hurt encoding speeds while offering very few in terms of quality.

As a side note to everyone, I found that

Code: Select all

vbv-maxrate=12000:vbv-bufsize=2500
seems to be what the AppleTV needs to play back HD content without a hitch and I now have all Planet Earth episodes streaming perfectly to my Apple TV at 720p/24fps. Yes, even the thousands of birds in the first episode are all visible and moving! Since maxrate is still rather high, I have hardly any blockiness. Results may vary, so best to try it out yourself and share your experience.

Da Man
Bright Spark User
Posts: 181
Joined: Sat Mar 08, 2008 5:47 pm

Re: AppleTV Custom Presets - 0.9.4

Post by Da Man » Thu Dec 03, 2009 5:10 pm

Just a suggestion - It would be advantageous if, during everyone's first post on this thread (or every one of them), they list the string of options they are using. One of the main points of confusion in the last AppleTV (post psy-RDO) thread, was having to hunt around to find out what a poster was working with. Just a thought...

:idea:

User avatar
Rodeo
HandBrake Team
Posts: 12195
Joined: Tue Mar 03, 2009 8:55 pm

Re: AppleTV Custom Presets - 0.9.4

Post by Rodeo » Thu Dec 03, 2009 8:04 pm

kvaruni wrote:@dynaflash: any reason why you would turn off trellis? Just wondering.
Trellis has a speed cost (although the cost of trellis 1 is minimal compared to that of trellis 2).
kvaruni wrote:This may seem strange, but analysis hardly increases quality in my testing (both SSIM and double-blind), yet it significantly hurts encoding speeds (+- 30%). Even though no-dct-decimate increases file size, it also increases quality and it has hardly any impact on encoding speeds.
Unless you're trying to preserve subtle film grain, there's nothing to be gained from no-dct-decimate that can't be achieved by lowering the RF.

Regarding setting partitions to none, it sure gives you a lot of speed, but not very efficiently (it has a cost on both quality and file size). I'll comment on this further in the thread where you posted your settings.
kvaruni wrote:I do like it that you use hex as motion estimation, since umh seems to mostly hurt encoding speeds while offering very few in terms of quality.
According to x264 developer Dark_Shikari, umh is overkill unless you're using subme >= 8.

Scarpad
Posts: 22
Joined: Fri Apr 27, 2007 2:01 pm

Re: AppleTV Custom Presets - 0.9.4

Post by Scarpad » Fri Dec 04, 2009 2:15 pm

dynaflash wrote:For the record I am currently using a constant quality RF of 19.25 for sd dvd and an rf of 23 for hd sources with these advanced options:

Code: Select all

ref=3:mixed-refs=1:bframes=3:me=hex:subq=7:b-adapt=2:weightb=0:trellis=0:weightp=0
This is for me a balance of quality, file size and encoding speed. Given my mbp c2d 2.16 encoding machine.
I've used your adv specs, but I've added cabac=0, I notice you have cabac turned on, it used to make the ATV Stutter, does it no longer do so? How dows it affect playback on the touch?

dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Re: AppleTV Custom Presets - 0.9.4

Post by dynaflash » Fri Dec 04, 2009 3:20 pm

Scarpad wrote:
dynaflash wrote:For the record I am currently using a constant quality RF of 19.25 for sd dvd and an rf of 23 for hd sources with these advanced options:

Code: Select all

ref=3:mixed-refs=1:bframes=3:me=hex:subq=7:b-adapt=2:weightb=0:trellis=0:weightp=0
This is for me a balance of quality, file size and encoding speed. Given my mbp c2d 2.16 encoding machine.
I've used your adv specs, but I've added cabac=0, I notice you have cabac turned on, it used to make the ATV Stutter, does it no longer do so? How dows it affect playback on the touch?
As per the other thread and this one cavlc need not apply. I have always used cabac since atv 2.4. I only sync and have had no problems.

Cavalicious
Moderator
Posts: 1804
Joined: Mon Mar 26, 2007 12:07 am

Re: AppleTV Custom Presets - 0.9.4

Post by Cavalicious » Mon Dec 07, 2009 4:38 am

Ah, the time has finally come; I've been retired...

I shall now enjoy my peaceful walks along non-pixalated waters of 'Deja Vu.' While I bask in the stutter-free darkness of 'Harry Potter.'

<if you don't understand the joke here, then you didn't abide by dynaflash's request to read the previous mentioned threads first!>

McFunkerson
Posts: 3
Joined: Mon Dec 07, 2009 10:43 pm

Re: AppleTV Custom Presets - 0.9.4

Post by McFunkerson » Mon Dec 07, 2009 11:10 pm

When the AppleTV was first released I tried some HD encodes and had problems with stuttering and gave up and encoded everything in SD. I recently just purchased a new, Larger, TV, and while my SD encodes still look nice, I think I'd like to try encoding in HD again. After reading the AppleTV custom settings threads I think I have a good idea on where to start, however I had a question about resolution. Apple's official specs state it will run 1280x720 @ 24 fps, or 960x540 @ 30 fps. I guess my question comes in 3 parts.

a) Has Apple's official limits been tested, can you push 1280x720 @ 30fps and still run ok?

b) If I convert a 1280x720 30fps mkv into a 1280x720 24fps mp4 do I risk Audio sync issues (or any other issues for that matter). Is the conversion from one frame rate to another smooth, I remember going the opposite direction (24fps -> 30 fps) and having a fairly obvious jump every second or so on panning shots.

c) Is it best to just settle for 960x540 @ the original frame rate even though that's not really "HD"?

User avatar
Rodeo
HandBrake Team
Posts: 12195
Joined: Tue Mar 03, 2009 8:55 pm

Re: AppleTV Custom Presets - 0.9.4

Post by Rodeo » Tue Dec 08, 2009 12:58 am

McFunkerson wrote:a) Has Apple's official limits been tested, can you push 1280x720 @ 30fps and still run ok?
Yes, it's been tested. If you want 1280 x 720 resolution, framerate may only go up to 25.00 fps.
McFunkerson wrote:b) If I convert a 1280x720 30fps mkv into a 1280x720 24fps mp4 do I risk Audio sync issues (or any other issues for that matter). Is the conversion from one frame rate to another smooth, I remember going the opposite direction (24fps -> 30 fps) and having a fairly obvious jump every second or so on panning shots.
You should not experience any audio sync issues. However, going from framerate x to framerate y where y < x will never be 100% smooth.

Going from framerate x to framerate y where y > x should be smooth (your issues with similar previous encodes might have been due to a HandBrake 0.9.3 bug).
McFunkerson wrote:c) Is it best to just settle for 960x540 @ the original frame rate even though that's not really "HD"?
If the encoded movie's framerate is equal to or above 25.01 fps, you have no choice. Otherwise, you should be able to encode and playback 1280 x 720.

960 x 540 is still better than DVD quality. So you may either choose smoothness over resolution, or choose resolution over smoothness. From my personal experience, I would opt for the former.

Also, remember that 29.97 fps DVD sources may be hard telecined, so enabling detelecine (preferably combined with decomb) is recommended for said sources (and will often result in the output framerate being under 25 fps).

Abulia
Posts: 47
Joined: Thu Feb 21, 2008 12:16 am

Re: AppleTV Custom Presets - 0.9.4

Post by Abulia » Mon Dec 28, 2009 1:36 am

dynaflash wrote: As per the other thread and this one cavlc need not apply. I have always used cabac since atv 2.4. I only sync and have had no problems.
I stream from my SLS and CABAC caused issues with my HD content and the ATV. I'm not advocating one or the other, only providing a datapoint.

That said, I plan to do some test encodes post 0.9.4 with CABAC on with my worst offenders (Casino Royale, HP:OotP) with :weightp=0 and see if the situation has improved. I'll share the findings here.

Based on conversations here, I may also ditch umh but with my 8-core MP, I don't suspect it'll greatly affect my encoding times. My current settings (again, CABAC is going back ON):

Code: Select all

cabac=0:ref=2:me=umh:b-adapt=2:weightb=0:analyse=all:direct=auto:weightp=0
RF 22 for HD content, RF 19.25 for SD. Decomb is on.
While I bask in the stutter-free darkness of 'Harry Potter.'
HP:OotP is my first go-to rip for trying any new setting. That opening sequence is just brutal! :)

djdeejay

Re: AppleTV Custom Presets - 0.9.4

Post by djdeejay » Thu Jan 07, 2010 10:53 pm

dynaflash - have you got much findings in using a 1080p VS a 720p source for a movie?

Ive been using 720p sources mainly, assuming the encode time might be quicker. Unfortunatly I have no way to get my blu-ray library on my mac (and thus onto my Apple TV) where Id like it for upstairs where we have a nice HD set, but no Blu-ray player - so the ATV does its work there.

The only way ive got to get these is to download group releases in MKV format, after converting from DTS to DD i usually get good results and encodes. But wondering if I should go for the 1080p sources and encode down to 720p for the ATV, or just stick with the 720p sources in the first place.

Be interested in knowing if it makes any quality or speed differences using 720p vs 1080p with your advanced settings and how they might affect the settings.

Slightly off top as well, but when i click the inbuilt Apple TV setting on a Hd source it resizes it from 720p to 960x512 any reason why, is that a safety measure incase the source is 30fps and people dont know to change it?

dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Re: AppleTV Custom Presets - 0.9.4

Post by dynaflash » Fri Jan 08, 2010 3:39 am

djdeejay wrote:Slightly off top as well, but when i click the inbuilt Apple TV setting on a Hd source it resizes it from 720p to 960x512 any reason why, is that a safety measure incase the source is 30fps and people dont know to change it?
Exactly. the built in preset code has no source fps based logic so to play safe we went with the lowest resolution based on fps the atv can support. Not ideal but wanted to play safe for those that didn't know better. Obviously for a 24 - 25 fps source jack it up to 720p.

carlcosby

Re: AppleTV Custom Presets - 0.9.4

Post by carlcosby » Fri Jan 08, 2010 7:06 pm

What would be the best settings to use for SD DVD content please?

Thank you
Carl

Cavalicious
Moderator
Posts: 1804
Joined: Mon Mar 26, 2007 12:07 am

Re: AppleTV Custom Presets - 0.9.4

Post by Cavalicious » Sun Jan 10, 2010 3:56 am

carlcosby wrote:What would be the best settings to use for SD DVD content please?

Thank you
Carl
Really...are the 1st 2 posts of this thread not showing up in your browser?

BrOoke
Posts: 12
Joined: Thu Jan 14, 2010 6:38 am

Re: AppleTV Custom Presets - 0.9.4

Post by BrOoke » Thu Jan 14, 2010 6:44 am

dynaflash wrote:For the record I am currently using a constant quality RF of 19.25 for sd dvd and an rf of 23 for hd sources with these advanced options:

Code: Select all

ref=3:mixed-refs=1:bframes=3:me=hex:subq=7:b-adapt=2:weightb=0:trellis=0:weightp=0
This is for me a balance of quality, file size and encoding speed. Given my mbp c2d 2.16 encoding machine.
Hi,

Ive used these settings on the full Blu-Ray movies that i have downloaded (mt2s files) and they turn out quite jumpy when the scenes are quite intensive i.e, star trek is quite bad and the same with rambo. The movies are 24 fps and 1080p, I changed the pic settings to 1280 x 720 and I used the above settings for the advanced section. Is there anything else I could possibly try?

Thank you

nightstrm
Veteran User
Posts: 1887
Joined: Fri Mar 23, 2007 5:43 am

Re: AppleTV Custom Presets - 0.9.4

Post by nightstrm » Thu Jan 14, 2010 1:06 pm

BrOoke wrote:
dynaflash wrote:For the record I am currently using a constant quality RF of 19.25 for sd dvd and an rf of 23 for hd sources with these advanced options:

Code: Select all

ref=3:mixed-refs=1:bframes=3:me=hex:subq=7:b-adapt=2:weightb=0:trellis=0:weightp=0
This is for me a balance of quality, file size and encoding speed. Given my mbp c2d 2.16 encoding machine.
Hi,

Ive used these settings on the full Blu-Ray movies that i have downloaded (mt2s files) and they turn out quite jumpy when the scenes are quite intensive i.e, star trek is quite bad and the same with rambo. The movies are 24 fps and 1080p, I changed the pic settings to 1280 x 720 and I used the above settings for the advanced section. Is there anything else I could possibly try?

Thank you
You might want to try disabling CABAC and adding the VBV statements to your advanced x264 string (cabac=0:vbv-bufsize=9500:vbv=maxrate=9500). I'd probably bump the RF up a little bit as well, 20-21 to compensate.

EDIT: And I really hope by "downloaded" you really mean "decrypted and ripped the Bluray discs I own".

BrOoke
Posts: 12
Joined: Thu Jan 14, 2010 6:38 am

Re: AppleTV Custom Presets - 0.9.4

Post by BrOoke » Thu Jan 14, 2010 9:06 pm

Thank you for the reply nightstrm, I will try those settings and post the results here when done.

And yes, "decrypted" and ripped is what I meant.

B

BrOoke
Posts: 12
Joined: Thu Jan 14, 2010 6:38 am

Re: AppleTV Custom Presets - 0.9.4

Post by BrOoke » Sun Jan 17, 2010 4:20 pm

Hi Nightstrm,

As mentioned, here is an update about how the encode went using the string that you provided. I did Star Trek again with the string you provided as an extra to what is already there in the advance settings. The outcome is a lot better, although the picture still stutters a little bit and not just on the panning scenes. What I mean by stutter, is that it slightly pauses, probably for milli seconds at a time but its noticeable. So are there anymore tweaks to get rid of this "little" visual problem? The original movie is 1080 and 24 FPS, ive added your string, set the pic size to 1280 x 720 and set the FPS to the same as source. Im not quite the pro at this as many of the lads are here, but im learing. I would like to know what all this code means which is added to the advanced settings??

Thanks for your time

B

Bling2Ming
Regular User
Posts: 104
Joined: Mon Dec 29, 2008 10:03 pm

Re: AppleTV Custom Presets - 0.9.4

Post by Bling2Ming » Sun Jan 17, 2010 6:53 pm

I would like to know what all this code means which is added to the advanced settings??
A good place to start would be the HandBrake wiki pages http://trac.handbrake.fr/wiki/x264Options

Or the x264 MeWiki page : http://mewiki.project357.com/wiki/X264_Settings

BrOoke
Posts: 12
Joined: Thu Jan 14, 2010 6:38 am

Re: AppleTV Custom Presets - 0.9.4

Post by BrOoke » Sun Jan 24, 2010 8:06 pm

kvaruni wrote:@dynaflash: any reason why you would turn off trellis? Just wondering. Perhaps you might also turn off analysis and turn on no-dct-decimate. This may seem strange, but analysis hardly increases quality in my testing (both SSIM and double-blind), yet it significantly hurts encoding speeds (+- 30%). Even though no-dct-decimate increases file size, it also increases quality and it has hardly any impact on encoding speeds. I do like it that you use hex as motion estimation, since umh seems to mostly hurt encoding speeds while offering very few in terms of quality.

As a side note to everyone, I found that

Code: Select all

vbv-maxrate=12000:vbv-bufsize=2500
seems to be what the AppleTV needs to play back HD content without a hitch and I now have all Planet Earth episodes streaming perfectly to my Apple TV at 720p/24fps. Yes, even the thousands of birds in the first episode are all visible and moving! Since maxrate is still rather high, I have hardly any blockiness. Results may vary, so best to try it out yourself and share your experience.
Just to let everybody know how I have been getting on, for HD, I have used dynaflash's settings and added kvaruni's:

ref=3:mixed-refs=1:bframes=3:me=hex:subq=7:b-adapt=2:weightb=0:trellis=0:weightp=0:vbv-maxrate=12000:vbv-bufsize=2500

My HD content is now almost perfect (99%).

I used dynaflash's settings for my DVDs and have not altered it, they are good as well.

So, thank you for such a good program and for those of you that helped provide the information to make it possible!

nightstrm
Veteran User
Posts: 1887
Joined: Fri Mar 23, 2007 5:43 am

Re: AppleTV Custom Presets - 0.9.4

Post by nightstrm » Sun Jan 24, 2010 10:05 pm

BrOoke wrote:
kvaruni wrote:@dynaflash: any reason why you would turn off trellis? Just wondering. Perhaps you might also turn off analysis and turn on no-dct-decimate. This may seem strange, but analysis hardly increases quality in my testing (both SSIM and double-blind), yet it significantly hurts encoding speeds (+- 30%). Even though no-dct-decimate increases file size, it also increases quality and it has hardly any impact on encoding speeds. I do like it that you use hex as motion estimation, since umh seems to mostly hurt encoding speeds while offering very few in terms of quality.

As a side note to everyone, I found that

Code: Select all

vbv-maxrate=12000:vbv-bufsize=2500
seems to be what the AppleTV needs to play back HD content without a hitch and I now have all Planet Earth episodes streaming perfectly to my Apple TV at 720p/24fps. Yes, even the thousands of birds in the first episode are all visible and moving! Since maxrate is still rather high, I have hardly any blockiness. Results may vary, so best to try it out yourself and share your experience.
Just to let everybody know how I have been getting on, for HD, I have used dynaflash's settings and added kvaruni's:

ref=3:mixed-refs=1:bframes=3:me=hex:subq=7:b-adapt=2:weightb=0:trellis=0:weightp=0:vbv-maxrate=12000:vbv-bufsize=2500

My HD content is now almost perfect (99%).

I used dynaflash's settings for my DVDs and have not altered it, they are good as well.

So, thank you for such a good program and for those of you that helped provide the information to make it possible!
In discussion with some of the x264 developers that are in #handbrake on IRC, we've learned that having a small value for vbv-bufsize is not a good idea. Through testing done between myself, dynaflash, and others we've determined that 720p24 streams smoothly at vbv-maxrate=10000:vbv-bufsize=10000, 720p25 at vbv-maxrate=9700:vbv-bufsize=9700. To be safe, it's probably best to use vbv-maxrate=9500:vbv-bufsize=9500 to cover all content. These settings were testing using a very difficult scene from one of the Planet Earth episodes.

Guille779
Posts: 1
Joined: Fri Jan 29, 2010 12:19 pm

Re: AppleTV Custom Presets - 0.9.4

Post by Guille779 » Fri Jan 29, 2010 12:36 pm

Hi guys,

So, is it safe to say the these settings are the best for the Apple TV?

cabac=0:vbv-bufsize=9500:vbv=maxrate=9500:ref=3:mixed-refs=1:bframes=3:me=hex:subq=7:b-adapt=2:weightb=0:trellis=0:weightp=0

With an RF=19, 1280x720 at 24fps

What about sound? I noticed that Handbrake will downcovert everything to AAC stereo, and every time I tried AC3 passthrou I got muted movie files. What's the best way to get full 5.1 surround?

Post Reply