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.
vidjock
Posts: 26
Joined: Tue Sep 30, 2008 9:50 pm

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

Post by vidjock »

I am going to throw in my 2 cents. I think this thread has out lived it's usefulness. I am a relatively new Handbrake user, but not a new user to x264 or encoding in general. I have read this entire thread, and it seems that until the last few posts it has been dealing mostly with x264 pre vaq, psy-rd and psy-trellis. With the addition of the before mentioned algorithms x264 encoding has changed dramatically, and imho a new thread should be started for atv advanced settings snap 3 and above.
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

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

Post by dynaflash »

I am not going to disagree, however its cav's thread so I will leave it to him to decide whether or not to mothball it to 0.9.2.
Cavalicious
Moderator
Posts: 1804
Joined: Mon Mar 26, 2007 12:07 am

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

Post by Cavalicious »

I guess I can pigeon hole the thread to "Pre-Psy", although the nature of the thread is still generic enough (ATV Software 2.x and Advance Settings) to cover new implementations of x264.

I, personally, would like to experiment a little more with PsyRdo an PsyTrellis before *I* can start a new dedicated thread. Also, like always, I think dynaflash and I are overdue for our ATV UN chats...which will help solidify the content/ground rules for the dedicated thread. :wink:

Note: I do not agree on dedicating a thread based on a Snapshot release. It will all but confuse people when posts continue to be written well after new public code is released.
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

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

Post by dynaflash »

Well said, I concur. It is true that its about advanced settings. As well lets bear in mind that the upcoming x264 change for Snapshot 4 will also change some of the advanced opts.

Let continue on here for snapshot 3 and decide what to do for snapshot 4, if you agree.
vidjock
Posts: 26
Joined: Tue Sep 30, 2008 9:50 pm

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

Post by vidjock »

Cavalicious wrote:I guess I can pigeon hole the thread to "Pre-Psy", although the nature of the thread is still generic enough (ATV Software 2.x and Advance Settings) to cover new implementations of x264.
I look forward to posting encode results in a "Post-Psy" thread.
Cavalicious
Moderator
Posts: 1804
Joined: Mon Mar 26, 2007 12:07 am

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

Post by Cavalicious »

dynaflash wrote:Well said, I concur. It is true that its about advanced settings. As well lets bear in mind that the upcoming x264 change for Snapshot 4 will also change some of the advanced opts.

Let continue on here for snapshot 3 and decide what to do for snapshot 4, if you agree.
I agree.
djdeejay

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

Post by djdeejay »

Ok, Dynaflash.

The new advanced settings are too unstable for true HD material - they may work fine on HDTV sources, but ive just been encoding a HD film from a high 720p source, looks great plays very jerky must have bitrate spikes all over the place. Overall bit rate came out at 4500kb.

I tried a lot with a sample - problem is the sample didnt have a big enough collection of various scenes within the movie to attempt to see how well it played.

I will experiment with a new sample at lower bitrates - if i start too lose quiality before i get smooth play back i'll have to use old advanced settings at a lower CRF, but preventing the bitrate spikes (i might even disable CABRAC for big HD sources, what do you think about that?)
Cavalicious
Moderator
Posts: 1804
Joined: Mon Mar 26, 2007 12:07 am

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

Post by Cavalicious »

...this is because you will have to cap HD Sources with vbv settings. <do a search> Most of us have encoded our 1080i sources via EyeTV without issue...with vbv settings.
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

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

Post by dynaflash »

Well, as I have said as well as cav, when going to a higher res source, I would (and do) lower the crf %. For example, as I said earlier with 0.9.2 I used 68-70 % for dvd sources and more like 60-62 % for my eyetv ota HD sources.
It only makes sense that the same would be true for the new x264 and HB snap 3. I haven't yet played with my HD sources to see what I like, but will probably start somewhere around 52-54% and see which way I want to go.

I never suggested 60-62% for HD with snapshot 3 at all I don't think.
Last edited by dynaflash on Wed Oct 08, 2008 3:09 am, edited 1 time in total.
Reason: crappy typing
djdeejay

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

Post by djdeejay »

Cav - yes I was thinking of bringing back in vbv settings too. Could i drop them into the end of the new code Dynaflash as done, or perhaps Cabrac or weight B-frames should be removed for HD only?

Dynaflash, i encoded at 57% - i tried again at 55% on the troublesome part this time it comes out at 3500kbps and after playing it once it plays back a second time fine. Im weiry of lowering it pas 55% though as we're not talking about already heavily compressed semi HD, HDTV material here, the source is original blu-ray so its very clean and crisp. Id treat HDTV material from eyetv of slightly glossy SD material.

So it begs the question which will lose the least quiality using 54% on the slider, or using 56% and employing vbv. If i use vbv settings can i move the slider up to 59% or not?
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

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

Post by dynaflash »

You would have to try it to find out. Again, new territory here. One note: your comment that ota hd via n eyetv is closer to SD is simply not true (depending on your broadcaster) the ota hd here comes in *very* clear and crisp and at a very high bitrate at 1080i 30 or even 60 fps depending.

