Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

macbot

macrumors newbie
Original poster
Nov 30, 2010
14
0
I need help testing my encode settings for Apple TV2.

It's a clip from a theatrical release and only 5 minutes long. Here is a link the .M4V file:

http://www.megaupload.com/?d=IBTMEQ9H

On my XMas list is an Apple TV2. I currently have a Mac Mini (Core 2 Duo 2.0ghz) setup as a media center on my main TV. I would like to add an Apple TV2 to a second TV.

I have some Handbrake encode settings that work really well on both the Mini using Front Row and the iPad. Before encoding a bunch of DVDs, I want to make sure my settings are compatible with streaming to the Apple TV2 as well.

I'm hoping there aren't any issues with dropped frames. If there aren't, I would also like to see if someone could stream the clip AND play an additional movie locally on the serving computer (through itunes/frontrow) at the same time. Finally I'd like to make sure the metadata shows up on the Apple TV 2 (poster art, description, etc.).

Thanks!
 

Icculus

macrumors 6502
Jun 2, 2007
380
62
Frisco, TX
I need help testing my encode settings for Apple TV2.

It's a clip from a theatrical release and only 5 minutes long. Here is a link the .M4V file:

http://www.megaupload.com/?d=IBTMEQ9H

On my XMas list is an Apple TV2. I currently have a Mac Mini (Core 2 Duo 2.0ghz) setup as a media center on my main TV. I would like to add an Apple TV2 to a second TV.

I have some Handbrake encode settings that work really well on both the Mini using Front Row and the iPad. Before encoding a bunch of DVDs, I want to make sure my settings are compatible with streaming to the Apple TV2 as well.

I'm hoping there aren't any issues with dropped frames. If there aren't, I would also like to see if someone could stream the clip AND play an additional movie locally on the serving computer (through itunes/frontrow) at the same time. Finally I'd like to make sure the metadata shows up on the Apple TV 2 (poster art, description, etc.).

Thanks!

