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

Re: AppleTV Custom Presets - 0.9.4

Post by dynaflash »

x166532x wrote:I'm new to blu-ray encodes and advanced strings, but I tried to encode Sherlock over the weekend at 720p with Dynaflash's custom settings and added a vbv buffer and cap. The encode came out a bit choppy on the ATV especially when lots of information was on the screen - like the fight scene at about 18 minutes. Is the choppy image because of the vbv settings? RF was set at 19 BTW.
For HD sources I use an rf of 22 with those settings. Even with that vbv cap the atv can stutter at an rf of 19 ( I have seen stuttering even at 20 with those opts and vbv from an hd source). Those vbv settings were developed for the Built In preset which uses cavlc instead of cabac which is much easier to decode.

As was said an RF of 19 is too high for a blue ray source using those settings.
highjuice

Re: AppleTV Custom Presets - 0.9.4

Post by highjuice »

I've converted the same movie The Man from Earth 1280x720 MKV 4.3GB, twice using the Apple TV and DynaFlash's preset.

Apple TV.m4v = 1.58GB
DynaFlash.m4v = 968MB

That's a hell of a difference in size. The Apple TV preset looked like it produced a better video to me. Maybe only marginally but I don't care about storage.
x166532x
Posts: 25
Joined: Wed Dec 03, 2008 5:05 am

Re: AppleTV Custom Presets - 0.9.4

Post by x166532x »

I tried Sherlock again with the same custom settings and an RF of 21 and still got a choppy image - especially when the camera pans. At this point the image looks comparable to the ATV settings at 540p, so I think I will stick to that until Apple comes out with a new ATV. I think we've reached the end of the capabilities of the older hardware.
A little disappointing - there's always that next hurdle.

I new I shouldn't have bought that Blu-ray player. Sometimes ignorance IS bliss.
nightstrm
Veteran User
Posts: 1887
Joined: Fri Mar 23, 2007 5:43 am

Re: AppleTV Custom Presets - 0.9.4

Post by nightstrm »

x166532x wrote:I tried Sherlock again with the same custom settings and an RF of 21 and still got a choppy image - especially when the camera pans. At this point the image looks comparable to the ATV settings at 540p, so I think I will stick to that until Apple comes out with a new ATV. I think we've reached the end of the capabilities of the older hardware.
A little disappointing - there's always that next hurdle.

I new I shouldn't have bought that Blu-ray player. Sometimes ignorance IS bliss.
What if you use the AppleTV preset (from the latest snapshot) and simply bump the horizontal resolution to 1280? While I don't have this specific source, I have had zero problems with my Bluray/HDDVD encodes streaming to either of my AppleTVs using these settings.
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Re: AppleTV Custom Presets - 0.9.4

Post by dynaflash »

x166532x wrote:I tried Sherlock again with the same custom settings and an RF of 21 and still got a choppy image - especially when the camera pans.
dynaflash wrote: For HD sources I use an rf of 22 with those settings. Even with that vbv cap the atv can stutter at an rf of 19 ( I have seen stuttering even at 20 with those opts and vbv from an hd source). Those vbv settings were developed for the Built In preset which uses cavlc instead of cabac which is much easier to decode.
While 21 is only one away from 22, the difference can be huge. I never told you to use 21. I use between 23 and 22.
x166532x
Posts: 25
Joined: Wed Dec 03, 2008 5:05 am

Re: AppleTV Custom Presets - 0.9.4

Post by x166532x »

What if you use the AppleTV preset (from the latest snapshot) and simply bump the horizontal resolution to 1280? While I don't have this specific source, I have had zero problems with my Bluray/HDDVD encodes streaming to either of my AppleTVs using these settings.
Ya, tried this last night. I haven't really given up yet. It did not work. The image did not stutter as much, but there were some scenes that were unbearable. The resulting file was 3284 kbps (2.96GB), but I ran the file through VLC with the media information window up - and the problematic scenes were jumping from just above 5000 kb/s all the way up to 12000 kb/s. I think I would still need the custom vbv - can I just throw that in there?