It is not totally clear to me that vbv with crf reacts just like it did before. Again, this thread is all about testing, so test, test, test. Having said that, I think that 59% with vbv would be too high. you would likely keep hitting the vbv buffer limits quite a bit. Just my .02 but I would first try going lower without vbv and see how you like the quality. But, thats all the fun of it. You can try just about whatever you want! :)
djdeejay

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

Post by djdeejay »

No im sure it is crisp, some of the BBC HD stuff at 1080i is very crisp over here too, some HD is appaling, but generally if you get used to watching even the best OTA HD and then pop in a Blu-Ray disc its incomparable -- but then Blu-ray is at something like 40-50mb/s....even if that is a lot of bloated wasted the eye cannot see (which im sure it is)

I suppose its the difference between watching a good TV made drama and then watching a multi million pound film on DVD.
brakestands
Regular User
Posts: 58
Joined: Sun Oct 12, 2008 10:13 pm

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

Post by brakestands »

Dynaflash et al.,

I have just loaded the latest SVN and upgraded my AppleTV to 2.2. I am using the Dynaflash-recommended settings although I've dialed it back to 60% quality on the slider. Using that and the detailed Advanced Options you recommend, I am getting very nice results. I've tried both NTSC and PAL discs and they both come out very nicely.

Dynaflash, are you still seeing the same results you were earlier, or do you have any other tricks to recommend, rates at which things break up badly, etc.?

Thanks a ton for this thread, quite helpful.

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

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

Post by dynaflash »

brakestands wrote:Dynaflash, are you still seeing the same results you were earlier, or do you have any other tricks to recommend, rates at which things break up badly, etc.?
Well, so far so good. I have been pretty busy, but have re encoded about 10 discs I suppose with those settings and have been very happy so far with the results. I think for now I will stick with them ... at least until another idea comes along ;)
djdeejay

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

Post by djdeejay »

dynaflash wrote:
brakestands wrote:Dynaflash, are you still seeing the same results you were earlier, or do you have any other tricks to recommend, rates at which things break up badly, etc.?
Well, so far so good. I have been pretty busy, but have re encoded about 10 discs I suppose with those settings and have been very happy so far with the results. I think for now I will stick with them ... at least until another idea comes along ;)
Dynaflash - something about the new settings effects some fades on my ATV.

Id encoded the begining of the Office Specials (UK Version) it begins with white writing on a black background which fades in and out. When it fades out it glitches and appears with dots and noise.

I encoded this section with the old advanced settings and the new advanced settings in Snapshot 3 again. Both play the same in iTunes but again the new settings caused the glitchness blocky-ness on ATV and the old settings created the fadeout perfectly on ATV.

Could this be also the reason im getting weird noise around peoples heads on some sources?

It would seem, for me at least, that if the original source is a very good DVD version (such as Batman Begins etc) the results are excellent. If its a ropey PAL TV show, Sports footage, or an older TV show it begins to show artifacts, noise, glitches and problems on the Apple TV perhaps with the weighted B-Frames.

Also obvioulsy the VBV settings created a more regular final bitrate, where as the new settings create HD encodes which can end up at 1.4gb (The Simpsons Movie from 1080p source) and SD films which end up at 3.5gb (The Butterfly Effect from PAL Dvd Source) and without almost encoding a source twice its impossible to tell where to put the CRF slider. With Snapshot 2 and the old Adv settings i knew what arond 64% would give me, and if the original source was slightly poor I would decrease it and if it was ok i put it higher.

The HD thread is no closed, but strangely im playing with a 720p sample of Full Metal Jacket and ive used the old adv settings and the new adv settings (my tweaked HD settings removing cabac and weight b frames) both produce a file with a bitrate over 5000kbps (5150kbps for the old adv and 5550kbps for the adv) yet both play flawlessly on the ATV. I might add i used 59% on both.

Stangely they both looked identical to my eye - yet the old adv settings provided a smaller file and lower bit rate (just)
Cavalicious
Moderator
Posts: 1804
Joined: Mon Mar 26, 2007 12:07 am

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

Post by Cavalicious »

djdeejay wrote:...(my tweaked HD settings removing cabac and weight b frames)
I've already warned you once...<see rule 7 for this thread>

Removing cabac is *not* what this thread is about. Either follow the rules of this thread, or create your own.
djdeejay

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

Post by djdeejay »

Cavalicious wrote:
djdeejay wrote:...(my tweaked HD settings removing cabac and weight b frames)
I've already warned you once...<see rule 7 for this thread>

Removing cabac is *not* what this thread is about. Either follow the rules of this thread, or create your own.
I know it is Cav, BUT you've closed the HD thread now and we need to talk about advanced settings in here - as you may have noticed during much of my test - with real HD sources (from 1080p Blu-Ray for instance) cabac is the one thing which doesn't play well on the ATV - so you have to remove it on those kind of encodes.

I dont see how that threatens the thread it just a way of us all learning about the new things we can and can't do...
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

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

Post by dynaflash »

