(atv 2)Best handbrake setting for HD videos to play on xbmc/ATV 2
#1
Hey everyone,

I've recently had problems with getting hd content to play in xbmc on my ATV 2. I tired to play hd 720p content from icefilms and it just stuttered and lagged. The file was avi format and I've now learned I should recode them using handbreak.

After asking around I've learned it should be h296 or whatever it's called and mkv. Sorry but I'm not near my computer to get the exact numbers but you get the idea.

I've downloaded handbreak but I'm not sure if the apple tv 2 preset is the best. Way to go Should I just use this setting or should i tweek it. Im not lookifor to reinvent the wheel here. I just want to play my hd content in xbmc. I could also care less about encoding time. I just want them to play.

The other problem I have is how do I get it to 720p?

In the apple tv 2 preset it makes the video 1080 and 568 or some number like that. What number is supposed to be he 720p because it only let's me change the first group of numbers and not the second? Obviously I don't know much about this but any help would be great.

If you could just share with menthe settings you use to change avi's from icefilms to mkv that play on xbmc that would be great.
Reply
#2
Its h264 or x264 for the codec and mkv is just a container. As for the actual optimal settings, much of it is actually dependent on your network.

There is no mpg2 hardware acceleration which is why it struggles big time on those formats. With that said the ATV2 can handle 1080p and 720p with relative ease, when transcoding my rips with ffmpeg I usually aim for a bitrate of around 5000kbps on 720p and 8000kbps for 1080p, they both play fine on the ATV. Any higher than 8000kbps and the ATV2 starts to struggle in my experience, with that said, any higher than that and the difference is negligible anyway. You should also be looking at encoding at 30fps (suitable for pretty much everything) or 50fps depending on the content, 60fps will never play on the ATV2 smoothly in my experience.
Reply
#3
As I mentioned I don't know anything about handbreak. All I know how to do is the atv 2 preset. Where would I find the bitrate setting to change that at.

I just tried my hands at converting the file and failed. If you could check out this post which is the one I made and offer any help would be great.

it's on the last page of the thread.
http://forum.xbmc.org/showthread.php?tid=111005

I used the apple tv 2 preset and tried to change it to mkv and the sound was way way off. Sounded like an echo effect or something.
Reply
#4
In the video settings down below it says "Average bitrate" change that setting to my suggested settings or you can use Constant quality and set it between 15 and 25 (less is better quality)

I rarely use handbrake though, I use ffmpeg from the command line on my NAS more often.
Reply
#5
So is that the reason my sound was screwed up? Because I didn't change the bitrate? Sorry if I didn't post the right file info in that other thread. I figured my sound settings must have been messed up.

As I said the video turned out great but the sound had this deep odd echo to it.

So use the aplenty tv 2 preset and just make the changes you suggeste. Right?
Reply
#6
It's actually pretty easy. You can use the built-in Apple TV 2 preset which will produce very good quality conversions at 720p which will play on an out-of-the-box Apple TV 2. These will be in .m4v (MP4) format.

