ATV 2.x Advanced Settings (All Sources)

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.
Post Reply
Cavalicious
Moderator
Posts: 1804
Joined: Mon Mar 26, 2007 12:07 am

ATV 2.x Advanced Settings (All Sources)

Post by Cavalicious »

Before we get this started, there are a few prerequisites before trying out anything thats stated in this thread (including posting):
  • 1. Get familiar with these Threads - ATV Advanced Settings (DVD Source) & ATV Advanced Settings (HD Source)
    2. Understand that we are trying to squeeze as much quality out of the AppleTV while maintaining some sort of balance between Speed and Size.
    3. Be aware, not everything is going to come out pretty. Since Apple isn't providing anything by way of reliable specs, we're (as dynaflash would say) throwing crap at the wall and seeing what sticks.
    4. Don't expect perfection, but you may maintain a perfectionist's attitude.
    5. Some settings may require you to compile SVN releases. If you don't know how, don't discuss here.
    6. If you haven't upgraded to AppleTV 2.x, this isn't the thread for you.
    7. Cabac stays on. There is no need to be here if you insist on using :cabac=0
    8. This is a CRF thread. ABR is too "safe" for us. 8)
    9. Try at you own risk! If your AppleTV catches your house on fire during quick pans, we are not responsible!
OK, now that that is out of the way, lets play with some settings...

Settings:

A Walk on the Dark Side

Code: Select all

CRF = 68% / PAR=on  Advance: bframes=6:ref=3:mixed-refs=1:subq=6:me=umh:no-fast-pskip=1:trellis=1:brdo=1:direct=auto:bime=1
She is Gonna Blow!

Code: Select all

CRF = 70% / PAR=on  Advance: bframes=9:ref=6:mixed-refs=1:merange=24:subq=6:weightb=1:me=umh:no-fast-pskip=1:trellis=1:brdo=1:direct=auto:bime=1
Problem Child 1 (more to be added, as they come up): Harry Potter - and the Order of the Phoenix (NTSC)

Using same setting on other movies (Deja Vu / Night at the Museum) didn't yield the same results. This is truly an Edge Case! Hence should be the exception and not rule when it comes to your encodes.

Problem Areas: There are 3 parts in the first chapter to look at:
  • 1. Durring the WB logo zoom towards the foreground
    2. During the downward pan of the homes next to the freeway
    3. Tall Grass pan when Harry is walking to the playground
Others who don't have HP-OOTP, try these on some of your more "active" movies and let us know.

Let the fun begin...
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Re: Video quality settings for @TV Take 2...

Post by dynaflash »

Have it and will try it tonight. On another note, I did get a touch of frame drop on my atv using no vbv and night at museum. Same movie was fine three days ago. What !!! ???? After throwing stuff around the room a bit, I realized I had transferred a bunch of stuff over to the atv and almost maxed out the hdd space. freed 2 gb of hd space and I swear it played smooth as silk. Placebo effect ? Who knows? Could the atv be using HD space for its video buffer ? Would'nt think so. More testing to come over the next few days.
nightstrm
Veteran User
Posts: 1887
Joined: Fri Mar 23, 2007 5:43 am

Re: Video quality settings for @TV Take 2...

Post by nightstrm »

dynaflash wrote:Have it and will try it tonight. On another note, I did get a touch of frame drop on my atv using no vbv and night at museum. Same movie was fine three days ago. What !!! ???? After throwing stuff around the room a bit, I realized I had transferred a bunch of stuff over to the atv and almost maxed out the hdd space. freed 2 gb of hd space and I swear it played smooth as silk. Placebo effect ? Who knows? Could the atv be using HD space for its video buffer ? Would'nt think so. More testing to come over the next few days.
Really? I had always assumed that it did use HD space as a video buffer for streaming...
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Re: Video quality settings for @TV Take 2...

Post by dynaflash »

nightstrm wrote:Really? I had always assumed that it did use HD space as a video buffer for streaming...
Right, I knew it used it for streaming (actually a network buffer) but I am talking about its Video Buffer. This was playing right off of the atv's hdd. No streaming involved.
Cavalicious
Moderator
Posts: 1804
Joined: Mon Mar 26, 2007 12:07 am

