PDA

View Full Version : Encoding for XBMC -- resolution or bitrate?


StriatedFoot
10th October 2007, 00:54
So I've read most of the threads regarding h.264 encoding for slow CPU applications, like XBMC on original Xbox. I've come to the following conclusions:

* disable CABAC
* disable deblocking
* don't compress audio

Supposedly, those three things require more CPU usage during the decoding process, so disabling them seems to be the best bet. I've done dozens of decodes at native DVD resolutions and have not run into any problems playing them back on the Xbox. No dropped frames on any movies. I've also been using 0 B-frames and my bitrate is governed by a constant quality setting of 21. Muxed with the original AC3, I get 2 hour movies on the order of 1.4GB or so.

But would there be a more efficient coding strategy? Specifically, would I be better off decreasing my resolution to enable deblocking, CABAC, or a higher quality value? What about trellis quantization?

Also, is there a recommended VBV maximum setting for XBMC?

Thanks in advance for any insight.

Sagekilla
10th October 2007, 01:36
Personally, I find that at sub-DVD resolutions on SDTV res (640x480) upscales quite nicely, whether it's from an Xbox, PC, etc.

It's not exactly answering your first three questions, but you can get away with encoding at a resolution of 512x384. Along with the lower file size, you MAY be able to enable deblocking which should help out A LOT. My suggestion is to try that as well as other things, as it certainly doesn't hurt!

StriatedFoot
10th October 2007, 02:36
If I do try deblocking, are there any settings that would be more efficient CPU-wise during playback? For example, does strong deblocking cost more CPU cycles than weak?

Sagekilla
10th October 2007, 04:43
I'm not exactly qualified to answer that question, but I believe deblocking, regardless of strength and sensitivity, takes the same amount of time to decode. Besides, simply having it on and at 0:0 will probably do wonders for your videos.

sven_pether
10th October 2007, 05:20
Hi
I've been encoding H264 movies (+100) for the XBMC using the following settings without any problems.
I use Nero Recode, Nero Digital AVC, Standard - AVC.
For 1:85 movies I use 704x384
For 16:9 movies I use 704x400
For 2.40:1 movies I use 720x352 Anamorphic
For 2.35 movies I use 720x368 Anamorphic
Quality 0.24 bits/pixel
2-pass
High Quality
Vector range -128 to 127.75
Maximum reference frames 1
Maximum GOP size 300
Maximum B-frames 3
No Cabac
Deblocking ON, strenght -1
everything else set to default

Mux the raw H264 stream with the original AC3 track into MKV.

These settings works flawless on my XBMC

Pether

chilledoutuk
10th October 2007, 10:54
you should be able to use cabac on xbmc in fact i would prefer to have cabac and turn off deblocking.

StriatedFoot
10th October 2007, 20:28
you should be able to use cabac on xbmc in fact i would prefer to have cabac and turn off deblocking.

My understanding is that CABAC assists in getting file sizes down, which would then allow me to decrease the crf setting from 21 down to 19 or 20 or so. Is that correct? If so, is going with a marginally higher bitrate better than deblocking?

chilledoutuk
10th October 2007, 22:02
well some people like deblocking and some like me don't. Cabac is probably one of the most important features of h.264 and without it you may as well use xvid.

Sagekilla
10th October 2007, 22:24
Like Chilledoutuk said, CABAC is very important feature of H.264 and the space savings is HUGE (On the order of 30% less bitrate I believe it was) Try both and, using your own eyes, determine which you'd rather have: Deblock or CABAC. Pick whichever gives you the biggest file size you can deal with as well as quality you can deal with. Both help, but what really matters is whether you like it.

Terranigma
11th October 2007, 00:52
Depending on the resolution and your current version of mplayer (for xbmc), You can use all x264 options. No need to limit the qualilty by deciding whether to have in-loop or cabac enabled. Check out wizboy11's, elupus, or the latest version of xbmc which should have the gcc compiled mplayer.