Video quality settings for @TV Take 2...

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

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

Post by dynaflash »

Cavalicious wrote:Surprising is the setting that were acceptableto the ATV: vbv-maxrate=5500:vbv-bufsize=4000. This allowed for spikes just under 10MB.
Cool. It could be that the video buffer for the atv is in software, which means that apple could tweak the buffer size and duration which would explain why those values would choke atv 1 (early on I had tried similar settings on v1 which still stuttered). Are you getting the macroblocked scene changes using those settings? We have found its a bug in x264's single pass vbv and is worse the close the vbv-maxrate and vbv-bufsize are to each other. Really hoarks bad with the iPod preset where they are the same, gets better the farther apart it seems, according to rhester.
Abulia
Posts: 47
Joined: Thu Feb 21, 2008 12:16 am

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

Post by Abulia »

@ Cav or dynaflash:

Have either of you done any "blind" quality tests? I ask because I've spent the last week fiddling with encodes and settings and on my equipment, doing pixel-by-pixel comparisons, I'm finding no difference with bframes at 6, bframes off, reference frames high, etc. It seems to me -- and this is a highly uneducated guess -- that your CRF encode quality is 95%+ responsible for your final visual quality. Everything I've changed this past week has done *nothing* to affect the final visual quality but has made differences in the final encode size.

I'm really starting to wonder if cranking bframes up (for example) is only providing a Pavlovian response. Higher settings must mean a better picture, right?

A good test I think would be to do several encodes with different settings using descriptive filenames (Fifth Element-ref0-bframes6-subq5.m4v) and then tag the movie description field with a unique descriptor. This would allow you to quickly select a movie and play it (all the names would look identical in ATV) without knowing which file you were looking at. After stack ranking the results you then just select each movie and read its description. This is made possible between the short delay after selecting a movie and ATV then displaying the description, run time, etc.

Oh, and while I don't purport to be any expert, my tests have been at 68% CRF quality on ATV 2.0 via HDMI at 720p, 1080i, and 1080p. My HDTV is a 60" 1080p set. I'm really curious as to how you guys are spotting any visual quality differences.
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:Are you getting the macroblocked scene changes using those settings?
I only saw something similar, when there was a scene change between to "high spiked" scenes. But instead of macroblocking, I got a little jerk. I told myself I would just deal with it later. Its nice to know there is nothing I can do about it (being its a bug). That saved me another 50 encodes trying to remedy 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 »

Right, what happens is at the scenes changes x264 is calling for max bitrate for an I frame. If the buffer is almost full its capping it and you get the macroblocking or maybe a jitter for a quick second at just that point. They are aware of it and I *think* sort of working on it. I also think rhester was gonna take a look at it. I do have a vbv 1 pass patch which we decided not to include in the svn at the last moment as DS who wrote it said it had some issues. Might be worth a shot for your test movie. Get me on irc and I can get it to you.
Cavalicious
Moderator
Posts: 1804
Joined: Mon Mar 26, 2007 12:07 am

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

Post by Cavalicious »

@ Abulia

I would tend to agree that most of the quality is in the Percentage, while everything else is either maintaining said quality within a smaller footprint and/or improving smoothness. That being said, my test aren't so much with quality (alone) but coming to a happy compromise between Quality, Footprint and Smoothness while playing back on an AppleTV. Without speeding days encoding one movie.

I can easily bust the AppleTV, but still come out with a beautiful video to be played via a computer. So its the "Focus" of the AppleTV that we're battling here.
Cavalicious
Moderator
Posts: 1804
Joined: Mon Mar 26, 2007 12:07 am

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

Post by Cavalicious »

@ dynaflash

Will do, when I get home tonight. I hope we can get this nailed down, 'cause I'm startign to fall behind on my encodes. And I refuse to encode anything else, till I'm happy with this! :(
misajay
Posts: 13
Joined: Sun Jan 27, 2008 4:46 am

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

Post by misajay »

Well, I've enjoyed these settings based off of your posts... I kept the bframes down as well as reference frames. So far I have to say I am very pleased with the results. I'm interested in what you find on the vbv buffs though, even though it may not effect these settings very much.

Code: Select all

bframes=6:ref=3:subq=6:me=umh:no-fast-pskip=1:trellis=1:weightb=1:bime=1:brdo=1:direct=auto
piel
Posts: 25
Joined: Wed Jan 16, 2008 3:34 am

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