Edit: I'm sorry, I am not using the latest snapshot - I am on 0.9.4. Would the latest snapshot be better?
While 21 is only one away from 22, the difference can be huge. I never told you to use 21. I use between 23 and 22.
I understand. I was unhappy with the loss in detail with 21, so I don't want to bother with 22. There is a scene at 12min 50sec that I use as a reference. Its Jude Law's jacket - It's basically just a dark jacket with some sort of horizontal military style pattern - I noticed that with the 540p encode the jacket looked almost all black with no detail, when its more of a dark navy blue with definite horizontal pattern/material. This is probably more of an issue with ATV scaler missing the detail and grayscale when upconverting to 1080p, but the issue is there in a lesser form even when run through VLC. RF 21 was coming close to this - although still much better - I would prefer the detail in the bad encodes.

I realize it's a bit off the subject of this post, but can I just insert a vbv-bufsize=5000 and vbv-maxrate=5000 to the ATV preset and check it out, or is there another setting that must be changed with it?
nightstrm
Veteran User
Posts: 1887
Joined: Fri Mar 23, 2007 5:43 am

Re: AppleTV Custom Presets - 0.9.4

Post by nightstrm »

x166532x wrote:
What if you use the AppleTV preset (from the latest snapshot) and simply bump the horizontal resolution to 1280? While I don't have this specific source, I have had zero problems with my Bluray/HDDVD encodes streaming to either of my AppleTVs using these settings.
Ya, tried this last night. I haven't really given up yet. It did not work. The image did not stutter as much, but there were some scenes that were unbearable. The resulting file was 3284 kbps (2.96GB), but I ran the file through VLC with the media information window up - and the problematic scenes were jumping from just above 5000 kb/s all the way up to 12000 kb/s. I think I would still need the custom vbv - can I just throw that in there?

Edit: I'm sorry, I am not using the latest snapshot - I am on 0.9.4. Would the latest snapshot be better?
While 21 is only one away from 22, the difference can be huge. I never told you to use 21. I use between 23 and 22.
I understand. I was unhappy with the loss in detail with 21, so I don't want to bother with 22. There is a scene at 12min 50sec that I use as a reference. Its Jude Law's jacket - It's basically just a dark jacket with some sort of horizontal military style pattern - I noticed that with the 540p encode the jacket looked almost all black with no detail, when its more of a dark navy blue with definite horizontal pattern/material. This is probably more of an issue with ATV scaler missing the detail and grayscale when upconverting to 1080p, but the issue is there in a lesser form even when run through VLC. RF 21 was coming close to this - although still much better - I would prefer the detail in the bad encodes.

I realize it's a bit off the subject of this post, but can I just insert a vbv-bufsize=5000 and vbv-maxrate=5000 to the ATV preset and check it out, or is there another setting that must be changed with it?
The preset from the latest development snapshot should already have vbv-bufsize and vbv-maxrate defined (vbv-bufsize=9500:vbv-maxrate=9500). Using a value like 5000 would really hurt video quality on Bluray encode (IMO).
x166532x
Posts: 25
Joined: Wed Dec 03, 2008 5:05 am

Re: AppleTV Custom Presets - 0.9.4

Post by x166532x »

I'm going to try the new snapshot tonight. Is RF 20 too high?
nightstrm
Veteran User
Posts: 1887
Joined: Fri Mar 23, 2007 5:43 am

Re: AppleTV Custom Presets - 0.9.4

Post by nightstrm »

x166532x wrote:I'm going to try the new snapshot tonight. Is RF 20 too high?
All of my Bluray/HDDVD encodes are done using the stock AppleTV preset modified to use 1280-width resolution. I've had zero issues streaming these movies from my NAS through my iMac to either of my two AppleTVs (except for maybe the first few seconds while the AppleTV works to fill its buffer).

EDIT: Just remembered, I also use slightly higher vbv-bufsize and vbv-maxrate values (9750). This was leftover from when Dynaflash, myself, and a few others were performing vbv testing in the #handbrake channel and I never bothered to update my preset to use the chosen 9500. While I have not had any problems using 9750, I would recommend using the default 9500.
x166532x
Posts: 25
Joined: Wed Dec 03, 2008 5:05 am

Re: AppleTV Custom Presets - 0.9.4

Post by x166532x »

I re-encoded with the snapshot at the defaults and 1280. The picture came out very good with no stutter.
Thanks for the help.
nightstrm
Veteran User
Posts: 1887
Joined: Fri Mar 23, 2007 5:43 am

Re: AppleTV Custom Presets - 0.9.4

Post by nightstrm »

x166532x wrote:I re-encoded with the snapshot at the defaults and 1280. The picture came out very good with no stutter.
Thanks for the help.
Glad it worked for you.
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 »