Re: Video quality settings for @TV Take 2...

Post by Cavalicious »

Hmm...You know, I didn't try syncing the movie. But being that isn't the norm for me anyway, I guess it doesn't matter. BUT, I do wonder if it makes a difference or not...
Cavalicious
Moderator
Posts: 1804
Joined: Mon Mar 26, 2007 12:07 am

Re: Video quality settings for @TV Take 2...

Post by Cavalicious »

OH, by the way, the VBV patch did fix the transition jitter/macroblocking it was doing. So I guess there was "some" good news from last night.
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Re: Video quality settings for @TV Take 2...

Post by dynaflash »

Has been working quite well for me also.
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Re: Video quality settings for @TV Take 2...

Post by dynaflash »

Cavalicious wrote:Hmm...You know, I didn't try syncing the movie. But being that isn't the norm for me anyway, I guess it doesn't matter. BUT, I do wonder if it makes a difference or not...
Well, my goal is to find out what the atv *itself* can handle. So syncing is the only way to take network throughput out of the equation.
Cavalicious
Moderator
Posts: 1804
Joined: Mon Mar 26, 2007 12:07 am

Re: Video quality settings for @TV Take 2...

Post by Cavalicious »

dynaflash wrote:
Cavalicious wrote:Hmm...You know, I didn't try syncing the movie. But being that isn't the norm for me anyway, I guess it doesn't matter. BUT, I do wonder if it makes a difference or not...
Well, my goal is to find out what the atv *itself* can handle. So syncing is the only way to take network throughput out of the equation.
Good Point. I try to eliminate throughput by only allowing my iMac and ATV to connect to my Apple Basestation. And only at 802.11n (5ghz). All my other devices connect wirelessly via a different 802.11g bridge connected ethernet port.
nightstrm
Veteran User
Posts: 1887
Joined: Fri Mar 23, 2007 5:43 am

Re: Video quality settings for @TV Take 2...

Post by nightstrm »

dynaflash wrote:
nightstrm wrote:Really? I had always assumed that it did use HD space as a video buffer for streaming...
Right, I knew it used it for streaming (actually a network buffer) but I am talking about its Video Buffer. This was playing right off of the atv's hdd. No streaming involved.
My bad, I wasn't following what you were saying. Using the HD for the video buffer would be strange.
Abulia
Posts: 47
Joined: Thu Feb 21, 2008 12:16 am

Re: Help Me, Before I go Crazy!

Post by Abulia »

Cavalicious wrote:...Before I go insane, someone, anyone, please do a sanity check for me:
I can do this tonight if you'd like another source.

Note that I stream from a dedicated NAS on an N-only network to my ATV. If you'd like me to do this as sync-only, I can.
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Re: Video quality settings for @TV Take 2...

Post by dynaflash »

Unless there is some kind of a virtual memory thing in play here. But is all speculation. We work with what we've got. :)
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Re: Video quality settings for @TV Take 2...

Post by dynaflash »

FYI, I went ahead and committed the vbv 1 pass patch to our svn http://trac.handbrake.fr/changeset/1319
forgueam
Posts: 1
Joined: Mon Feb 25, 2008 9:58 pm

Re: Video quality settings for @TV Take 2...

Post by forgueam »

I just wanted to say that I am anxiously following this thread and looking forward to seeing the final results. Keep up the great work everyone!!
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Re: Video quality settings for @TV Take 2...

Post by dynaflash »

Okay so just to verify as Cav and I had a summit conference on this on our irc channel. We likely should distinguish between what is possible streaming vs. what is possible syncing. It is my goal to verify what the appleTV can do sync'ed as a streaming solution is affected by network variables of which there are a myriad of things which can affect the outcome. At least thats my position at any rate. ie. one setting which works sync'ed is likely not to work streamed.
Abulia
Posts: 47
Joined: Thu Feb 21, 2008 12:16 am

Re: Video quality settings for @TV Take 2...

Post by Abulia »

In theory sync vs stream could make a difference but I'm not sure it would. Do we have any evidence to support this? I guess on an 802.11g network with a poor connection but, for example, I stream from my ATV on an N-only 5GHz network with a gigabit backbone. I'd be shocked if syncing vs streaming yielded any performance increase. We're just not moving that many bits...are we? :D