Post by piel »

misajay wrote:Well, I've enjoyed these settings based off of your posts... I kept the bframes down as well as reference frames. So far I have to say I am very pleased with the results. I'm interested in what you find on the vbv buffs though, even though it may not effect these settings very much.

Code: Select all

bframes=6:ref=3:subq=6:me=umh:no-fast-pskip=1:trellis=1:weightb=1:bime=1:brdo=1:direct=auto
So, for a newbie who has read hundreds of posts and FAQ listings, can you translate this? In the end, I'm looking to find a general "preset" that provides a higher quality rip than the standard AppleTV setting. I don't care about file size or anything other than ensuring that the sound is at 5.1 (which I am doing at 192) and that it works on the AppleTV (no need for other devices). Heck, do I even need to encode the AAC if all I want is to play these files on the AppleTV?

Thanks!
misajay
Posts: 13
Joined: Sun Jan 27, 2008 4:46 am

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

Post by misajay »

@piel

This link gives explanation of the definitions of this code: http://trac.handbrake.fr/wiki/x264Options

In my opinion, this is a good start for higher quality AppleTV rips. Cav and dynaflash, however, like to push the limits as best they can. :) You can see their settings above.
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

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

Post by dynaflash »

Realize we are trying to run the atv right on the ragged edge. Doesnt mean you should or even that its worth doing so. Yes, in many cases you cannot even see a difference. The idea is that by establishing what we *can* do, we have limits we can apply to decide what we *want* to do in practice. Remember, if we went by what Apple told us, I would not have been encoding with cabac on my atv for the last year or so. Having said that, HandBrake's Built In AppleTV preset is really pretty hard to beat from strictly a visual standpoint for most people (myself included alot of the time). Its safe (unlike crf which can balloon file size like crazy with a "noisy" source) and always produces a nice looking picture with a predictable bitrate and file size.

Remember, we are trying to get the atv to crack, then reel it back a notch.
piel
Posts: 25
Joined: Wed Jan 16, 2008 3:34 am

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

Post by piel »

Good to know that what you are all trying to do is push the limits. I have gone back and started doing encodes for Take2, with only one tweak to the standard AppleTV preset...I set the bitrate to 3000 vs 2500. One thing I have noticed however is that, as I am now re-encoding movies to handle 5.1, the file sizes have increase dramatically. Star Wars Ep II jumped from 2.5 to 3.5 gigs with sound at 192 (AAC+AC3). I'm now re-encoding the movie with only AC3 to see how different the file size will be, as well as to see if it will work on the AppleTV...I don't need it to work on an iPod.
swim2383
Posts: 20
Joined: Sat Feb 23, 2008 9:56 am

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

Post by swim2383 »

Where can I get a hold of the vbv patch?

A movie I'm having trouble with is Catch Me If You Can. Chapter 2, depending on the settings different things stand out. Right now I'm using the settings cav pasted above. Some settings I get jitter in the rain at the beginning, the prisoners shaking the fencing, the cigarette smoke jitters (Mrs Abagnale's), when the crowd gives a standing ovation.

Very annoying. Actually the only time I have not had any of those problems is when I go with the "basic" AppleTV settings and just turn up the bit rate to 3000.

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

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

Post by dynaflash »

swim2383 wrote:Where can I get a hold of the vbv patch?

A movie I'm having trouble with is Catch Me If You Can. Chapter 2, depending on the settings different things stand out. Right now I'm using the settings cav pasted above. Some settings I get jitter in the rain at the beginning, the prisoners shaking the fencing, the cigarette smoke jitters (Mrs Abagnale's), when the crowd gives a standing ovation.

Very annoying. Actually the only time I have not had any of those problems is when I go with the "basic" AppleTV settings and just turn up the bit rate to 3000.

Very odd
Not really, abr keeps bitrates in control much better than crf. As I said a few posts above yours, you do not need the patch as the latest svn already has the patch applied. just checkout and ./configure && ./jam :)
swim2383
Posts: 20
Joined: Sat Feb 23, 2008 9:56 am

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

Post by swim2383 »

dynaflash wrote:
swim2383 wrote:Where can I get a hold of the vbv patch?

A movie I'm having trouble with is Catch Me If You Can. Chapter 2, depending on the settings different things stand out. Right now I'm using the settings cav pasted above. Some settings I get jitter in the rain at the beginning, the prisoners shaking the fencing, the cigarette smoke jitters (Mrs Abagnale's), when the crowd gives a standing ovation.

Very annoying. Actually the only time I have not had any of those problems is when I go with the "basic" AppleTV settings and just turn up the bit rate to 3000.

Very odd
Not really, abr keeps bitrates in control much better than crf. As I said a few posts above yours, you do not need the patch as the latest svn already has the patch applied. just checkout and ./configure && ./jam :)

Thanks, I'll go grab the svn now and give it another try.
swim2383
Posts: 20
Joined: Sat Feb 23, 2008 9:56 am

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

Post by swim2383 »

I solved all my stuttering problems by turning off CACAB. Obviously i get a larger file, but that I can live with. I also have turned the reference frames down to 3, it drastically increases encoding speed without a noticeable change in quality, at least for the two movies I have been encoding (Catch Me If You Can and Superbad). I still notice problems with macro blocking on fog and smoke sometimes. I'll do Matrix and Lord of the Rings to night and see how those turn out.
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

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

Post by dynaflash »

swim2383 wrote:I solved all my stuttering problems by turning off CACAB.
No doubt turning cabac off will solve it. But again, we are riding on the edge here. Scary eh ? ;)
swim2383
Posts: 20
Joined: Sat Feb 23, 2008 9:56 am