Hell, cabac isn't even offically supported on the atv. Hence the part of the title "Advanced".

Maybe a new thread about HD sources with cabac disabled is required ?
djdeejay

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

Post by djdeejay »

dynaflash wrote:Hell, cabac isn't even offically supported on the atv. Hence the part of the title "Advanced".

Maybe a new thread about HD sources with cabac disabled is required ?
Possibly, i wanted to keep this in the HD thread - as it fitted perfectly, advanced ATV settings for HD.

Cav decided that thread run it course, to be honest i dont think it even began exploring any HD conversion process, especially not considering the MKV files we can load into snapshot 3 and beyond.

Perhaps a new thread for HD sources (with cabac or not...depending if it plays smooth or not) with any of the latest snapshot/svn releases and various HD source material.

I cannot believe how quickly the Simpsons Move encoded from a 1080p souce and made a 1.4gb file. I guess some of my handbrake settings loved the animation and threw away what it didn't need, made a tiny file which has to be one of the most glorious looking crisp and sharp images ive seen on my TV, especially after the ATV upscaled it back to 1080p - i cant imagine it looked much better on the original blu-ray AND i managed to convert to DTS soundtrack to AC3 for passthough in Handbrake and it worked like a charm, full DD 5.1 from a DTS source :D
Cavalicious
Moderator
Posts: 1804
Joined: Mon Mar 26, 2007 12:07 am

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

Post by Cavalicious »

djdeejay wrote:Possibly, i wanted to keep this in the HD thread - as it [Censored] perfectly, advanced ATV settings for HD.
No, that thread(s) were started when the AppleTV first came out. Nothing there is really relevant today, other than understanding the theory behind what we were trying to do.
Cav decided that thread run it course, to be honest i dont think it even began exploring any HD conversion process, especially not considering the MKV files we can load into snapshot 3 and beyond.
What does mkv have to do with the AppleTV. How about reading the threads before posting.
Perhaps a new thread for HD sources (with cabac or not...depending if it plays smooth or not) with any of the latest snapshot/svn releases and various HD source material.
Why, just use the preset (or slightly modified). Hardly requires a new thread IMHO.
I know it is Cav, BUT you've closed the HD thread now and we need to talk about advanced settings in here
Does this title not say (All Sources)?
...as you may have noticed during much of my test - with real HD sources (from 1080p Blu-Ray for instance) cabac is the one thing which doesn't play well on the ATV - so you have to remove it on those kind of encodes.
No, YOU just haven't found what works for you. Plenty of us have been encoding 1080 sources for our AppleTV for a while now...with cabac. You just have to find the sweet spot.
I dont see how that threatens the thread it just a way of us all learning about the new things we can and can't do...
The problem is, you are trying to reinvent the wheel instead of making it smoother. Besides [Censored] me off by constantly derailing threads. I.e. If you are having PAL issues with decombing, take it elsewhere. Consider this the last warning.
Cavalicious
Moderator
Posts: 1804
Joined: Mon Mar 26, 2007 12:07 am

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

Post by Cavalicious »

<Unrelated discussions have been split off>
Cavalicious
Moderator
Posts: 1804
Joined: Mon Mar 26, 2007 12:07 am

Preliminary Post Psy-rdo HD Encode

Post by Cavalicious »

Just to prove to the masses that it can be done...

This was a quick down and dirty 1080/30 encode for the AppleTV that runs smooth as butter...results will vary, I'm sure.

Code: Select all

HandBrake Activity Log for Session (Cleared): 2008-10-14 09:23:38 -0500