@Cav
I'm encoding Potter right now. Will report back in a few hours; have a new A/V Receiver to hook up! Weeeeeee! :D
Cavalicious
Moderator
Posts: 1804
Joined: Mon Mar 26, 2007 12:07 am

Re: Video quality settings for @TV Take 2...

Post by Cavalicious »

There was evidence of this last night. My problem child encode ran fine once synced.

Now, that said, It's not the available through put, but more so how the ATV buffers the Stream vs just playing it from the Harddrive. I'm trying to figure out if I can play with the vbv-bufsize, to see if I can get it to stream without jitter.
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Re: Video quality settings for @TV Take 2...

Post by dynaflash »

Okay Cav, your right we have a new winner in the problem child category, that opening of HP OP is a real beauty. At any rate, 68% crf with this string:

Code: Select all

bframes=9:ref=6:mixed-refs=1:subq=6:me=umh:no-fast-pskip=1:trellis=1:weightb=1:bime=1:brdo=1:direct=auto
did in fact jitter in that very first scene sync'd, note I used no vbv buffering at all.
Abulia
Posts: 47
Joined: Thu Feb 21, 2008 12:16 am

Re: Video quality settings for @TV Take 2...

Post by Abulia »

Well, I'm not sure what you're going to be able to make out of this. ATV caches content? Before the results, my setup: ATV 2.0 streaming from an HP MediaSmart server (WHS) with iTunes library over 802.11n, 5GHz N-only network off AEBS, connected to gigabit switch backbone.

When streamed everything was fine until the city shot of the homes then it became S...T...U...T...T...E...R city. Same with the grass. Choked the ATV to its knees.

Then went to my Mac Pro and synced said file to the ATV where it played without incident until the grass. Choppy.

Then, just for kicks, I went back and killed the sync and re-streamed the movie. (Ah ha!) I had no stutters in the pan across the homes but got some stutter returning when panning across the grass.

One thing I also noticed, and I say this with the greatest respect, the output didn't look that good, IMO. Perhaps its the source material/transfer, but frankly considering the bitrate you're pumping here, it's a lot for nothing. On the shot with the mother getting her kids off of the spinning wheel, the slide behind her has heavy aliasing. Really bad. Same with the grass.

I compare this with my rips that I've been doing, in particular "The Fifth Element" -- which I've watched all the way through with no stutter and simply amazing video quality -- and there's no comparison in the visual output. Again, perhaps its just the source, but "Phoenix" -- stuttering aside -- did not impress.

For fun, here's what I've been using on my latest encodes, including on "The Fifth Element," 68%:

Code: Select all

ref=6:subq=6:me=umh:no-fast-pskip=1:mixed-refs=1:merange=32:analyse=all:bframes=6:trellis=1:weightb=1:brdo=1:bime=1:direct=auto
I hope this helped!
Cavalicious
Moderator
Posts: 1804
Joined: Mon Mar 26, 2007 12:07 am

Re: Video quality settings for @TV Take 2...

Post by Cavalicious »

@ Abulia

Its the source, I was thinking the same thing. Being that we're not specifying *any* bitrate, whats being used is whats being needed (as far as CRF is concerned). I'm now reencoding using :filter=-2,1 to see if I can clean it up a little.

@ dynaflash

I told you (nah da na)! :D Now, lets fix it. Besides in-loop flters and some kind of understanding of buffer control, I don't know what else to do.

Thanks to the both of you for sanity checking this for me, I was beginning to lose it!
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Re: Video quality settings for @TV Take 2...

Post by dynaflash »

Cavalicious wrote:@ dynaflash

I told you (nah da na)! :D Now, lets fix it. Besides in-loop flters and some kind of understanding of buffer control, I don't know what else to do.

Thanks to the both of you for sanity checking this for me, I was beginning to lose it!
Okay, I am taking a new tact, which I mentioned on IRC last night. I am trying two things. 1. I am not so sure the atv likes 9 bframes as much as six. so I am switching to six again. As well, I think our guesstimated buffer length is too short. So I am going with a 1 second buffer length, and allowing a 1 second spike of 1150 kbps. which works out to 5500/6000 .