highjuice wrote:
DynaFlash.m4v = 968MB
He turned himself into an mpeg4? That's a little bit far for a spare-time project. I wonder how his kids are dealing with it? Plus, for the knowledge Dyna contains, that's a pretty bloated file size. Just sayin'.
:lol:
omni
Posts: 29
Joined: Wed May 21, 2008 12:31 am

Re: AppleTV Custom Presets - 0.9.4

Post by omni »

Been having some problems with stuttering all of a sudden. Unfortunately I have just too many new variables to track this down and hoping someone can point me in the right direction. I used to use windows for all my blu ray stuff, but I've been using all mac here lately so a lot of my pipeline is still being figured out. imac 27" i5 quad core, using MakeMKV to encode to a .mkv file, stripping out all the other junk from the file (subtitles, other audio tracks, other chapters, etc). From there running through handbrake snapshot svn3154 x86_64 (2010030701) using default appleTV preset changed to 23.97, CRF of 22, detelecine and decomb on, changing height to 1280x720, anamorphic turned to off, using Dynaflash's advanced string: 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. When needing to convert from DTS - I've been using Moyea MKVConvertor. Then from there I metaX the file, then add in the .ac3 file/subtitle/create chapter preview jpegs with Subler.

Within the last few weeks I've bought a new iMac, changed to doing this all with OS X and just not sure what is going on. I'm re-encoding a movie from 22 to 22.5 to see if that helps. I"m going to try it next with just the AAC file incase the .ac3 file being generated by moyea is doing something weird? never heard of audio causing stutter though. Any help would be appreciated!!

Here is an encode I did of Two Towers that is stuttering really bad:

Code: Select all

HandBrake Activity Log for /Users/Derek/Desktop/lotr_2_towers.m4v: 2010-05-03 16:26:33 -0700
Handbrake Version: svn3154 x86_64 (2010030701)

[16:26:33] macgui: Rip: Pending queue count is 0
[16:26:33] macgui: scanning specifically for title: 1
[16:26:33] macgui: performNewQueueScan currentQueueEncodeIndex is: 0
[16:26:33] hb_scan: path=/Users/Derek/Movies/THE_LORD_OF_THE_RINGS_THE_TWO_TOWERS/title00.mkv, title_index=1
[16:26:33] scan: trying to open with libdvdread
libdvdnav: Using dvdnav version 4.1.3
libdvdread: Using libdvdcss version 1.2.10 for DVD access
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[16:26:33] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska, from '/Users/Derek/Movies/THE_LORD_OF_THE_RINGS_THE_TWO_TOWERS/title00.mkv':
  Duration: 02:59:25.76, start: 0.000000, bitrate: N/A
    Stream #0.0(eng): Video: vc1, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 23.98 tbr, 1k tbn, 23.98 tbc
    Stream #0.1(eng): Audio: dca, 48000 Hz, 6 channels, s16