[09:23:38] macgui: Handbrake Version: svn1828 (2008101101)
[09:23:38] hb_init: checking cpu count
[09:23:39] hb_init: starting libhb thread
[09:23:39] hb_init: checking cpu count
[09:23:39] hb_init: starting libhb thread
[09:23:50] macgui: trying to open a package at: /Volumes/EyeTV/EyeTV Archive/Jeopardy!.eyetv
[09:23:50] macgui: trying to open eyetv package
[09:23:50] macgui: found mpeg in eyetv package
[09:23:50] hb_scan: path=/Volumes/EyeTV/EyeTV Archive/Jeopardy!.eyetv/000000000ea3a7c4.mpg, title_index=0
[09:23:50] scan: trying to open with libdvdread
[09:23:50] dvd: not a dvd - trying as a stream/file instead
[09:23:50] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[09:23:50] hb_ts_stream_find_pids - found the following PIDS
[09:23:50]     Video PIDS : 
[09:23:50]       0x31 type MPEG2 (0x2)
[09:23:50]     Audio PIDS : 
[09:23:50]       0x34 type AC-3 (0x81)
[09:23:50]       0x111 type ISO 13818-1 private section (0x5)
[09:23:50]       0x112 type ISO 13818-1 private section (0x5)
[09:23:53] transport stream pid 0x34 (type 0x81) is AC-3 audio id 0x80bd
[09:23:56] transport stream pid 0x111 (type 0x5) isn't audio
[09:23:56] transport stream pid 0x112 (type 0x5) isn't audio
[09:23:56] scan: decoding previews for title 1
[09:23:56] scan: audio 0x80bd: AC-3, rate=48000Hz, bitrate=384000 English (AC3) (5.1 ch)
[09:23:58] scan: 10 previews, 1920x1088, 29.970 fps, autocrop = 0/8/0/0, aspect 1.76:1, PAR 1:1
[09:23:58] scan: title (0) job->width:1936, job->height:1088
[09:23:58] stream: 5 good frames, 0 errors (0%)
[09:23:58] libhb: scan thread found 1 valid title(s)
[09:23:59] macgui: ScanDone state received from fHandle
[09:28:57] macgui: Rip: Pending queue count is 0
[09:28:57] macgui: Rip: No pending jobs, so sending this one to doAddToQueue
[09:28:57] macgui: Rip: Going right to performNewQueueScan
[09:28:57] macgui: scanning specifically for title: 1
[09:28:57] macgui: performNewQueueScan currentQueueEncodeIndex is: 0
[09:28:57] hb_scan: path=/Volumes/EyeTV/EyeTV Archive/Jeopardy!.eyetv/000000000ea3a7c4.mpg, title_index=1
[09:28:57] scan: trying to open with libdvdread
[09:28:57] dvd: not a dvd - trying as a stream/file instead
[09:28:57] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[09:28:57] hb_ts_stream_find_pids - found the following PIDS
[09:28:57]     Video PIDS : 
[09:28:57]       0x31 type MPEG2 (0x2)
[09:28:57]     Audio PIDS : 
[09:28:57]       0x34 type AC-3 (0x81)
[09:28:57]       0x111 type ISO 13818-1 private section (0x5)
[09:28:57]       0x112 type ISO 13818-1 private section (0x5)
[09:28:57] transport stream pid 0x34 (type 0x81) is AC-3 audio id 0x80bd
[09:28:57] transport stream pid 0x111 (type 0x5) isn't audio
[09:28:57] transport stream pid 0x112 (type 0x5) isn't audio
[09:28:57] scan: decoding previews for title 1
[09:28:57] scan: audio 0x80bd: AC-3, rate=48000Hz, bitrate=384000 English (AC3) (5.1 ch)
[09:28:58] scan: 10 previews, 1920x1088, 29.970 fps, autocrop = 0/8/0/0, aspect 1.76:1, PAR 1:1
[09:28:58] scan: title (0) job->width:1936, job->height:1088
[09:28:58] stream: 5 good frames, 0 errors (0%)
[09:28:58] libhb: scan thread found 1 valid title(s)
[09:28:59] macgui: ScanDone state received from fQueueEncodeLibhb
[09:28:59] macgui: processNewQueueEncode title list is: 1
[09:28:59] macgui: processNewQueueEncode currentQueueEncodeIndex is: 0
[09:28:59] macgui: processNewQueueEncode number of passes expected is: 1
[09:28:59] macgui: processNewQueueEncode sending to prepareJob
[09:28:59] macgui: prepareJob exiting
[09:28:59] 1 job(s) to process
[09:28:59] starting job
[09:28:59] job configuration:
[09:28:59]  * source
[09:28:59]    + /Volumes/EyeTV/EyeTV Archive/Jeopardy!.eyetv/000000000ea3a7c4.mpg
[09:28:59]    + title 1, chapter(s) 1 to 1
[09:28:59]  * destination
[09:28:59]    + /Volumes/New Downloads/Jeopardy.m4v
[09:28:59]    + container: MPEG-4 (.mp4 and .m4v)
[09:28:59]      + 64-bit formatting
[09:28:59]  * video track
[09:28:59]    + decoder: mpeg2
[09:28:59]      + bitrate 18800 kbps
[09:28:59]    + frame rate: 29.970 fps -> variable fps
[09:28:59]    + dimensions: 1920 * 1088 -> 944 * 528, crop 0/8/0/0
[09:28:59]    + filters
[09:28:59]      + Detelecine (pullup) (default settings)
[09:28:59]      + Deinterlaces selectively with yadif/mcdeint and lowpass5 blending (1:2:6:9:80:16:16)
[09:28:59]    + encoder: x264
[09:28:59]      + options: bframes=6:ref=6:mixed-refs=1:subq=6:me=umh:no-fast-pskip=1:trellis=1:brdo=1:direct=auto:bime=1:merange=24:vbv-maxrate=4000:vbv-bufsize=3000
[09:28:59]      + quality: 0.58
[09:28:59]  * audio track 0 (no-name)
[09:28:59]    + decoder: English (AC3) (5.1 ch) (track 0, id 80bd)
[09:28:59]      + bitrate: 384 kbps, samplerate: 48000 Hz
[09:28:59]    + mixdown: Dolby Pro Logic II
[09:28:59]    + encoder: faac
[09:28:59]      + bitrate: 128 kbps, samplerate: 48000 Hz
[09:28:59] dvd: not a dvd - trying as a stream/file instead
[09:28:59] reader: first SCR 1563769564
[09:28:59] yadif thread started for segment 0
[09:28:59] yadif thread started for segment 1
[09:28:59] decomb thread started for segment 0
[09:28:59] decomb thread started for segment 1
[09:28:59] encx264: keyint-min: 30, keyint-max: 300
[09:28:59] x264 options: Unknown suboption brdo
[09:28:59] x264 options: Unknown suboption bime
[09:28:59] encx264: Encoding at constant RF 21.420000
[09:28:59] mpeg2: "" (1) at frame 0 time 9009
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
No accelerated IMDCT transform found
[09:28:59] sync: expecting 46516 video frames
[09:28:59] sync: first pts is 9009
[09:48:53] stream: error near frame 8176: continuity error: got 1 expected 10
[10:13:44] stream: error near frame 17701: continuity error: got 10 expected 3
[10:40:04] stream: error near frame 30990: continuity error: got 11 expected 4
[10:40:50] a52_syncinfo failed
[10:40:50] a52_syncinfo ok
[10:49:02] stream: error near frame 34457: continuity error: got 3 expected 1
[10:52:40] hb_ts_stream_decode - eof
[10:52:40] stream: 35791 good frames, 6 errors (0%)
[10:52:40] reader: done. 6 scr changes
[10:52:42] sync: got 35782 frames, 46516 expected
[10:52:42] work: average encoding speed for job is 7.123489 fps
[10:52:46] mpeg2 done: 35783 frames
[10:52:46] render: lost time: 516516 (172 frames)
[10:52:46] render: gained time: 516516 (669 frames) (0 not accounted for)
[10:52:46] render: average dropped frame duration: 3003
x264 [info]: slice I:282   Avg QP:19.41  size: 59967  PSNR Mean Y:44.20 U:46.96 V:47.90 Avg:45.01 Global:44.48
x264 [info]: slice P:9864  Avg QP:21.35  size: 11264  PSNR Mean Y:40.76 U:43.58 V:45.34 Avg:41.63 Global:40.97
x264 [info]: slice B:25461 Avg QP:20.91  size:  2016  PSNR Mean Y:41.16 U:43.87 V:45.81 Avg:42.03 Global:41.50
x264 [info]: consecutive B-frames:  2.8% 12.2% 13.4% 26.3% 20.1% 14.2% 11.0%
x264 [info]: mb I  I16..4: 18.5%  0.0% 81.5%
x264 [info]: mb P  I16..4:  1.2%  0.0%  2.0%  P16..4: 52.5% 14.7% 14.9%  0.0%  0.0%    skip:14.6%
x264 [info]: mb B  I16..4:  1.7%  0.0%  0.0%  B16..8: 17.6%  0.5%  0.3%  direct:12.9%  skip:66.9%  L0:44.1% L1:44.5% BI:11.4%
x264 [info]: direct mvs  spatial:89.3%  temporal:10.7%
x264 [info]: ref P L0  72.0% 12.4%  7.7%  3.1%  2.5%  2.2%
x264 [info]: ref B L0  63.7% 15.1% 10.4%  5.7%  5.2%
x264 [info]: SSIM Mean Y:0.9758080
x264 [info]: PSNR Mean Y:41.071 U:43.812 V:45.699 Avg:41.940 Global:41.366 kb/s:1207.71
[10:52:46] decomb: yadif deinterlaced 11274 | blend deinterlaced 3133 | unfiltered 21202 | total 35609
[10:52:46] libhb: work result = 0
[10:53:02] macgui: incrementQueueItemDone currentQueueEncodeIndex is incremented to: 1
[10:53:02] macgui: incrementQueueItemDone the 0 item queue is complete
CRF 58 /w vbv-maxrate=4000:vbv-bufsize=3000