One thought, like most things we are working on the edge as far as settings and thanks to our new problem child, we are using a fringe source for the most part. I have now done 10 encodes using 70 % and NO vbv at all including our previous benchmarks A Night and DejaVu and all are more than sweet in appearance and performance. As well, the jitter I get is fairly slight on HP OP ... nothing like the complete stalls we used to get when testing atv 1. So, if we can keep the buffer high enough to *just* stay on the smooth side of that wicked opening scene thereby letting crf do its *thang* for the most part on all other material. We might have a winner.

Of course, as we have no clue what the actual atv video buffer spec is. Its more art than science at this point :)
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Re: ATV 2.x Advanced Settings (All Sources)

Post by dynaflash »

Cavalicious wrote:Try at you own risk! If your AppleTV catches your house on fire during quick pans, we are not responsible!
hahaha, thats a good one. :) Not much to add on my part to the list, looks good to me. One note for my part though, as we will be dealing with dropping frames on test encode, I don't personally think turning cabac off is a effective solution, we already know that with cabac off you can do most anything within reason on the atv. I am interested in the limits with cabac on. Just my .02. :)
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Re: Let the Madness Begin...

Post by dynaflash »

I have to say that HB OP is really ... well weird. I have encoded almost half of my library including my most taxing movies from v1.1 with 68% crf and

Code: Select all

bframes=6:ref=6:mixed-refs=1:subq=6:me=umh:no-fast-pskip=1:trellis=1:weightb=1:bime=1:brdo=1:direct=auto
Which you will notice has no vbv buffering and they all play smooth as silk and look great, *except* HP OP in that opening chapter. I am kind of at a loss here. I do know that my old v1.1 standby

Code: Select all

bframes=6:ref=3:subq=5:me=umh:mixed-refs=1:no-fast-pskip=1:trellis=1:vbv-maxrate=3900:vbv-bufsize=2100
plays it smooth as silk, which I expected but I really want to open up the vbv buffer a bit.
Seems to me that

Code: Select all

vbv-maxrate=5500:vbv-bufsize=4500
is the new control (at least for now) to keep our problem child from dropping frames as Cav reported it played smooth when synced.
Abulia
Posts: 47
Joined: Thu Feb 21, 2008 12:16 am

Re: Video quality settings for @TV Take 2...

Post by Abulia »

Hi all. Frustrating weekend of encoding. Just when I *thought* I had a setting I liked, ATV and Harry Potter (and Casino Royale) ruin my day. :(

Here's what I was using:

Code: Select all

ref=6:subq=6:me=umh:no-fast-pskip=1:mixed-refs=1:merange=32:analyse=all:bframes=6:trellis=1:weightb=1:brdo=1:bime=1:direct=auto
In the "Order of the Phoenix" opening discussed above I get bad stuttering. It's most readily apparent when doing the pan across the grass.

So then I pulled out my standby iPhone settings and "Casino Royale" for my business trip this week:

Code: Select all

ref=6:subq=6:me=umh:no-fast-pskip=1:vbv-maxrate=4900:vbv-bufsize=3000
:mixed-refs=1:cabac=0:merange=32:analyse=all:level=30
Same thing at the snake fight in chapter 3: bad stuttering!

Here's the thing: video plays fine on my iPhone with no stuttering. So now I'm wondering if the problem isn't in the encoding per se, but in the DD 5.1 track? What's the overhead when also playing DD? It's also worth noting that I stream all my ATV content from a NAS across a gigabit network and a 5GHz N-only wireless network. That shouldn't be the problem, but perhaps I'll try wired to see if that helps.

As I said, really frustrating. I was hoping to be encoding en mass by this point, but instead I seem to be back to square one. :(
Cavalicious
Moderator
Posts: 1804
Joined: Mon Mar 26, 2007 12:07 am

Re: Let the Madness Begin...

Post by Cavalicious »

I also encoded CS recently and I saw a little jitter during the snake fight scene, but nothing like HP OP.

I also found another Problem Child (We are Marshall - Opening Logo and multiple scenes in 1st chapter...even a lockup). I think I have a lock on its settings, I've encoded over night, and will have to wait till I get home from work to see if it took.

If I didn't know better, I would almost say it's been hard to create an great encode with ATV 2.x than with 1.1.
Post Reply