[16:26:34] scan: decoding previews for title 1
[16:26:34] scan: audio 0x1: DCA, rate=48000Hz, bitrate=1536000 English (DTS) (5.1 ch)
[16:26:34] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 140/142/0/0, aspect 16:9, PAR 1:1
[16:26:34] scan: title (0) job->width:1920, job->height:800
[16:26:34] libhb: scan thread found 1 valid title(s)
[16:26:34] macgui: ScanDone state received from fQueueEncodeLibhb
[16:26:34] macgui: Preset: AppleTV HD
[16:26:34] macgui: processNewQueueEncode number of passes expected is: 1
[16:26:34] macgui: Start / Stop set to chapters
[16:26:34] macgui: prepareJob exiting
[16:26:34] 1 job(s) to process
[16:26:34] starting job
[16:26:34] sync: expecting 258144 video frames
[16:26:35] job configuration:
[16:26:35]  * source
[16:26:35]    + /Users/Derek/Movies/THE_LORD_OF_THE_RINGS_THE_TWO_TOWERS/title00.mkv
[16:26:35]    + title 1, chapter(s) 1 to 53
[16:26:35]    + container: matroska
[16:26:35]  * destination
[16:26:35]    + /Users/Derek/Desktop/lotr_2_towers.m4v
[16:26:35]    + container: MPEG-4 (.mp4 and .m4v)
[16:26:35]      + 64-bit formatting
[16:26:35]      + chapter markers
[16:26:35]  * video track
[16:26:35]    + decoder: vc1
[16:26:35]    + frame rate: 23.976 fps -> constant 23.976 fps
[16:26:35]    + dimensions: 1920 * 1080 -> 1280 * 528, crop 140/142/0/0
[16:26:35]    + filters
[16:26:35]      + Detelecine (pullup) (default settings)
[16:26:35]      + Decomb (default settings)
[16:26:35]    + encoder: x264
[16:26:35]      + options: 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
[16:26:35]      + quality: 22.00 (RF)
[16:26:35]  * audio track 0
[16:26:35]    + decoder: English (DTS) (5.1 ch) (track 1, id 1)
[16:26:35]      + bitrate: 1536 kbps, samplerate: 48000 Hz
[16:26:35]    + mixdown: Dolby Pro Logic II
[16:26:35]    + encoder: ca_aac
[16:26:35]      + bitrate: 160 kbps, samplerate: 48000 Hz
[16:26:35] yadif thread started for segment 3
[16:26:35] yadif thread started for segment 2
[16:26:35] yadif thread started for segment 0
[16:26:35] yadif thread started for segment 1
[16:26:35] decomb thread started for segment 0
[16:26:35] decomb thread started for segment 1
[16:26:35] decomb thread started for segment 2
[16:26:35] decomb thread started for segment 3
[16:26:35] reader: first SCR 0 id 1 DTS 0
[16:26:35] x264 options: Unknown suboption vbv
[16:26:35] encx264: keyint-min: 24, keyint-max: 240
[16:26:35] encx264: Encoding at constant RF 22.000000
x264 [warning]: VBV bufsize set but maxrate unspecified, ignored
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264 [info]: profile High, level 3.1
Stream with high frequencies VQ coding
[16:31:43] vc1: "Chapter 01" (2) at frame 5973 time 22391100
[16:41:02] vc1: "Chapter 02" (3) at frame 16604 time 62297190
[16:42:02] vc1: "Chapter 03" (4) at frame 17696 time 66396330
[16:44:42] vc1: "Chapter 04" (5) at frame 20801 time 78051690
[16:48:36] vc1: "Chapter 05" (6) at frame 25197 time 94553190
[16:51:51] vc1: "Chapter 06" (7) at frame 29226 time 109677060
[16:52:59] vc1: "Chapter 07" (8) at frame 30524 time 114549390
[16:56:44] vc1: "Chapter 08" (9) at frame 34800 time 130600440
[17:02:00] vc1: "Chapter 09" (10) at frame 40745 time 152916480
[17:05:14] vc1: "Chapter 10" (11) at frame 44383 time 166572630
[17:09:33] vc1: "Chapter 11" (12) at frame 49392 time 185375160
[17:18:06] vc1: "Chapter 12" (13) at frame 59436 time 223077780
[17:24:57] vc1: "Chapter 13" (14) at frame 67508 time 253378080
[17:25:47] vc1: "Chapter 14" (15) at frame 68471 time 256992930
[17:32:16] vc1: "Chapter 15" (16) at frame 76088 time 285585300
[17:46:17] vc1: "Chapter 16" (17) at frame 92596 time 347552190
[17:48:29] vc1: "Chapter 17" (18) at frame 95300 time 357702300
[17:52:23] vc1: "Chapter 18" (19) at frame 99874 time 374871960
[17:54:05] vc1: "Chapter 19" (20) at frame 101936 time 382612230
[17:55:22] vc1: "Chapter 20" (21) at frame 103486 time 388430460
[17:57:30] vc1: "Chapter 21" (22) at frame 105947 time 397668510
[18:00:31] vc1: "Chapter 22" (23) at frame 109555 time 411211980
[18:02:39] macgui: presetSelected mixdown not selected, rerun audioTrackPopUpChanged
[18:02:39] macgui: Preset calls for AC3 Pass thru ...
[18:02:39] macgui: No matching source codec, setting track  2 to None
[18:06:10] vc1: "Chapter 23" (24) at frame 115957 time 435243510
[18:07:24] vc1: "Chapter 24" (25) at frame 117309 time 440318610
[18:12:43] vc1: "Chapter 25" (26) at frame 123759 time 464530230
[18:21:17] vc1: "Chapter 26" (27) at frame 133299 time 500341050
[18:24:18] vc1: "Chapter 27" (28) at frame 136814 time 513535500
[18:27:32] vc1: "Chapter 28" (29) at frame 140566 time 527619510
[18:29:39] vc1: "Chapter 29" (30) at frame 142955 time 536587290
[18:34:04] vc1: "Chapter 30" (31) at frame 148246 time 556448310
[18:37:03] vc1: "Chapter 31" (32) at frame 151746 time 569586510
[18:40:55] vc1: "Chapter 32" (33) at frame 155959 time 585401040
[18:50:44] vc1: "Chapter 33" (34) at frame 166518 time 625036860
[18:58:19] vc1: "Chapter 34" (35) at frame 174508 time 655029360
[19:00:08] vc1: "Chapter 35" (36) at frame 176423 time 662217750
[19:02:52] vc1: "Chapter 36" (37) at frame 179258 time 672859620
[19:05:14] vc1: "Chapter 37" (38) at frame 181769 time 682285320
[19:10:14] vc1: "Chapter 38" (39) at frame 186862 time 701403120
[19:19:34] vc1: "Chapter 39" (40) at frame 195876 time 735239430
[19:21:47] vc1: "Chapter 40" (41) at frame 198258 time 744180930
[19:26:51] vc1: "Chapter 41" (42) at frame 203168 time 762611850
[19:29:12] vc1: "Chapter 42" (43) at frame 205690 time 772078770
[19:37:37] vc1: "Chapter 43" (44) at frame 214248 time 804203370
[19:39:20] vc1: "Chapter 44" (45) at frame 216281 time 811834740
[19:40:03] vc1: "Chapter 45" (46) at frame 217114 time 814961610
[19:42:47] vc1: "Chapter 46" (47) at frame 220380 time 827221320
[19:45:56] vc1: "Chapter 47" (48) at frame 224024 time 840900060
[19:51:51] vc1: "Chapter 48" (49) at frame 230701 time 865963800
[19:55:06] vc1: "Chapter 49" (50) at frame 234254 time 879300900
[20:01:15] vc1: "Chapter 50" (51) at frame 241118 time 905066640
[20:03:21] vc1: "Chapter 51" (52) at frame 243508 time 914038110
[20:06:23] vc1: "Chapter 52" (53) at frame 247021 time 927225000
[20:13:53] reader: done. 1 scr changes
[20:13:55] sync: got 258095 frames, 258144 expected
[20:13:55] work: average encoding speed for job is 18.921312 fps
[20:13:56] vc1-decoder done: 258096 frames, 0 decoder errors, 0 drops
[20:13:56] render: 258094 frames output, 0 dropped and 4 duped for CFR/PFR
[20:13:56] render: lost time: 18810 (5 frames)
[20:13:56] render: gained time: 18810 (20 frames) (0 not accounted for)
[20:13:56] render: average dropped frame duration: 3762
x264 [info]: frame I:2663  Avg QP:19.93  size: 70298  PSNR Mean Y:44.41 U:48.81 V:49.62 Avg:45.44 Global:44.91
x264 [info]: frame P:98084 Avg QP:23.17  size: 18999  PSNR Mean Y:42.61 U:49.00 V:49.16 Avg:43.79 Global:42.82
x264 [info]: frame B:157347 Avg QP:26.43  size:  5862  PSNR Mean Y:41.45 U:48.40 V:48.68 Avg:42.73 Global:42.09
x264 [info]: consecutive B-frames:  2.9% 30.8% 42.7% 23.7%
x264 [info]: mb I  I16..4: 10.8% 58.1% 31.1%
x264 [info]: mb P  I16..4:  2.8%  9.1%  3.5%  P16..4: 40.1% 16.9%  6.4%  0.0%  0.0%    skip:21.1%
x264 [info]: mb B  I16..4:  0.4%  2.0%  0.8%  B16..8: 41.6%  1.7%  1.4%  direct: 3.3%  skip:48.9%  L0:36.8% L1:56.6% BI: 6.6%
x264 [info]: 8x8 transform intra:59.8% inter:54.0%
x264 [info]: coded y,uvDC,uvAC intra: 70.7% 56.6% 19.0% inter: 14.2% 7.4% 0.2%
x264 [info]: i16 v,h,dc,p: 38% 17%  7% 38%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 12% 14%  8% 10% 11% 10% 10% 10%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 14% 13%  8% 11% 11%  9%  8%  6%
x264 [info]: ref P L0: 81.7% 10.8%  7.5%
x264 [info]: ref B L0: 87.6% 12.4%
x264 [info]: SSIM Mean Y:0.9713075
x264 [info]: PSNR Mean Y:41.923 U:48.636 V:48.870 Avg:43.161 Global:42.379 kb/s:2209.50
[20:13:56] mux: track 0, 258094 frames, 2972959004 bytes, 2209.19 kbps, fifo 8
[20:13:56] mux: track 1, 504646 frames, 221075835 bytes, 164.28 kbps, fifo 512
[20:13:56] decomb: deinterlaced 259 | blended 4 | unfiltered 257827 | total 258090
[20:13:56] libhb: work result = 0
Tom
Posts: 2
Joined: Sun May 09, 2010 12:45 pm