NOTE: When time permits, tuning will be done to take advantage of newer x264 commits.
djdeejay

Re: Preliminary Post Psy-rdo HD Encode

Post by djdeejay »

Cavalicious wrote:Just to prove to the masses that it can be done...

This was a quick down and dirty 1080/30 encode for the AppleTV that runs smooth as butter...results will vary, I'm sure.

Code: Select all

HandBrake Activity Log for Session (Cleared): 2008-10-14 09:23:38 -0500

[09:23:38] macgui: Handbrake Version: svn1828 (2008101101)
[09:23:38] hb_init: checking cpu count
[09:23:39] hb_init: starting libhb thread
[09:23:39] hb_init: checking cpu count
[09:23:39] hb_init: starting libhb thread
[09:23:50] macgui: trying to open a package at: /Volumes/EyeTV/EyeTV Archive/Jeopardy!.eyetv
[09:23:50] macgui: trying to open eyetv package
[09:23:50] macgui: found mpeg in eyetv package
[09:23:50] hb_scan: path=/Volumes/EyeTV/EyeTV Archive/Jeopardy!.eyetv/000000000ea3a7c4.mpg, title_index=0
[09:23:50] scan: trying to open with libdvdread
[09:23:50] dvd: not a dvd - trying as a stream/file instead
[09:23:50] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[09:23:50] hb_ts_stream_find_pids - found the following PIDS
[09:23:50]     Video PIDS : 
[09:23:50]       0x31 type MPEG2 (0x2)
[09:23:50]     Audio PIDS : 
[09:23:50]       0x34 type AC-3 (0x81)
[09:23:50]       0x111 type ISO 13818-1 private section (0x5)
[09:23:50]       0x112 type ISO 13818-1 private section (0x5)
[09:23:53] transport stream pid 0x34 (type 0x81) is AC-3 audio id 0x80bd
[09:23:56] transport stream pid 0x111 (type 0x5) isn't audio
[09:23:56] transport stream pid 0x112 (type 0x5) isn't audio
[09:23:56] scan: decoding previews for title 1
[09:23:56] scan: audio 0x80bd: AC-3, rate=48000Hz, bitrate=384000 English (AC3) (5.1 ch)
[09:23:58] scan: 10 previews, 1920x1088, 29.970 fps, autocrop = 0/8/0/0, aspect 1.76:1, PAR 1:1
[09:23:58] scan: title (0) job->width:1936, job->height:1088
[09:23:58] stream: 5 good frames, 0 errors (0%)
[09:23:58] libhb: scan thread found 1 valid title(s)
[09:23:59] macgui: ScanDone state received from fHandle
[09:28:57] macgui: Rip: Pending queue count is 0
[09:28:57] macgui: Rip: No pending jobs, so sending this one to doAddToQueue
[09:28:57] macgui: Rip: Going right to performNewQueueScan
[09:28:57] macgui: scanning specifically for title: 1
[09:28:57] macgui: performNewQueueScan currentQueueEncodeIndex is: 0
[09:28:57] hb_scan: path=/Volumes/EyeTV/EyeTV Archive/Jeopardy!.eyetv/000000000ea3a7c4.mpg, title_index=1
[09:28:57] scan: trying to open with libdvdread
[09:28:57] dvd: not a dvd - trying as a stream/file instead
[09:28:57] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[09:28:57] hb_ts_stream_find_pids - found the following PIDS
[09:28:57]     Video PIDS : 
[09:28:57]       0x31 type MPEG2 (0x2)
[09:28:57]     Audio PIDS : 
[09:28:57]       0x34 type AC-3 (0x81)
[09:28:57]       0x111 type ISO 13818-1 private section (0x5)
[09:28:57]       0x112 type ISO 13818-1 private section (0x5)
[09:28:57] transport stream pid 0x34 (type 0x81) is AC-3 audio id 0x80bd
[09:28:57] transport stream pid 0x111 (type 0x5) isn't audio
[09:28:57] transport stream pid 0x112 (type 0x5) isn't audio
[09:28:57] scan: decoding previews for title 1
[09:28:57] scan: audio 0x80bd: AC-3, rate=48000Hz, bitrate=384000 English (AC3) (5.1 ch)
[09:28:58] scan: 10 previews, 1920x1088, 29.970 fps, autocrop = 0/8/0/0, aspect 1.76:1, PAR 1:1
[09:28:58] scan: title (0) job->width:1936, job->height:1088
[09:28:58] stream: 5 good frames, 0 errors (0%)
[09:28:58] libhb: scan thread found 1 valid title(s)
[09:28:59] macgui: ScanDone state received from fQueueEncodeLibhb
[09:28:59] macgui: processNewQueueEncode title list is: 1
[09:28:59] macgui: processNewQueueEncode currentQueueEncodeIndex is: 0
[09:28:59] macgui: processNewQueueEncode number of passes expected is: 1
[09:28:59] macgui: processNewQueueEncode sending to prepareJob
[09:28:59] macgui: prepareJob exiting
[09:28:59] 1 job(s) to process
[09:28:59] starting job
[09:28:59] job configuration:
[09:28:59]  * source
[09:28:59]    + /Volumes/EyeTV/EyeTV Archive/Jeopardy!.eyetv/000000000ea3a7c4.mpg
[09:28:59]    + title 1, chapter(s) 1 to 1
[09:28:59]  * destination
[09:28:59]    + /Volumes/New Downloads/Jeopardy.m4v
[09:28:59]    + container: MPEG-4 (.mp4 and .m4v)
[09:28:59]      + 64-bit formatting
[09:28:59]  * video track
[09:28:59]    + decoder: mpeg2
[09:28:59]      + bitrate 18800 kbps
[09:28:59]    + frame rate: 29.970 fps -> variable fps
[09:28:59]    + dimensions: 1920 * 1088 -> 944 * 528, crop 0/8/0/0
[09:28:59]    + filters
[09:28:59]      + Detelecine (pullup) (default settings)
[09:28:59]      + Deinterlaces selectively with yadif/mcdeint and lowpass5 blending (1:2:6:9:80:16:16)
[09:28:59]    + encoder: x264
[09:28:59]      + options: bframes=6:ref=6:mixed-refs=1:subq=6:me=umh:no-fast-pskip=1:trellis=1:brdo=1:direct=auto:bime=1:merange=24:vbv-maxrate=4000:vbv-bufsize=3000
[09:28:59]      + quality: 0.58
[09:28:59]  * audio track 0 (no-name)
[09:28:59]    + decoder: English (AC3) (5.1 ch) (track 0, id 80bd)
[09:28:59]      + bitrate: 384 kbps, samplerate: 48000 Hz
[09:28:59]    + mixdown: Dolby Pro Logic II
[09:28:59]    + encoder: faac
[09:28:59]      + bitrate: 128 kbps, samplerate: 48000 Hz
[09:28:59] dvd: not a dvd - trying as a stream/file instead
[09:28:59] reader: first SCR 1563769564
[09:28:59] yadif thread started for segment 0
[09:28:59] yadif thread started for segment 1
[09:28:59] decomb thread started for segment 0
[09:28:59] decomb thread started for segment 1
[09:28:59] encx264: keyint-min: 30, keyint-max: 300
[09:28:59] x264 options: Unknown suboption brdo
[09:28:59] x264 options: Unknown suboption bime
[09:28:59] encx264: Encoding at constant RF 21.420000
[09:28:59] mpeg2: "" (1) at frame 0 time 9009
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
No accelerated IMDCT transform found
[09:28:59] sync: expecting 46516 video frames
[09:28:59] sync: first pts is 9009
[09:48:53] stream: error near frame 8176: continuity error: got 1 expected 10
[10:13:44] stream: error near frame 17701: continuity error: got 10 expected 3
[10:40:04] stream: error near frame 30990: continuity error: got 11 expected 4
[10:40:50] a52_syncinfo failed
[10:40:50] a52_syncinfo ok
[10:49:02] stream: error near frame 34457: continuity error: got 3 expected 1
[10:52:40] hb_ts_stream_decode - eof
[10:52:40] stream: 35791 good frames, 6 errors (0%)
[10:52:40] reader: done. 6 scr changes
[10:52:42] sync: got 35782 frames, 46516 expected
[10:52:42] work: average encoding speed for job is 7.123489 fps
[10:52:46] mpeg2 done: 35783 frames
[10:52:46] render: lost time: 516516 (172 frames)
[10:52:46] render: gained time: 516516 (669 frames) (0 not accounted for)
[10:52:46] render: average dropped frame duration: 3003
x264 [info]: slice I:282   Avg QP:19.41  size: 59967  PSNR Mean Y:44.20 U:46.96 V:47.90 Avg:45.01 Global:44.48
x264 [info]: slice P:9864  Avg QP:21.35  size: 11264  PSNR Mean Y:40.76 U:43.58 V:45.34 Avg:41.63 Global:40.97
x264 [info]: slice B:25461 Avg QP:20.91  size:  2016  PSNR Mean Y:41.16 U:43.87 V:45.81 Avg:42.03 Global:41.50
x264 [info]: consecutive B-frames:  2.8% 12.2% 13.4% 26.3% 20.1% 14.2% 11.0%
x264 [info]: mb I  I16..4: 18.5%  0.0% 81.5%
x264 [info]: mb P  I16..4:  1.2%  0.0%  2.0%  P16..4: 52.5% 14.7% 14.9%  0.0%  0.0%    skip:14.6%
x264 [info]: mb B  I16..4:  1.7%  0.0%  0.0%  B16..8: 17.6%  0.5%  0.3%  direct:12.9%  skip:66.9%  L0:44.1% L1:44.5% BI:11.4%
x264 [info]: direct mvs  spatial:89.3%  temporal:10.7%
x264 [info]: ref P L0  72.0% 12.4%  7.7%  3.1%  2.5%  2.2%
x264 [info]: ref B L0  63.7% 15.1% 10.4%  5.7%  5.2%
x264 [info]: SSIM Mean Y:0.9758080
x264 [info]: PSNR Mean Y:41.071 U:43.812 V:45.699 Avg:41.940 Global:41.366 kb/s:1207.71
[10:52:46] decomb: yadif deinterlaced 11274 | blend deinterlaced 3133 | unfiltered 21202 | total 35609
[10:52:46] libhb: work result = 0
[10:53:02] macgui: incrementQueueItemDone currentQueueEncodeIndex is incremented to: 1
[10:53:02] macgui: incrementQueueItemDone the 0 item queue is complete
CRF 58 /w vbv-maxrate=4000:vbv-bufsize=3000