I am downloading the file now and will gladly test for you! I bought my ATV2 the day it came out, and I am in the same boat you are with Handbrake. I just got done with all my movies, those were easy. Now I am on to concerts (300+ DVD's) and the setting I was using for movies is inflating my concerts to 3gb+ in size. Some of the DVD's are only 1.7GB in size but the M4V comes out to 3GB. Very odd, I think I might have to stop using the RF setting and going back to static bitrate, as much as I don't want to I don't see a choice. Anyways I will get back to you in 15 minutes or so after I test this.
 

Icculus

macrumors 6502
Jun 2, 2007
380
62
Frisco, TX
Test Machine (iTunes Server)
Mac Pro - 2.66 Quad-Core Intel Xeon
12gb RAM

I was watching The Dark Knight on my Mac Pro (digital download from iTunes, bitrate of 2500 or around there.) I was copying from both my DVD drives to my HD AND I was streaming your movie (awesome choice!) with no problem. I watched it very closely and did not see any dropped frames, quality looked good on my 37" LCD. I did not have time to test it on my 62" TV but I am sure it would have been fine, all your metadata and artwork is there as well. Looks great, good job!

Now you are making me want to take the rest of the day off and watch big trouble in little china...DAMN YOU!!

EDIT: Forgot to tell you everything in my house is wired.
 

macbot

macrumors newbie
Original poster
Nov 30, 2010
14
0
Test Machine (iTunes Server)
Mac Pro - 2.66 Quad-Core Intel Xeon
12gb RAM

I was watching The Dark Knight on my Mac Pro (digital download from iTunes, bitrate of 2500 or around there.) I was copying from both my DVD drives to my HD AND I was streaming your movie (awesome choice!) with no problem. I watched it very closely and did not see any dropped frames, quality looked good on my 37" LCD. I did not have time to test it on my 62" TV but I am sure it would have been fine, all your metadata and artwork is there as well. Looks great, good job!

Now you are making me want to take the rest of the day off and watch big trouble in little china...DAMN YOU!!

EDIT: Forgot to tell you everything in my house is wired.

LOL!!! Big Trouble In Little China and Prince Of Darkness are my favorite John Carpenter movies. He's done a ton of great flicks though. Who can forget They Live? Another Carpenter masterpiece.

Thanks for testing it out Icculus. That's a pretty good stress test. I see your on a wired network. I'm currently running wireless-G, but thinking about bumping up to wireless-N with an Airport Extreme. Hopefully someone with a wireless setup will try it out and let me know how it fares. My biggest concern though was that the Apple TV2 actually play the encode and that's a good confirmation.

The encode settings are are CRF with a RF=18 and a ton of x264 options turned on. I've found that on a lot of noisy sources, such as older films where the grain is really pronounced, or bad transfers (kung-fu flick are a good example) that if I turn the deblocking higher (like 1,1) it seems to help keep the file size under control. Probably because it blurs the offending parts a bit and makes the encode less work. It's not 100%, but does work on a lot of stuff.

If you like I can export my settings and post a link if you want to try them out. They work really well on nearly everything expect for scenes with lots of clouds or fog, or underwater scenes. Clouds and fog, you have took look closely, but you can sometimes see some artifacts. Underwater is the biggest offender as it gets a weird stepping or banding if the transitions are too much for it. I think it might be the scaling to my TV's 1080p as it's not as bad on the iPad and its smaller screen.
 

macbot

macrumors newbie
Original poster
Nov 30, 2010
14
0
This part is KEY. I had my ATV2 set up wireless and load times, network dropping and crashing were so unbearable that I decided to wire it.
Now all works fine.

Were you on wireless-G or N? Any other problems with other devices on your network of just the Apple TV?

Is dropping wireless a general problem with the Apple TV?
 

Icculus

macrumors 6502
Jun 2, 2007
380
62
Frisco, TX
LOL!!! Big Trouble In Little China and Prince Of Darkness are my favorite John Carpenter movies. He's done a ton of great flicks though. Who can forget They Live? Another Carpenter masterpiece.

Thanks for testing it out Icculus. That's a pretty good stress test. I see your on a wired network. I'm currently running wireless-G, but thinking about bumping up to wireless-N with an Airport Extreme. Hopefully someone with a wireless setup will try it out and let me know how it fares. My biggest concern though was that the Apple TV2 actually play the encode and that's a good confirmation.

The encode settings are are CRF with a RF=18 and a ton of x264 options turned on. I've found that on a lot of noisy sources, such as older films where the grain is really pronounced, or bad transfers (kung-fu flick are a good example) that if I turn the deblocking higher (like 1,1) it seems to help keep the file size under control. Probably because it blurs the offending parts a bit and makes the encode less work. It's not 100%, but does work on a lot of stuff.

If you like I can export my settings and post a link if you want to try them out. They work really well on nearly everything expect for scenes with lots of clouds or fog, or underwater scenes. Clouds and fog, you have took look closely, but you can sometimes see some artifacts. Underwater is the biggest offender as it gets a weird stepping or banding if the transitions are too much for it. I think it might be the scaling to my TV's 1080p as it's not as bad on the iPad and its smaller screen.

Never seen Prince of Darkness, been on my "To Do" list for a while just haven't gotten around to. 2 Kiddos makes my life pretty busy, but one of these days I will get to it. Still jonesing to watch Big Trouble though, curse you for ripping THAT movie. Why couldn't it be something I hate (but then I probably wouldn't have watched so closely!) If I have time and no-one else has done it yet I will test wireless. We have dinner plans tonight so it will be later this weekend, IF I have time.

As for my preset I am using the default High Profile (using the latest nightly build of course) with the RF setting at 19. This worked for all of our movies and they look awesome. However concert rips which are usually amateur shot so at times they can be jerky, the files are just to big. I did a quick test tonight of a Allman Brothers concert from the 70's using my RF 19 preset, and one at the same preset but using 1600KBPS. The files ranged from 1.07gb to 2.3gb, and I was unable to tell ANY difference in the file. So I am not sure how to proceed yet but I am leaning towards just doing 1600KBPS. Would you have any advice to go higher/lower with that setting? I just want to do 1 rip that is good for our 60", ipads, iphone, etc. Just trying to figure this out...driving me crazy. I have almost 400 DVD's ripped to my HD (almost 2TB of data!) and about to get ready to load up the queue and hit start just need to do a little more tweaking.

Thanks for offering to send your preset, but all my movies are ripped and it seems for my concert rips I have to change up my preset. Any advice you got on this is GLADLY welcomed. Have a great night!
 

Icculus

macrumors 6502
Jun 2, 2007
380
62
Frisco, TX
LOL!!! Big Trouble In Little China and Prince Of Darkness are my favorite John Carpenter movies. He's done a ton of great flicks though. Who can forget They Live? Another Carpenter masterpiece.

Thanks for testing it out Icculus. That's a pretty good stress test. I see your on a wired network. I'm currently running wireless-G, but thinking about bumping up to wireless-N with an Airport Extreme. Hopefully someone with a wireless setup will try it out and let me know how it fares. My biggest concern though was that the Apple TV2 actually play the encode and that's a good confirmation.

The encode settings are are CRF with a RF=18 and a ton of x264 options turned on. I've found that on a lot of noisy sources, such as older films where the grain is really pronounced, or bad transfers (kung-fu flick are a good example) that if I turn the deblocking higher (like 1,1) it seems to help keep the file size under control. Probably because it blurs the offending parts a bit and makes the encode less work. It's not 100%, but does work on a lot of stuff.

If you like I can export my settings and post a link if you want to try them out. They work really well on nearly everything expect for scenes with lots of clouds or fog, or underwater scenes. Clouds and fog, you have took look closely, but you can sometimes see some artifacts. Underwater is the biggest offender as it gets a weird stepping or banding if the transitions are too much for it. I think it might be the scaling to my TV's 1080p as it's not as bad on the iPad and its smaller screen.

I read your post too fast, I will take you up on that preset. It sounds like it could really help these concert rips. Because obviously I want to try to keep the RF setting instead of just saying 1600kbps. Because it could compress the files better, obviously. So yeah if you don't mind send me a PM and I will shoot you my e-mail address. Thanks man!!

They Live...priceless.
 

macbot

macrumors newbie
Original poster
Nov 30, 2010
14
0
I read your post too fast, I will take you up on that preset. It sounds like it could really help these concert rips. Because obviously I want to try to keep the RF setting instead of just saying 1600kbps. Because it could compress the files better, obviously. ... Thanks man!!

No problem. Here's a link to the presets:

http://www.mediafire.com/?aqiomvtd6zw7a84


There are four custom presets in the file. There are two main ones: 'High Profile 64% CRF' and 'High Profile 2500 kbps'. Then there are two labled 'Deblock' that use a deblock setting of 1,1 but are otherwise exactly the same as the ones listed.

As far as quality goes I think the biggest factor has been using CABAC and also using 'No DCT Decimate' for CRF encodes. I also give Handbrake more latitude to search through the video with higher settings for motion estimation. I don't pump up the Reference frames (they are only at 3) because they don't seem to make a big difference in SD material -- at least what I can tell.

For the concert stuff, I think using the deblocking might smooth out some of the quality issues. I've got it set to 1,1, but you might try 1,2 or 2,1 and see if it makes a difference in size and encode time. If the CRF setting doesn't work, you can cap it using a constant bitrate the 2500kbps setting I have. I've gone as low as 1,800kbps on constant bitrate, but at that setting there are too many niggling artifacts -- nothing major, just minor annoyances. You might find it totally acceptable. In my experience 2 hours @ 2500k will come in at ~2.2-2.5gb, where 2 hours @ 1800k will come in at ~1.7-1.9gb.

I don't think there's any good setting that is acceptable across the whole gadget line. There are a lot of compromises that need to be made for encoding on the iPhone/iTouch (iPad Touch) that don't play well when using a higher-res device. I'm pretty happy to have the settings work with computer, iPad, Apple TV and then do a separate encode for the portable devices. Often times I'll even cheat and take an already encoded files and scale it down for the iPhone/iTouch when it's needed -- like when we go on a trip and the kid needs something to watch.

Anyway, let me know how it works out for you. (or anyone else who might want to try the settings).
 

Icculus

macrumors 6502
Jun 2, 2007
380
62
Frisco, TX
No problem. Here's a link to the presets:

http://www.mediafire.com/?aqiomvtd6zw7a84


There are four custom presets in the file. There are two main ones: 'High Profile 64% CRF' and 'High Profile 2500 kbps'. Then there are two labled 'Deblock' that use a deblock setting of 1,1 but are otherwise exactly the same as the ones listed.

As far as quality goes I think the biggest factor has been using CABAC and also using 'No DCT Decimate' for CRF encodes. I also give Handbrake more latitude to search through the video with higher settings for motion estimation. I don't pump up the Reference frames (they are only at 3) because they don't seem to make a big difference in SD material -- at least what I can tell.

For the concert stuff, I think using the deblocking might smooth out some of the quality issues. I've got it set to 1,1, but you might try 1,2 or 2,1 and see if it makes a difference in size and encode time. If the CRF setting doesn't work, you can cap it using a constant bitrate the 2500kbps setting I have. I've gone as low as 1,800kbps on constant bitrate, but at that setting there are too many niggling artifacts -- nothing major, just minor annoyances. You might find it totally acceptable. In my experience 2 hours @ 2500k will come in at ~2.2-2.5gb, where 2 hours @ 1800k will come in at ~1.7-1.9gb.

I don't think there's any good setting that is acceptable across the whole gadget line. There are a lot of compromises that need to be made for encoding on the iPhone/iTouch (iPad Touch) that don't play well when using a higher-res device. I'm pretty happy to have the settings work with computer, iPad, Apple TV and then do a separate encode for the portable devices. Often times I'll even cheat and take an already encoded files and scale it down for the iPhone/iTouch when it's needed -- like when we go on a trip and the kid needs something to watch.

Anyway, let me know how it works out for you. (or anyone else who might want to try the settings).

If you do Constant Bitrate @ 1800kbps, what annoyances are you seeing?
 

macbot

macrumors newbie
Original poster
Nov 30, 2010
14
0
If you do Constant Bitrate @ 1800kbps, what annoyances are you seeing?

The main problem that comes up at 1800kbps is issues with blocking in dark areas (mostly night scenes) and elements that have clouds, fog or under water and sometimes gray-hued elements in the background of scenes (like wallpaper). The problems aren't usually overt, but more subtle. When I'm being critical and looking for them, I can see them often enough. But if I'm involved in the video I won't really see it unless it's a really jarring issue; under water scenes are usually the biggest offenders.

I would say that the above issues seem to be a problem of varying degrees with handbrake and x264 in general. If you give handbrake enough bitrate, the severity of these problems seems to lessen quite a bit, but are still there. I've only just started to fool about with HD source material to SD encodes, but it seems that the issues almost disappear when using the HD source. This leads me to believe that there are artifacts that are difficult to see in the SD source that are being exacerbated by the encoding algorithm in handbrake.
 

Icculus

macrumors 6502
Jun 2, 2007
380
62
Frisco, TX
The main problem that comes up at 1800kbps is issues with blocking in dark areas (mostly night scenes) and elements that have clouds, fog or under water and sometimes gray-hued elements in the background of scenes (like wallpaper). The problems aren't usually overt, but more subtle. When I'm being critical and looking for them, I can see them often enough. But if I'm involved in the video I won't really see it unless it's a really jarring issue; under water scenes are usually the biggest offenders.

I would say that the above issues seem to be a problem of varying degrees with handbrake and x264 in general. If you give handbrake enough bitrate, the severity of these problems seems to lessen quite a bit, but are still there. I've only just started to fool about with HD source material to SD encodes, but it seems that the issues almost disappear when using the HD source. This leads me to believe that there are artifacts that are difficult to see in the SD source that are being exacerbated by the encoding algorithm in handbrake.

Gotcha. See I am at a really tough spot right now with these concerts because I did the same rip twice one at 1800 and one at 1600kbps. I then streamed both of them to the 62" DLP TV and I was not able to tell a difference at all. Can you see any downside to just going to 1600kbps for these rips as the file sizes are smaller and they seem to be just as good as the 1800kbps files? I am guessing that the source of the video is just not that good so changing the bitrate doesn't affect quality? Still learning the specifics of handbrake/h264 encoding so excuse my ignorance.
 

macbot

macrumors newbie
Original poster
Nov 30, 2010
14
0
Gotcha. See I am at a really tough spot right now with these concerts because I did the same rip twice one at 1800 and one at 1600kbps. I then streamed both of them to the 62" DLP TV and I was not able to tell a difference at all. Can you see any downside to just going to 1600kbps for these rips as the file sizes are smaller and they seem to be just as good as the 1800kbps files? I am guessing that the source of the video is just not that good so changing the bitrate doesn't affect quality? Still learning the specifics of handbrake/h264 encoding so excuse my ignorance.


Sorry for the delay in responding.

Yes, the source material is the most important link in the chain. That's what I was getting at with the HD vs. SD source. I can take a blu-ray HD rip resize the HD to SD and it will be substantially superior to the same material encoded from a SD DVD; sometimes the HD sourced encode is even superior to the SD source itself. So, if you have rough source material, you're already at a big disadvantage.

You might try adjusting the deblock though. As an example, I encoded a DVD concert video that was filmed with VHS back in the mid-80's. The VHS material isn't terrible, but it's got some rough edges for sure. When using my standard CRF setting the video came out to 2.2gb. The same settings with a deblock of 1,1 brought it down to 1.5gb.

The way I understand it, the deblock setting works like photoshop's gaussian blur filter and is applied before handbrake starts analyzing the video. The first number represents the amount of blur and the second how much it's applied. Higher in the first value is how strong the blur filter is, and higher in the second number is how much of the video it affects. The first value is akin to photoshop's pixel radius of the blur. The second is sort of like the opacity slider, except for bluring. The higher the second number, the more of the blur value you chose in the first number will be applied.

Because there is less information for handbrake to reproduce, the video file is smaller. Things like film grain, VHS transfer artifacts and poor quality encodes all add to the amount of information that handbrake tries to reproduce. When the deblock is applied, it "blurs away" some of these problems, making it so handbrake has less to reproduce. The trade off is the higher you set the first value, the more detail you lose overall. It would be nice if there were a built-in filter similar to unsharp mask in photoshop that could be applied after the encode to bring back some of the edge detail lost. I know there are 3rd party filters that can be applied with the command line, but I don't understand how to do that.

The other thing that can really add to the file size are lots of transitions and movement. If your concert footage is doing a lot of that, then the file size will probably be larger on account.

Try out some deblock setting on some samples. If you find one that works well for you, let me know.
 

Icculus

macrumors 6502
Jun 2, 2007
380
62
Frisco, TX
Sorry for the delay in responding.

Yes, the source material is the most important link in the chain. That's what I was getting at with the HD vs. SD source. I can take a blu-ray HD rip resize the HD to SD and it will be substantially superior to the same material encoded from a SD DVD; sometimes the HD sourced encode is even superior to the SD source itself. So, if you have rough source material, you're already at a big disadvantage.

You might try adjusting the deblock though. As an example, I encoded a DVD concert video that was filmed with VHS back in the mid-80's. The VHS material isn't terrible, but it's got some rough edges for sure. When using my standard CRF setting the video came out to 2.2gb. The same settings with a deblock of 1,1 brought it down to 1.5gb.

The way I understand it, the deblock setting works like photoshop's gaussian blur filter and is applied before handbrake starts analyzing the video. The first number represents the amount of blur and the second how much it's applied. Higher in the first value is how strong the blur filter is, and higher in the second number is how much of the video it affects. The first value is akin to photoshop's pixel radius of the blur. The second is sort of like the opacity slider, except for bluring. The higher the second number, the more of the blur value you chose in the first number will be applied.

Because there is less information for handbrake to reproduce, the video file is smaller. Things like film grain, VHS transfer artifacts and poor quality encodes all add to the amount of information that handbrake tries to reproduce. When the deblock is applied, it "blurs away" some of these problems, making it so handbrake has less to reproduce. The trade off is the higher you set the first value, the more detail you lose overall. It would be nice if there were a built-in filter similar to unsharp mask in photoshop that could be applied after the encode to bring back some of the edge detail lost. I know there are 3rd party filters that can be applied with the command line, but I don't understand how to do that.

The other thing that can really add to the file size are lots of transitions and movement. If your concert footage is doing a lot of that, then the file size will probably be larger on account.

Try out some deblock setting on some samples. If you find one that works well for you, let me know.

Unfortunately deblocking 1/1 or 2/2 did not do anything to the file size. I was going to stick with CBR at 1600kbps or so but after much testing I am going with RF 21.5. It seems to produce similar file sizes (a few concerts it doesn't do as good, probably due to the poor VHS source) to CBR. I now have my queue of ~450 DVD's in Handbrake going at will. If this finishes before Christmas I will be amazed!

Mac Pro, 12gb of ram....putting it to the test! 24/7 encoding or bust!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.