If you want better quality (including 1080p), you can just tweak that preset to use a different resolution and (I would recommend) a lower RF value (the preset is 20, but I would recommend 16, or even lower if you don't care about filesize). The resulting file (if you up the resolution) will not play on an out-of-the-box Apple TV 2, but it will still play via XBMC. Note: due to hardware limitations, you will still be limited to 720p output, but you can also play those files on something more capable which can output them at 1080p.

I've been at a standstill for the last few months trying to decide which route to go. I love the ultra-tiny, silent, and inexpensive ATV2 hardware and (no offense to the XBMC devs), I also find the idea of converting my movies to an ATV2 out-of-the-box compatible format (720p MP4) appealing, since I can more easily transport them, AirPlay them, play them on any iPhone 4, stream them reliably over WiFi, fast-scroll through my movie list, support sleep mode, etc. And since all but one of my current displays is only 720p, there's not much *current* advantage to me breaking all that compatibility just to get 1080p support. *BUT* I'm sure I'll want to upgrade my projector to 1080p and the next-gen iPhone and ATV will probably support playing 1080p files out-of-the-box, so part of me thinks that I should do that.

At this point, it makes sense for me to wait till the big Apple announcement in another week or so to see what's coming out. I don't expect there to be a new ATV, though, so I don't anticipate that it will be any easier for me to make a decision on how to convert my movies.
Reply
#7
Hi Scott,

great advice, but why did the file I just converted end up with very odd, echo type sounding? I used the apple tv 2 preset?

Here is a thread where I posted e info about the movie I was trying to convert. Maybe it will shed some light on what I did wrong.nthe file I was trying to convert was avi. Here is the info of the movie I was trying to convert:

I don't know how to use the program so I just choose the Apple TV 2 preset. I would love if someone could tell me the setting they use to produce mkv files that play on XBMC on the ATV 2. I didn't change any of the settings, even though it seems there are tons.

The end results were a nice video, but sound was off. It had a odd almost echo sounding effect. Not good at all. The file started off as a Avi and I was converting it MKV. Can someone tell me what when wrong. here is the mediainfo for the file I was trying to convert:

Format : AVI
Format/Info : Audio Video Interleave
File size : 978 MiB
Duration : 42mn 40s
Overall bit rate : 3 204 Kbps

Video
ID : 0
Format : MPEG-4 Visual
Format profile : Advanced Simple@L5
Format settings, BVOP : 1
Format settings, QPel : No
Format settings, GMC : No warppoints
Format settings, Matrix : Custom
Muxing mode : Packed bitstream
Codec ID : XVID
Codec ID/Hint : XviD
Duration : 42mn 40s
Bit rate : 2 743 Kbps
Width : 1 280 pixels
Height : 528 pixels
Display aspect ratio : 2.40:1
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.169
Stream size : 837 MiB (86%)
Writing library : XviD 1.2.1 (UTC 2008-12-04)

Audio
ID : 1
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Codec ID : 2000
Duration : 42mn 40s
Bit rate mode : Constant
Bit rate : 448 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Compression mode : Lossy
Delay relative to video : 15ms
Stream size : 137 MiB (14%)
Alignment : Split accross interleaves
Interleave, duration : 42 ms (1.00 video frame)


Any help would be great Scott. As I said I did use the apple tv 2 preset. The avi was already 720p but needed to be converted to an apple tv 2 friendly format. Any help would be great.
Reply
#8
I'd suggest in your audio settings to set each track to ac3 passthru... This means handbrake won't try to encode your audio just dump the existing track into the new video. You shouldn't be experiencing an echo unless the audio was already dodgy.
Reply
#9
Ahhh....the audio wasn't set to the ac pass thru. Not that I know what that means anyway lol. I will try it again wit that setting.

It does take a while though. Almost two hours for each conversion. Scott do you think that is the problem too. The passthrou.

Btw, the sound on the oringal file was great.

So for recap I will use the preset. Edit a few things as you guys recommended and choose thepassthru setting. If this works I'm buying all of us drinks lol. I've been at this for a while now.

Oh...e 720p thing. Is that the first number. You know, when you choose the preset for ATV 2 and it says 1080. To make it 720 I would just lower that number correct?
Reply
#10
A few things:

1) Edit your recent post that has the movie's .AVI filename and xxx that out. The filename almost looks like something you downloaded off the interwebs rather than bought on disc and ripped on your own, and I'm sure that's not the case! That could be a legal concern for the XBMC.org owners and we don't want to inflict that on them (though the discussion of Icefilms seems to be fine on these forums, which puzzles me a bit).

2) I have no experience with using Handbrake to convert an .AVI file to an .MKV file, so I honestly don't know if that might introduce any issues. My experience is using MakeMKV to rip a Blu-ray disc, then using Handbrake to convert that .MKV file to an .m4v (MP4) file. For the last several months I've been in experimental (sitting on the fence) mode where I've mainly tested out creating files that will work on an out-of-the-box AppleTV 2. That usually means that I use the Apple TV 2 preset, along with optionally lowering the RF slider (for better PQ at the cost of larger filesize), burning-in force subtitles (just because I think it makes life easier when playing them), and including both the AC3 passthru and mixed-down soundtracks (which should be the default behavior when using the Apple TV 2 preset).

3) Prophet's suggestions sound like the logical thing I'd attempt (i.e., tweaking the audio track settings, including just including a single audio track).

4) Using Handbrake you don't have to convert the entire movie to see if you did it right. At the top of the Handbrake screen, you can choose to convert a certain Chapter range or, as I do when I'm testing, change "Chapters" to "Seconds" and then enter a range of seconds. Watch the original file on your PC and find a good 5 minute segment, then get out your calculator and mutliply 60 times the start/end minute position times. Wink

At the risk of making you jealous, the new rig I bought a couple of months ago was an HP desktop refurb (about $600) with an Intel i7-2600. Using the built-in Apple TV 2 preset (720p, RF 20), I think I can convert a Blu-ray MKV rip in faster than 2x realtime (e.g., a 2 hour movie can be converted in less than an hour). If you have a slower CPU it can easily take longer (possibly *MUCH* longer as with my previous ancient HD Slimline which had a quite-old dual-core AMD chip, the model of which escapes my memory at the moment).
Reply
#11
Great advice Scott....btw, I did do a preview of the movie using that handbreak feature and the preview showed fine, but the final didn't. I'll try the new one soon and report back.