NOTE: When time permits, tuning will be done to take advantage of newer x264 commits.
Good stuff Cav, you're come to a similar collection of settings that i have for HD - although it is a of course a much tougher beats to tame than SD DVD sources.

I find the margin for error much higher, especially of course as we're pushing the ATV to its limits even more.

What works perfectly on one HD source, is too low or too high on another, and of course aspect ratio and cropping comes in it hugely. Any 1:75 ratio films in which we crop the top and bottom black bars means we can really ramp that CRF bar up if required and recieve a similar bitrate as those we use a lower CRF which fill a 16:9 tv screen.

A couple of encodes pose problems at + or - 1% and its finding the sweet spot. For instance i have one 720p source which if you go below 58% noticibly shows blocks etc, and if you go above 60% reaches bitrates which make the ATV struggle.

Ive learnt in the last few days cabac doesn't seem to make my ATV trip up anymore and its worth syncing these to the hard drive even if your on a wideband 5ghz N connection or wired even, just to make sure - a few files which were jerky played smooth as butter once synced.

The only problem is most HD encodes take a good 24 hours for me - and encoding samples is not really helpful in many cases, you cannot tell until handbrake has run its course if you've hit that sweet spot - which is making some film 3 day encode times, and other films i get lucky on first hit with. It now seems a breeze to encode a DVD in 6-8 hours and know it'll be perfect!

