
In this thread i hope to collect all the information you need to run XBMC with NATIVE hardware (HW) accelerated decoding on any RK3066 device. (So no external players like MX player)
Here is a summary of the information i've collected over the past few weeks:
First HERE is a great thread by dark_angel where you can read all about XBMC, what it can do, what nice plugins there are and how to install them. Also there is information how to use XBMC in combination with an external player (MX player) for hardware acceleration. But if you ended up here i guess you know what XBMC is and you know you want it!

BASIC INFO
Hardware accelerated decoding means the video is decoded by the GPU (graphics processing unit) instead of the CPU. (i know that's hardware too right??? The standard version of XBMC for android doesn't support HW accel decoding but uses software decoders

to decode video. This means it's very slow and you wont even get close to playing HD video.
But the developers of XBMC do have "test builds" available with HW accel decoding.
You can find those HERE
The ones with HWACCEL or STAGEFRIGHT in the filename are the ones with HW accel decoding.
So THIS one is the latest.
But with THIS one you can check CPU load, cache size (for non-local files) and the amount of dropped frames by pressing the letter O while playing a video. (not working with the latest version)
The HW accel version of XBMC for android is still in a very early stage of development. So expect some bugs, but also expect it to get better and hopefully faster!

WHAT WORKS AND WHAT DOESN'T
LIBSTAGEFRIGHT
Rockchip released a patch to fix or at least improve the HW accel decoding. This patch is called libstagefright. I haven't done tesst without this patch, but lets just assume results will be worse.

As far as i know pretty much all available custom ROMs (the later versions) have the libstagefright patch. If your custom ROM doesn't have it or you want to use the stock ROM

UPDATE
There is an updated version of libstagefright available. I've tested this on my MK808 using Leolas his CWM flashable zip file and while the flash worked fine, all of a sudden XBMC would display artifacts and crash when i tested a 1920x1080 video. 1920x1024 played fine. So not sure if 1920x1080 caused those problems because that resolution isn't devidable by 16 or if there is another reason. I have to say i didn't do a lot of testing, but so far i didn't notice any improvement from the new/updated libstagefright.so.
XBMC FOR ANDROID WITH HW ACCEL DECODING
Without tweaks XBMC will only use the HW accel decoder on videos where the resolution is dividable by 16. For instance 1280x720 (720/16=45). But for a very common movie resolution like 1280x532 (532/16=33,25) the HW accel decoder wont be used and while it is a lower resolution video as the 1280x720 one it will play much much worse. This also means that, without tweaks, the HW accel decoder will also not be used for full 1080p/1920x1080 (1080/16=67,5) videos. So here is the tweak to fix it...
ADVANCEDSETTINGS.XML
Lewy20041 pointed out that you can tweak XBMC by using the advancedsettings.xml file. By adding the following code to that file you will force XBMC to always use the HW accel decoder even if the video is not dividable by 16. It will also force it to use the HW accel decoder for different codecs. The advancedsettings.xml file must be placed in /sdcard/android/data/org.xbmc.xbmc/files/.xbmc/userdata
<advancedsettings> <video> <stagefright> <!-- -1 is default, 0 is never used this codec, 1 is always use this codec, bypassing blacklist --> <useavccodec>1</useavccodec> <usevc1codec>1</usevc1codec> <usevpxcodec>1</usevpxcodec> <usemp4codec>1</usemp4codec> <usempeg2codec>1</usempeg2codec> <useswrenderer>false</useswrenderer> </stagefright> </video> </advancedsettings>
Or a zipped version HERE
AUDIO 2.0/5.1
As it seems right now these RK3066 devices will only output stereo/2.0 audio. While HDMI can handle much higher and with the right speaker system with digital receiver any AC3 or DTS audio stream could just be send directly to that digital receiver (passthrough) it doesn't seem to be working. HERE you can find a thread about a MINIX firmware apparently supporting 5.1 audio, but i think it only works with AC3 and not in combination with XBMC. But i guess they are working on it. Lets hope they dont forget about the RK3066 now that the RK3188 devices are here.
LIVE STREAMS PATCH
Again big thanks to Lewy20041 for providing a patch for live video streams.
Lewy20041:
set permisions "rwx --- ---" to install-recovery.sh
this way it load fix at startup.
Just rename the script to 00script
copy it into the init.d folder.
reboot
There are 720p kernels and 1080p kernels available.
These devices by default have a 720p kernel, meaning the "internal system" will run at 720p resolution no matter what. Even if you set the output to 1080p under settings it will just take that 720p resolution and upscale it to 1080p.
So when you watch a 1080p movie on a 720p kernel (and the output set to 1080p under settings), that video image will first be downscaled to 720p (loosing detail in the process) and then upscaled again to 1080p (just increasing pixels, not adding detail) before it's send to the TV/Monitor. So even if you are able to play a 1080p movie on a 720p kernel, all detail over 1280x720 resolution will be lost. That doesn't mean it still cant look very good and you'll have the benefit of a fast running android and other apps. Also i think you will be able to play 1920x800 resolution videos (a very common movie resolution) without having to overclock the device (even though you wont get the full detail).
With a 1080p kernel you will have real 1920x1080 output to your TV/Monitor. Meaning when you watch a 1080p movie you will also see that 1080p detail. However with a stock/non-overclocked kernel you wont be able to watch even the lowest common 1080p movie resolution which is 1920x800 without a lot of dropped frames. So you will have to overclock...
So with 720p kernel you can play (most) 1080p movies, but you wont see the detail so there is no real reason to watch a 1080p movie. And with a 1080p kernel you will be able to see the extra detail of a 1080p movie but you wont be able to play them!!!


Unless... you overclock...

PERFORMANCE UG007II with Finless 1.7a with stock and 2dark4u (UG802) OC kernel.
These are some rough indications of what you will be able to play with what kernel. (720p/1080p/stock/overclocked)
720p kernel, stock speed (GPU at 266mhz)
720p60hz Videos with a resolution up to 1920x992 can be played.
720p50hz Videos with a resolution up to 1920x1008 can be played.
720p kernel, overclocked (GPU at 466mhz)
Videos with a resolution up to 1920x1080 can be played without breaking a sweat.
1080p kernel, stock speed (GPU at 266mhz)
Video with a resolution up to 1920x688 (not a standard movie resolution) can be played. 1920x800 unfortunately has way too much dropped frames.
1080p kernel, overclocked (GPU at 466mhz)
Video with a resolution up to 1920x1080 can be played
NOTES
- When i use 1080p50hz it seems i always have quite a bit less dropped frames compared to 1080p60hz. Maybe because the GPU only has to do 50 updates/sec instead of 60 or maybe it has to do with something else, but i assume the same applies to 720p 60hz/50hz, so i suggest you use 50hz if that's possible.
If this really makes that big a difference, maybe kernel makers are able to build a 24hz option in there since quite a few TV's support that and MAYBE that means there is no need for overclocking. (For the 720p kernels at least)
- With the overclock 1080p kernel (GPU at 466mhz) i can play 1920x1080 videos perfectly even when i lock the CPU to 816mhz. Of course this is because the GPU does most of the work. But this also means you dont need a kernel that overclocks the CPU, just the GPU. Even if i use "interactive" or "ondemand" governor with a max of 1.6ghz i will get random dropped frames. I have no idea what the real difference is between these scaling governors, but "hotplug" seems to work best for me. Since 816mhz seems to be enough and apparently these governors dont always scale fast enough (considering the dropped frames) i'm not using hotplug governor with a min freq of 816mhz and a max or 1.6ghz. But like i said the stock 1.2Ghz is more than enough.
- For people having problems with streaming movies over a SMB/Windows network maybe there is a workaround. I just tested playing files from my local server using the SMB/Windows network and XBMC doesn't seem to buffer anything or at least very little. This wont be a problem most of the time but during very high motion scenes or scenes with a lot of movie grain the bitrate can be much higher than the movie average and your WIFI connection might not be able to keep up with that.
I also have a remote server and i stream my movies from that server using an FTP server. That way XBMC will use a buffer of at least 25MB. That way bitrate bursts are covered by the buffer.
I know a lot of NAS devices have FTP servers build in and on normal computers/servers you can always use the free filezilla (windows).
- Overclocked kernels: As far as i know right now there are overclocked kernels available for the MK808 (non-B) and the UG802 and i think that UG802 kernel should be compatible with Minix Neo G4 and the Rikomagic MK802 III. That doesn't mean all other sticks wont be able to use overclocked kernels, that just means if you do use one of those kernels you will loose WIFI (and BT) and will have to use an USB WIFI dongle or USB to ethernet adapter. However the MK808 kernels dont work on my UG007. So maybe for some devices neither kernel works, but i think for most at least one will (please correct me if i'm wrong). With the MK808 kernels the GPU is clocked at 433mhz or 400mhz. I'm not sure if that will be enough for 1920x1080. 1920x800 shouldn't be a problem.
- I have this simple wattage meter and figured i share some results.
Stock/non-overclocked 1080p kernel, max load (Epic Citadel) it consumes 5w, but since the power supply itself gets a little warm lets just assume my UG007II uses about 4w.
2dark4u OC 1080p kernel CPU 1.6Ghz GPU466mhz, max load (Epic Citadel) 7w, again my UG007II probably 6w. But while watching a 1920x1080p movie in XBMC it's at 4-5w 99% of the time. So that would be 3-4w for the UG007II, the same as the stock kernel under full load.
So when comparing the full load there is an 50% increase in power usage (4w -> 6w), but when using an overclocked kernel to watch even 1080p movies using XBMC the max power usage is about the same as the full load power usage with the stock kernel. I'm definately not saying use overclocked kernels without a heatsink, but "i think" a rather small heatsink (like on the MK808(B)) should be enough, since even such a small heatsink will AT LEAST quadruple the cooling surface area compared to no heatsink at all.
BUT! OVERCLOCK AT YOUR OWN RISK! AND NOT WITHOUT A HEATSINK! (even if it's just a small one) That's what she said...
.gif)
Comment