Re: Let the Madness Begin...

Post by swim2383 »

@dynaflash

I was thinking more about why even without cabav on i STILL get stuttering issues which eventually brought me to TVs. A lot of newer TV include motion smoothing or clean motion settings... depending on what each company's PR decided to call theirs. Pioneer calls theirs "Smooth Film Motion." Many newer, especially higher end models, include similar features. What display are you using?

I'm using an older Toshiba HDTV.. when it was new it was an awesome unit ... but it doesn't have any smoothing features. My parents have that new Pioneer, I'll have to test some movies on it when I get a chance to run home next time.
Maury Markowitz
Novice
Posts: 51
Joined: Sat Oct 13, 2007 1:24 pm

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

Post by Maury Markowitz »

plumbum27 wrote:Ararely do I read of people going over 70% CQ
I encoded a particularly contrasty scene using a variety of CQ settings. I was unable to see any difference with settings above 66%. 62% had noticeable artifacts, and 64 and 66 looked pretty much identical. I use 65% for all encodes now that 9.2 supports it.

Maury
Maury Markowitz
Novice
Posts: 51
Joined: Sat Oct 13, 2007 1:24 pm

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

Post by Maury Markowitz »

swim2383 wrote:I solved all my stuttering problems by turning off CACAB.
I have been using CABAC as an experiment for my ATV encodes. The saving that CABAC gets you are relatively small, and are overwhelmed by AC-3. Basically if you're looking to save file size, losing 5.1 is an easier and "more compatible" way to do it. Additionally, CABAC is CPU intensive (I am not sure if CABAC decodes can be done in the GPU on existing hardware), so you're bumping up your heat and power load to get it. IMHO it's technically interesting, but just not worth it.

Maury
greatnate
Posts: 3
Joined: Wed Jun 13, 2007 5:15 pm

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

Post by greatnate »

swim2383 wrote:I solved all my stuttering problems by turning off CACAB. Obviously i get a larger file, but that I can live with. I also have turned the reference frames down to 3, it drastically increases encoding speed without a noticeable change in quality, at least for the two movies I have been encoding (Catch Me If You Can and Superbad). I still notice problems with macro blocking on fog and smoke sometimes. I'll do Matrix and Lord of the Rings to night and see how those turn out.
First I appreciate the work everyone here has done and am glad to have this repository of information available to me. Thanks!

I have problems with Macro Blocking on fog/smoke scenes or one where the background tends to be a mostly uniform color and not much happening. What options should I be looking for to resolve these issues? Or is this just something I will have to put up with?

I am basically using some recommended settings from Cav and they are working great. Just not sure if there is something I am missing.

Code: Select all

keyint=300:keyint-min=30:bframes=6:ref=3:mixed-refs=1:subq=5:me=umh:no-fast-pskip=1:trellis=0:no-dct-decimate=1:vbv-maxrate=4900:vbv-bufsize=3000
Cavalicious
Moderator
Posts: 1804
Joined: Mon Mar 26, 2007 12:07 am

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

Post by Cavalicious »

Post Reply