(Apart from those glitch artifacts around the head i was telling you about Dynaflash, i assume you or no one else is getting this? Im running some tests on the forth piece of SD footage in which its happening on for me - the are queued up after 3-4 HD encodes so they might not get done for a day yet, but i'll repost codes, logs and results back in here to show what happens)
djdeejay

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

Post by djdeejay »

Dynaflash.

Just thought id let you know ive done EXTENSIVE testing with your new, and old adv settings on SVN3 with a source i was getting the "noise around peoples heads" a lot on id reported before with the new setting.

Ive come this conclusion. The new settings need to be at a 2% higher markup than the old adv settings to achieve the same quiality in results.

The old settings at 60% on my source test (SD DVD of Layer Cake) of chapter 2, gave me a 76.5mb file with a 1675kbps bit rate.

The 60% new adv settings was giving me a 65mb file and 1400kbps bitrate - which is where the noticable headnoise was coming in, which wasn't apart on the old setting at 60%.

If i put the new setting up to 62% it achieved a copy of chapter 2 which was virtually exactly the same as the old settings at 60%, giving a bit rate which was 1646 kbps and a 75.1mb file.

Over many minutes this would of course result in a very slightly smaller file. Also interesting to note that on the old adv settings, 60% already reacher the bitrate limit, and putting it up to 62% resulted in exactly the same file being created.

On this movie 62% with the new setting is the minimum to get almost 1:1 dvd replica, any lower and quiality loses, where as you have a little more freeway to the old settings - but once you get the new settings right it makes no difference which you lose - both encodes will be virtually the same size, with almost the same bitrate.

I suppose the weighted b frames might create a more economic file over the course of the entire movie - and of course bframes=3 will make the encode slightly faster. So if you can hit that sweet spot the new settings will encode quicker and possible yield a slightly more optimised file.

So to summerise for me.

I would say the old adv settings are easier to use to get consistant results, possible more so because its upping the quiality and restricting it with the buffer - giving more room for error.

Where as the new settings could result in some bad encodes if you don't get the CRF slider right (which in some cases will become almost pure guesswork) but possibly a more optimised file.

I will point out that on any movie filling a 16:9 screen from a PAL source that is not cropping any black borders...id be learning towards using the old adv settings file. Why? because the VBV for me is keeping the file within a nice limited file size - i was recieving some encodes for full screen material at 3.3gb with the new settings, which is too big a file for an SD DVD - but if you are looking at a wider aspect ratio in which you can crop those borders off, id ramp the CRF up and go for the new settings.

What are you thoughts on that dynaflash? I would use the new settings all the time - but for me, as mentioned on full screen 16:9 Pal DVD material its sometimes creating huge encodes with very high bitrates i wont get when using VBV...perhaps employ VBV with the new settings just on those type of encodes for the best of both worlds?
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

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

Post by dynaflash »

djdeejay wrote:What are you thoughts on that dynaflash? I would use the new settings all the time - but for me, as mentioned on full screen 16:9 Pal DVD material its sometimes creating huge encodes with very high bitrates i wont get when using VBV...perhaps employ VBV with the new settings just on those type of encodes for the best of both worlds?
Well, here is my thought.

If you use a higher crf % with vbv, you stand a greater chance at getting what amounts to a constant bitrate encode.

crf is calling for more bitrate to maintain the quality level, and vbv is restricting it so that it cannot achieve the quality level it wants which results in the bitrate flattening out. This was always the tightrope we walked using crf w/vbv. Yes, you will get more "consistent and predictable file sizes/bitrates" this way but at the expense of visual quality where crf wants more bitrate.

However, as jbrjake has pointed out, using crf with vbv limits can fly in the face of what crf is all about. crf says maintain a given visual quality bitrate be damned. So, we walk a tightrope.

The settings I mentioned for SD DVD that do not use vbv have, for me provided great looking encodes that do not drop frames on my atv. Unless I get frame drops, I could care less about bitrate / file size. Visual quality is all that matters. Again, for me using those settings is near transparent quality to the dvd source and plays smooth synced to my atv using the the biggest bitrate-spiking source I have, Harry Potter Order of the Phoenix. With other sources ymmv.

I am just starting my tests with HD sources via my eyetv with OTA HD. So far the same settings using up to 56% crf seems to play smooth, though I will lower that to see where my point of quailty drop off is noticeable.
Last edited by dynaflash on Mon Oct 20, 2008 8:39 pm, edited 1 time in total.
Reason: typos
Post Reply