Re: AppleTV Custom Presets - 0.9.4

Post by Tom »

Hello everyone.

I should like to preface this post by saying that I have read all of the postings in this thread and the other mentioned at the start.

I am looking to achieve the "best" quality version of my SD DVD library to watch through the Apple TV, preserving the 5.1 sound track. I don't care about file size or encoding speed.

Distilling the posts that I have read I have come up with the following custom settings. However, I am concerned that I might have picked up (more than?) one or two settings that are relevant to HD content, not SD content. Am I somewhere near the mark?

Code: Select all

cabac=0:me=umh:b-adapt=2:weightb=0:weightp=0:subq=9:vbv-bufsize=9500:vbv=maxrate=9500:no-dct-decimate=1:no-fast-pskip=1
wysinawyg
Posts: 19
Joined: Wed Apr 07, 2010 1:03 pm

Re: AppleTV Custom Presets - 0.9.4

Post by wysinawyg »

Doesn't seem great as an advanced string given your statement you don't care about file size or encoding.

cabac=1 or it just shouldn't be on this thread.

Select Strict Anamorphic in the picture settings.

Have a look at dynaflash's linked page to make sure you have all his options then go back through the thread and pick up the Trellis and Psy-RDO (and maybe others) options from VidJock's (apologies if that is spelt wrongly) posts.