Btw, I am so jeluous of your new rig Wink
Reply
#12
exiledone1 Wrote:Oh...e 720p thing. Is that the first number. You know, when you choose the preset for ATV 2 and it says 1080. To make it 720 I would just lower that number correct?
Sometimes the order in which you do things with Handbrake can make a difference. I recommend launching Handbrake, then selecting the Apple TV 2 preset on the right, then loading the source file you want to convert. On the main screen under the "Size" heading, you should see a "Width" setting that you can change. When your source file is 1080p or 720p, it should default to 1280 when you're using the Apple TV 2 preset. If you want to play the files on an out-of-the-box ATV2, leave it as-is. If you have any 1080p displays in your house and an HTPC or streamer capable of outputting 1080p, and you don't mind breaking compatibility with the out-of-the-box Steve Jobs-blessed ATV2 functionality, you can up that setting from 1280 to 1920. You'll still be able to play it on the ATV2 via XBMC.
Reply
#13
Hi Scott...

New on the forum but not new to testing with nightly builds. Been testing with MKVs, MP4s, AVIs, etc for quite some time now.

Some builds work better than others for obvious reasons and I really appreciate everyone's contribution - you've made a sound third party add-on with the ATV which really does work wonders...

Now the question I have is based around filesize or M4V, MP4 files. I recently converted from MKV to M4V using Handbreak and found the size of the file to be around 5.8GB.. it's perfect, sounds great through my AC3 receiver but does filesize matter when streaming content through a Wifi network..

I can stream up to 4.5GB with an MKV without any issues through my network, but I have a feeling that when I try this M4V it will choke..

It's a bit of a premature question as I haven't tested yet but I am almost 100% confident it won't work. The smaller the file the better that it will play? Or are the streams contained within the container that magic component that will allow for free flowing content?

Thanks again.
Reply
#14
jaceymeanz Wrote:Hi Scott...

New on the forum but not new to testing with nightly builds. Been testing with MKVs, MP4s, AVIs, etc for quite some time now.

Some builds work better than others for obvious reasons and I really appreciate everyone's contribution - you've made a sound third party add-on with the ATV which really does work wonders...

Now the question I have is based around filesize or M4V, MP4 files. I recently converted from MKV to M4V using Handbreak and found the size of the file to be around 5.8GB.. it's perfect, sounds great through my AC3 receiver but does filesize matter when streaming content through a Wifi network..

I can stream up to 4.5GB with an MKV without any issues through my network, but I have a feeling that when I try this M4V it will choke..

It's a bit of a premature question as I haven't tested yet but I am almost 100% confident it won't work. The smaller the file the better that it will play? Or are the streams contained within the container that magic component that will allow for free flowing content?

Thanks again.

Scott made an add on for the ATVHuh?

UPDATE: Hey Guys,

I just finished another movie, but this time the movie came out fine. I was doing this before your advice. I think the problem was that I changed the anamorphic strict when I made the movie the first time and I also converted to a MKV. This time I left everything alone and let it do a mp4 file. The movie came out perfect.

Now I'm getting ready to do another test using all the suggestions you guys recommended. Wish me luck. This post has been very informative. Thanks

Josh
Reply
#15
jaceymeanz Wrote:Hi Scott...

New on the forum but not new to testing with nightly builds. Been testing with MKVs, MP4s, AVIs, etc for quite some time now.

Some builds work better than others for obvious reasons and I really appreciate everyone's contribution - you've made a sound third party add-on with the ATV which really does work wonders...

Now the question I have is based around filesize or M4V, MP4 files. I recently converted from MKV to M4V using Handbreak and found the size of the file to be around 5.8GB.. it's perfect, sounds great through my AC3 receiver but does filesize matter when streaming content through a Wifi network..

I can stream up to 4.5GB with an MKV without any issues through my network, but I have a feeling that when I try this M4V it will choke..

It's a bit of a premature question as I haven't tested yet but I am almost 100% confident it won't work. The smaller the file the better that it will play? Or are the streams contained within the container that magic component that will allow for free flowing content?

Thanks again.
Depending on what M4V compression is being used x264 typically has better compression while maintaining quality. So obviously a larger video with a higher bitrate will choke more than a smaller video with a lower bitrate if your network throughput is not up to par. Over a wired network I have no problems streaming 20gb MKV's, everyone's setup is different. The size of the file has little to do with it, it's the bitrate. The higher the bitrate the more data the ATV2 needs to construct each frame in a video.

There isn't a magic number that will work in every persons setup, this is a network device, you're relying on so many external factors that can end up influencing the end user experience. The ATV2 is capable of playing pretty much any common HD media you throw at it (with the exception of mpeg2), if you have issues beyond that it's more than likely your network that has issues, and it's more likely to show up on an atv2 than a PC because we don't have the luxury of alot of memory to have a good buffer for network fluctuations.
Reply

Logout Mark Read Team Forum Stats Members Help
(atv 2)Best handbrake setting for HD videos to play on xbmc/ATV 20