AppleTV Custom Presets - 0.9.4
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.
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.
-
- Enlightened
- Posts: 100
- Joined: Wed Nov 05, 2008 9:03 pm
Re: AppleTV Custom Presets - 0.9.4
Ok so public 0.9.4 has the options can you confirm dynaflash the exact advanced string to paste in to the AppleTV preset then please for quality/speed
Cheers
Cheers
Re: AppleTV Custom Presets - 0.9.4
Well, speed and quality are relative. Here is what I use:
I discuss it here: http://dynaflashtech.net/2010/06/30/han ... ng-part-2/
Code: Select all
mixed-refs=1:b-adapt=2:b-pyramid=none:trellis=0:weightp=0:vbv-maxrate=5500:vbv-bufsize=5500
-
- Enlightened
- Posts: 100
- Joined: Wed Nov 05, 2008 9:03 pm
Re: AppleTV Custom Presets - 0.9.4
When I looked in the AppleTV standard preset advanced tab it already had some code, do I add your string to the end of it, or copy over it please?dynaflash wrote:Well, speed and quality are relative. Here is what I use:I discuss it here: http://dynaflashtech.net/2010/06/30/han ... ng-part-2/Code: Select all
mixed-refs=1:b-adapt=2:b-pyramid=none:trellis=0:weightp=0:vbv-maxrate=5500:vbv-bufsize=5500
cheers
Re: AppleTV Custom Presets - 0.9.4
Replace the existing string with the one I posted.
Re: AppleTV Custom Presets - 0.9.4
im guessing the new apple tv wont need any birate restrictions like the old one and will be able to play bck much higher qaulity 720p content?
thanks
thanks
Re: AppleTV Custom Presets - 0.9.4
yes, you are probably right. But as always, til I have mine in hand its just a guess.
Re: AppleTV Custom Presets - 0.9.4
The number of A4-based devices already available makes it an easy guess. AFAICT from my iPhone 4 testing (where 720p with 30 Mbps average plays fine), the quality of the network connection will be more important than local bitrate spike limits.dynaflash wrote:yes, you are probably right. But as always, til I have mine in hand its just a guess.
But maybe vbv will indeed be required to ensure smooth streaming?
Re: AppleTV Custom Presets - 0.9.4
dynaflash, using your custom settings you have on your blog result in choppy play back on the Apple TV streamed or copied to the HDD. Using a nightly build of the current stable 0.9.4
When the picture moves fast it's like it's dropping frames.
When the picture moves fast it's like it's dropping frames.
Re: AppleTV Custom Presets - 0.9.4
Have we settled on encoding settings for the new Apple TV yet? I've basically gone with high profile defaults while adding vbv-maxrate=13000:vbv-bufsize=13000 to the x264 options since the stated limit is 14 mbps. In testing with a couple of files this works OK on my iPad so the Apple TV is likely to work too.
Re: AppleTV Custom Presets - 0.9.4
Interesting. Stated where?Firelight wrote:I've basically gone with high profile defaults while adding vbv-maxrate=13000:vbv-bufsize=13000 to the x264 options since the stated limit is 14 mbps.
Re: AppleTV Custom Presets - 0.9.4
I've seen it stated in a number of places while researching x264 options for the A4. I think it might just be implied by the Main Profile lvl 3.1 support.
Re: AppleTV Custom Presets - 0.9.4
Oh, right: http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#LevelsFirelight wrote:I've seen it stated in a number of places while researching x264 options for the A4. I think it might just be implied by the Main Profile lvl 3.1 support.
FWIW, the iPd and iPhone 4 support High Profile, and I've played videos on my iPhone 4 where the average bitrate (and therfore peak bitrate) far exceeded 14 Mbps (around 30 Mbps, IIRC).
Re: AppleTV Custom Presets - 0.9.4
Wow ... if you went that high then it seems the margin for safety is very large. I'm just a bit worried at the thought of doing some mass encoding and ending up with something incompatible. The Apple TV is also streaming so that might put a more serious strain on the parameters if Apple isn't careful with the streaming implementation ... but we need to see the device in hand to be certain.
Re: AppleTV Custom Presets - 0.9.4
Well, here's the code snippet in java that I'm using to generate my Apple TV (2010) encodes:
In plain English, I run a script before hand that selects the proper source DTS track and converts it to AC3 using the following linked mkvdts2ac3 script. http://forums.macrumors.com/showthread.php?t=836043
The actual run of HandBrake uses the high profile preset and applies strict anamorphic if the dimensions fit within 720p. Otherwise, it uses loose-anamorphic to allow resizing to 720p. It also tries to pass through all markers and subtitles. I have vbv settings at 14000 due to the apple specs but it's almost certain we can go much higher. Practically speaking tho I'm not sure a peak bitrate higher than 14000 is going to be visible anyway, so I've left it in. I also cap the framerate at 29.97 which really shouldn't ever be a problem, but just in case. Both a stereo and AC3 surround track are generated from the proper selected audio track (again, parsed via script). I boosted the stereo track with DRC = 1.5 because I have frequent problems hearing encodes in even slightly noisy environments on the iPad. The AC3 track is there for high fidelity in home theater environments anyway.
Hope someone finds this useful. In general the A4 chip is really lenient on encodes so ending up at these settings wasn't much of a stretch. I messed around with a lot of quality options and found nothing really perceptible to me, so I stuck with the high profile defaults as a baseline.
In plain English, I run a script before hand that selects the proper source DTS track and converts it to AC3 using the following linked mkvdts2ac3 script. http://forums.macrumors.com/showthread.php?t=836043
The actual run of HandBrake uses the high profile preset and applies strict anamorphic if the dimensions fit within 720p. Otherwise, it uses loose-anamorphic to allow resizing to 720p. It also tries to pass through all markers and subtitles. I have vbv settings at 14000 due to the apple specs but it's almost certain we can go much higher. Practically speaking tho I'm not sure a peak bitrate higher than 14000 is going to be visible anyway, so I've left it in. I also cap the framerate at 29.97 which really shouldn't ever be a problem, but just in case. Both a stereo and AC3 surround track are generated from the proper selected audio track (again, parsed via script). I boosted the stereo track with DRC = 1.5 because I have frequent problems hearing encodes in even slightly noisy environments on the iPad. The AC3 track is there for high fidelity in home theater environments anyway.
Hope someone finds this useful. In general the A4 chip is really lenient on encodes so ending up at these settings wasn't much of a stretch. I messed around with a lot of quality options and found nothing really perceptible to me, so I stuck with the high profile defaults as a baseline.
Code: Select all
bStrictAnamorphic = true;
if( xRes > 1280 || yRes > 720 ) {
bStrictAnamorphic = false;
}
cmdArgs = new ArrayList<String>();
cmdArgs.add( handbrakePath );
cmdArgs.add( "--verbose" );
cmdArgs.add( "1" );
cmdArgs.add( "--input" );
cmdArgs.add( sourceFilename );
cmdArgs.add( "--output" );
cmdArgs.add( targetFilename );
cmdArgs.add( "--format" );
cmdArgs.add( "mp4" );
cmdArgs.add( "--crop" );
cmdArgs.add( "0:0:0:0" );
cmdArgs.add( "--quality" );
cmdArgs.add( "20" );
cmdArgs.add( "--pfr" );
cmdArgs.add( "--rate" );
cmdArgs.add( "29.97" );
cmdArgs.add( "--x264opts" );
cmdArgs.add( "--encoder" );
cmdArgs.add( "x264" );
// default high profile settings ... LGTM!
cmdArgs.add( "b-adapt=2:rc-lookahead=50:vbv-maxrate=14000:vbv-bufsize=14000" );
// really slow setting ... probably too aggressive. I couldn't tell any difference in quality
// cmdArgs.add( "cabac=1:ref=5:mixed-refs=1:b-adapt=2:bframes=5:no-fast-pskip=1:b-pyramid=normal:trellis=2:weightp=2:vbv-maxrate=12500:vbv-bufsize=12500" );
cmdArgs.add( "--audio" );
if( audioTrack != -1 ) {
cmdArgs.add( String.format("%d,%d", audioTrack, audioTrack) );
}
else {
cmdArgs.add( "1,1" );
}
cmdArgs.add( "--aencoder" );
cmdArgs.add( "ca_aac,ac3" );
cmdArgs.add( "--mixdown" );
cmdArgs.add( "dpl2,auto" );
cmdArgs.add( "--arate" );
cmdArgs.add( "48,Auto" );
cmdArgs.add( "--ab" );
cmdArgs.add( "224,auto" );
cmdArgs.add( "--drc" );
cmdArgs.add( "1.5,0.0" );
cmdArgs.add( "--subtitle" );
cmdArgs.add( "1,2,3,4,5,6,7,8,9,10" );
if( bStrictAnamorphic == true ) {
cmdArgs.add( "--strict-anamorphic" );
}
else {
cmdArgs.add( "--loose-anamorphic" );
cmdArgs.add( "--modulus" );
cmdArgs.add( "4" );
cmdArgs.add( "--width" );
cmdArgs.add( "1280" );
cmdArgs.add( "--maxWidth" );
cmdArgs.add( "1280" );
cmdArgs.add( "--maxHeight" );
cmdArgs.add( "720" );
}
cmdArgs.add( "--markers" );
cmdArgs.add( "--large-file" );
Re: AppleTV Custom Presets - 0.9.4
That can't be right. The options string is an argument to --x264opts.Firelight wrote:Code: Select all
cmdArgs.add( "--x264opts" ); cmdArgs.add( "--encoder" ); cmdArgs.add( "x264" ); // default high profile settings ... LGTM! cmdArgs.add( "b-adapt=2:rc-lookahead=50:vbv-maxrate=14000:vbv-bufsize=14000" ); // really slow setting ... probably too aggressive. I couldn't tell any difference in quality // cmdArgs.add( "cabac=1:ref=5:mixed-refs=1:b-adapt=2:bframes=5:no-fast-pskip=1:b-pyramid=normal:trellis=2:weightp=2:vbv-maxrate=12500:vbv-bufsize=12500" );
Re: AppleTV Custom Presets - 0.9.4
Converting DTS or AAC 5.1 to AC3 for the Apple TV is so simple with MKVTOOLS no need to install all them application.
http://www.emmgunn.com/mokgvm2dvd/mokgvmhome.html
http://www.emmgunn.com/mokgvm2dvd/mokgvmhome.html
Re: AppleTV Custom Presets - 0.9.4
Good catch ... I messed that up when I was cutting and pasting things around yesterday to get ready for the Apple TV 2010 arriving. Well, anyway, you get the idea.Rodeo wrote:That can't be right. The options string is an argument to --x264opts.Firelight wrote:Code: Select all
cmdArgs.add( "--x264opts" ); cmdArgs.add( "--encoder" ); cmdArgs.add( "x264" ); // default high profile settings ... LGTM! cmdArgs.add( "b-adapt=2:rc-lookahead=50:vbv-maxrate=14000:vbv-bufsize=14000" ); // really slow setting ... probably too aggressive. I couldn't tell any difference in quality // cmdArgs.add( "cabac=1:ref=5:mixed-refs=1:b-adapt=2:bframes=5:no-fast-pskip=1:b-pyramid=normal:trellis=2:weightp=2:vbv-maxrate=12500:vbv-bufsize=12500" );
Re: AppleTV Custom Presets - 0.9.4
Did the settings for best ATV2 ever get determined;
I've had my ATV2 now for a while and the previous encodes I used don't work well at all (can't keep up with the bit-rate) (RF20) and
cabac=0:ref=2:me=umh:b-adapt=2:weightb=0:trellis=0:weightp=0
ken
I've had my ATV2 now for a while and the previous encodes I used don't work well at all (can't keep up with the bit-rate) (RF20) and
cabac=0:ref=2:me=umh:b-adapt=2:weightb=0:trellis=0:weightp=0
ken
Re: AppleTV Custom Presets - 0.9.4
I been using the High Profile Preset with fantastic results. I don't think you could do much better than the HighProfile preset.
Re: AppleTV Custom Presets - 0.9.4
I'm trying High Profile again (with large file size checked);
I haven't seen any posts on this, maybe I'm just missing it somewhere; But is it known to the forum that the AppleTV preset (.9.4) produces files that the new AppleTV 2 cannot keep up with? (I have to drop to Average bitrate setting -2500 or less); [These are BD 1080p that I downrez via Picture Settings to 720, starting with the AppleTV preset];
ken
I haven't seen any posts on this, maybe I'm just missing it somewhere; But is it known to the forum that the AppleTV preset (.9.4) produces files that the new AppleTV 2 cannot keep up with? (I have to drop to Average bitrate setting -2500 or less); [These are BD 1080p that I downrez via Picture Settings to 720, starting with the AppleTV preset];
ken
Re: AppleTV Custom Presets - 0.9.4
The stuttering issue is widely reported; wait until the whole movie syncs before playing.kenliles wrote:I'm trying High Profile again (with large file size checked);
I haven't seen any posts on this, maybe I'm just missing it somewhere; But is it known to the forum that the AppleTV preset (.9.4) produces files that the new AppleTV 2 cannot keep up with? (I have to drop to Average bitrate setting -2500 or less); [These are BD 1080p that I downrez via Picture Settings to 720, starting with the AppleTV preset];
Re: AppleTV Custom Presets - 0.9.4
A lot of the stuttering reports that I've seen say that the problem starts once the movie has fully copied onto the AppleTV v2. I have confirmed this in my own testing, but the issue presents itself very infrequently. I can't think of any setting in the .9.4 AppleTV preset that would prevent the new AppleTV from streaming reliably (save the infrequent dropped frames).mduell wrote:The stuttering issue is widely reported; wait until the whole movie syncs before playing.kenliles wrote:I'm trying High Profile again (with large file size checked);
I haven't seen any posts on this, maybe I'm just missing it somewhere; But is it known to the forum that the AppleTV preset (.9.4) produces files that the new AppleTV 2 cannot keep up with? (I have to drop to Average bitrate setting -2500 or less); [These are BD 1080p that I downrez via Picture Settings to 720, starting with the AppleTV preset];
Re: AppleTV Custom Presets - 0.9.4
yes- that somewhat correlates; On most movies it take some time to develop, but that time varies greatly.
The problem does NOT exist however for HD movies purchased from iTunes;
Only those genned from HB (and only HD level 720p); And it's every single one of those.
Also, it's not a stuttering (as in dropped frames); the picture actually slows to point that it runs in a sort of slow-motion, completely losing sync with the audio that stays current to real-time play (by seconds and minutes - not lip-sync issues);
Anyway - it sounds like these problems are not occurring for other folks, so I'm wondering if it's with my ATV; Everything else works about it though - and when I regen HD files using 2500 average bitrate, they work fine;
hmmm... I don't get it
ken
The problem does NOT exist however for HD movies purchased from iTunes;
Only those genned from HB (and only HD level 720p); And it's every single one of those.
Also, it's not a stuttering (as in dropped frames); the picture actually slows to point that it runs in a sort of slow-motion, completely losing sync with the audio that stays current to real-time play (by seconds and minutes - not lip-sync issues);
Anyway - it sounds like these problems are not occurring for other folks, so I'm wondering if it's with my ATV; Everything else works about it though - and when I regen HD files using 2500 average bitrate, they work fine;
hmmm... I don't get it
ken
Re: AppleTV Custom Presets - 0.9.4
I doubt very much this stuttering video is being caused by Handbrake.
It's been reported to be happening to movies from the iTunes store as well.
I feel that it's an issue with the refresh rate of the Apple TV with certain TV scalers. . I think all the stuttering problems are being caused by different pulldown ratios with different tv scalers over the HDMIs
It's been reported to be happening to movies from the iTunes store as well.
I feel that it's an issue with the refresh rate of the Apple TV with certain TV scalers. . I think all the stuttering problems are being caused by different pulldown ratios with different tv scalers over the HDMIs
Re: AppleTV Custom Presets - 0.9.4
I never thought the issue was with HB actually, but something in the ATV2; My ATV1 played these same files fine, so was assuming the problem was with the ATV2, but was looking for necessary HB adjustments to make it work. One of those adjustments is to encode with Average Bit-rate 2500 or less - that works, and that's what I will do until something else is fixed (unless I can find a better HB setting).
I agree with you, I think it's something to do with the ATV2 HDMI scaling because there's more raw power there than we had before (ATV1). and the effect I'm seeing is not really frame drop - it's a more serious syncing or bit-rate correlation mismatch issue. I use a Lumagen to rescale the output to the TV native, but it uses the hdmi handshaking with ATV2 to accomplish like any TV or other scaler would.
ken
I agree with you, I think it's something to do with the ATV2 HDMI scaling because there's more raw power there than we had before (ATV1). and the effect I'm seeing is not really frame drop - it's a more serious syncing or bit-rate correlation mismatch issue. I use a Lumagen to rescale the output to the TV native, but it uses the hdmi handshaking with ATV2 to accomplish like any TV or other scaler would.
ken