Works for me with RF 19 but means bloaty files and my poor new i7 down to only 40 fps. Syncs and plays fine on my iPhone 3GS though so should work on ATV.
Tom
Posts: 2
Joined: Sun May 09, 2010 12:45 pm

Re: AppleTV Custom Presets - 0.9.4

Post by Tom »

Thanks for your reply. cabac=1 is now on as is Strict Anamorphic and I have moved from RF 19.25 to RF19.

Going back though this thread and dynaflash's linked page I took the majority of the settings from a post by Cavalicious » Sat Nov 15, 2008 10:51 pm and a post by Abulia » Wed Nov 26, 2008 5:02 pm.

So my ultimate quality for SD custom settings are now:

Code: Select all

ref=5:bframes=6:subq=9:weightb=0:me=umh:analyse=all:psy-rd=1.0,1.0:no-dct-decimate=1:b-adapt=2:direct=auto:vbv-maxrate=9500:vbv-bufsize=9500:trellis=1:no-fast-pskip=1:merange=24
Have I missed anything?

I will run a trial encode tonight to see what happens.
Deleted User 11865

Re: AppleTV Custom Presets - 0.9.4

Post by Deleted User 11865 »

Tom wrote:

Code: Select all

ref=5:bframes=6:subq=9:weightb=0:me=umh:analyse=all:psy-rd=1.0,1.0:no-dct-decimate=1:b-adapt=2:direct=auto:vbv-maxrate=9500:vbv-bufsize=9500:trellis=1:no-fast-pskip=1:merange=24
Have I missed anything?
Yes. Just look at the first post in this topic.
kav
Posts: 5
Joined: Fri May 28, 2010 4:09 am

Re: AppleTV Custom Presets - 0.9.4

Post by kav »

nightstrm wrote:
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.

First post here.

I've tried dynaflash's settings and quite a few variations on an 1080 mkv -> 720p and STILL get stuttering on my ATV (e.g. the infamous "billion birds" scene in Planet Earth). I'm ready to break and drop the vbv-bufsize down to 2500 but was wondering why, as nightstrm said, "a small value...is not a good idea"?
Deleted User 11865

Re: AppleTV Custom Presets - 0.9.4

Post by Deleted User 11865 »

The Planet Earth scene works fine with the current stock AppleTV preset - with a vbv of 9500,9500. Using different settings (e.g. CABAC) can break this though.
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Re: AppleTV Custom Presets - 0.9.4

Post by dynaflash »

Okay, so finally getting around to playing with some vbv to work with my advanced settings. So far I have found that since we are using cabac, very complex 720p scenes require a lower vbv limit than the built in hb presets vbv-maxrate=9500:vbv-bufsize=9500. Now this only makes sense as cabac is much harder to decode than cavlc. Therefore it only should follow that the atv cannot decode as high of bitrate from cabac as cavlc. Okay so that sucks, *however* using cabac etc. the encodes from the same source come in at a lower overall bitrate using higher profile custom settings, so the ceiling can be lower. Basically the entire bar shifts lower, which after all is one benefit of using custom settings. Lower bitrate/files size at the same visual quality.

Having said that I started working downward on a clip from a 1080p blu ray source scaling down to 720p to work on the atv at rf 22. The scene is from Avatar and has a ton of motion and complexity, its when the avatars first go out on the chopper into the forest. its about two minutes before the helicopter lands which includes the chopper flying over a waterfall (moving water is notorious for creating bitrate spikes) and the chopper lands and all of the vegetation is blowing around. Very "stuttery" without vbv at rf 22 using my preferred settings of

Code: Select all

ref=3:mixed-refs=1:bframes=3:me=hex:subq=7:b-adapt=2:8x8dct=1:weightb=0:trellis=0:weightp=0
Now starting with the stock atv preset vbv for handbrake of

Code: Select all

vbv-maxrate=9500:vbv-bufsize=9500
I noticed that the bitrate from this clip was the same as with no vbv, and as can be expected it stutter just the same. Given those two facts it is reasonable to assume that I was not hitting the vbv cap since hitting the vbv cap of course would drop bitrate from no vbv as the vbv will deny bitrate if it hits the limit on those scenes.

So in the interest of getting in the ballpark I started retesting dropping in 1000 kbps increments for both maxrate and bufsize. Each time checking output file bitrate then of course doing a visual test on the atv to try to find out when the vbv capped bitrate and as well when it capped it enough to stop the stuttering.

Finally when it got to:

Code: Select all

vbv-maxrate=5000:vbv-bufsize=5000
The stuttering went away. Played smooth like butter. Now these are quite broad strokes actually as vbv can be tuned between maxrate and bufsize to zero in closer to the ragged edge. I have not gone into further fine tuning yet, but right now on hd material I use

Code: Select all

ref=3:mixed-refs=1:bframes=3:me=hex:subq=7:b-adapt=2:8x8dct=1:weightb=0:trellis=0:weightp=0:vbv-maxrate=5000:vbv-bufsize=5000
Running the same opts without vbv on a few of my tough sources tends to yield very little overall bitrate change over the entire course of the feature, but does smooth out those "rough spots". Further testing is on my to do list but for now this is what I am using. As always YMMV. Take it for what its worth. :)
milescortez

Re: AppleTV Custom Presets - 0.9.4

Post by milescortez »

First let me say how thankful I am to have found this forum/thread and guys like dynaflash that spend so much time helping out other people. i only wish I had found this earlier before I wasted countless hours encoding movies that look horrible on my Apple TV hooked up to a 52 inch 1080p LCD.

So I am trying this again with Dynaflash's custom string he posted on 5/28. If I have this right it's just the Apple TV presets with the custom string---is that right? With previous HD conversions of something like Toy Story 2 (m2ts file) I get stuttering, large square pixeling (I forget the term for this---is it artifacting?) and changes in shading (light then dark or vice versa).

I will report back the results. Thanks again to all the folks in here who are helping.
rudiger
Posts: 2
Joined: Mon Nov 24, 2008 3:30 am

Re: AppleTV Custom Presets - 0.9.4

Post by rudiger »

dynaflash wrote:The stuttering went away. Played smooth like butter. Now these are quite broad strokes actually as vbv can be tuned between maxrate and bufsize to zero in closer to the ragged edge. I have not gone into further fine tuning yet, but right now on hd material I use

Code: Select all

ref=3:mixed-refs=1:bframes=3:me=hex:subq=7:b-adapt=2:8x8dct=1:weightb=0:trellis=0:weightp=0:vbv-maxrate=5000:vbv-bufsize=5000
Running the same opts without vbv on a few of my tough sources tends to yield very little overall bitrate change over the entire course of the feature, but does smooth out those "rough spots". Further testing is on my to do list but for now this is what I am using. As always YMMV. Take it for what its worth. :)
Thank you for sharing dynaflash. Using your settings, Avatar looks much smoother now.
Last edited by dynaflash on Mon Jun 07, 2010 4:35 pm, edited 1 time in total.
Reason: Fixed quote blocks
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Re: AppleTV Custom Presets - 0.9.4

Post by dynaflash »

Okay, Great! But as I said in the initial post its broad strokes. Am hoping to refine further.

vbv-maxsize and vbv-bufsize can be hard to really pinpoint unless the device mfg. specifies the video buffer verifier ... they almost never do. The AppleTV is a total black box. Hence the need for much testing. Though I believe at this point that if anything I am on the conservative side. But time will tell. That Avatar scene is a tough one.

Someone really should run these in a streaming environment. Note that all of my tests are done on my eSata modded atv in a syncing environment. I have no reason to think they would not work with streaming but in the interest of complete testing results it would be prudent.

An Aside: People always ask why we do not provide presets for x, y and z. It's because a developer, tester or fervent user has not continued to test, retest and offer empirical evidence as its discovered as new options and advancements are introduced. It so happens that I am a very involved AppleTV user. So as new features come along, etc. I tend to test them against the atv as best I can. Sharing this is easy. Testing is time consuming in some cases, but its a selfish means to an end. I use my atv so regularly there are no set top box besides cable attached to my two flat panel tv's. *If* more users of other devices spent as much time dedicating time to their playback device of choice it would only benefit that community. But again just an aside.
DriverJC
Posts: 9
Joined: Thu Jun 03, 2010 3:32 pm

Re: AppleTV Custom Presets - 0.9.4

Post by DriverJC »

dynaflash: Someone really should run these in a streaming environment. Note that all of my tests are done on my eSata modded atv in a syncing environment. I have no reason to think they would not work with streaming but in the interest of complete testing results it would be prudent.
I use two Mini Mac's to stream files through the network to my AppleTV's (one has content that I do not want other rooms in the house to get to)
I used the following settings to encode an HD file and then stream it through my network to the AppleTV in the bedroom. This file played beautifully, no stutters, no skips, and no pauses. I then used my second ATV to stream a completely different file at the same time. The video never even stuttered like it would do on the appletv preset.

Code: Select all

-e x264 -q 23.0 -a 1,1 -E ca_aac,ac3 -B 160,160 -6 dpl2,auto -R 48,Auto -D 0.0,0.0 -f mp4 -4 -X 960 -M 709 --loose-anamorphic -m -x ref=3:mixed-refs=1:bframes=3:me=hex:subq=7:b-adapt=2:8x8dct=1:weightb=0:trellis=0:weightp=0:vbv-maxrate=5000:vbv-bufsize=5000
File scan by Handbrake is attached below

Code: Select all

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'imputfile.m4v':
  Duration: 00:29:24.61, start: 0.-66778, bitrate: 1879 kb/s
    Stream #0.0(und): Video: h264, yuv420p, 960x544 [PAR 967:960 DAR 967:544], 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16
    Stream #0.2(und): Subtitle: text / 0x74786574
[14:12:17] scan: decoding previews for title 1
Scanning title 1 of 1...
Scanning title 1 of 1...
[14:12:18] scan: 10 previews, 960x544, 29.969 fps, autocrop = 0/0/0/0, aspect 1.78:1, PAR 967:960
[14:12:18] scan: title (0) job->width:960, job->height:544
[14:12:18] libhb: scan thread found 1 valid title(s)
+ title 1:
  + vts 0, ttn 0, cells 0->0 (0 blocks)
  + angle(s) 0
  + duration: 00:29:24
  + size: 960x544, pixel aspect: 967/960, display aspect: 1.78, 29.969 fps
  + autocrop: 0/0/0/0
  + chapters:
    + 1: cells 0->0, 0 blocks, duration 00:29:24
  + audio tracks:
    + 1, English (AAC) (iso639-2: eng)
  + subtitle tracks:
HandBrake has exited.
I'm going to attempt one at -X 1080 to see if it is better
will let you know
joel
milescortez

Re: AppleTV Custom Presets - 0.9.4

Post by milescortez »

Ok--Now I am stumped. Suddenly everything that I am encoding using the Dynaflash HD setting from 5/28 is coming up with the error message "was not copied to the ATV because it cannot be played on this ATV". I am using the custom string and the standard ATV settings with RF set to 22.5. I am getting this error on HD MKV files that are encoding including Toy Story 2, Avatar and District 9, among others. Basically everything that I've tried recently fails. Any ideas? Thanks in advance.
Post Reply