Kodi Community Forum
libstagefright - Experimental hardware video decoding builds - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+---- Forum: Android Development (https://forum.kodi.tv/forumdisplay.php?fid=184)
+---- Thread: libstagefright - Experimental hardware video decoding builds (/showthread.php?tid=152005)



RE: libstagefright - Experimental hardware video decoding builds - Johnnywalker - 2013-03-04

Hi video experts!
I am currently frustrated in making ffmpeg libstagefright work! The latest checkout of ffmpeg could not be built successfully with flag --enable-stagefright-h264 due to some arm color interpulation filters which are actually not the necessary parts to the player interface. Therefore, I made my own codec wrapper for OMXCodec. The implementation is quite simple, but failes to initialize because the system kernel libraries could not be load or accessed correctly. I even didn't ever see the OMXCodec::Create(...) is reached. I test the player for my Samsung Galaxy Tab 10.1 with Android 3.1 Build. I checked out exactly the same android source branch as the tab has, and built my player with android-ndk-r8b and linked to the /system/lib/libstagefright.so libmedia.so ... and so on. But nothing worked! Now my questions:
1. Do I need to load system shared library explicitly? Because my wrapper always fails while looking for symbol android::OMXCodec::Create.
2. I use platforms/android-9 as sys_root for cross compiling, and build Android App with sdk platform android-12. I think this config is not wrong, because it works with ffmpeg software decoder for long time.
3. As soon as I try to load the module that depends on libstagefright.so it fails.

What is wrong I did?SadSadSad


RE: libstagefright - Experimental hardware video decoding builds - Herman.Chen - 2013-03-07

(2013-03-04, 09:59)CruNcher Wrote: @chen
anything important that changed in the RK3 v 2.0 sdk for libstagefright ?

did you integrate the patch in the next release (it doesn't seem to made it into the 2.0 SDK yet)
The libstagefright.so is not in 2.0 sdk, it is using our latest code. It has fixed some bugs.
We have try our best to maintain the binary backward compatibility, but some changes have been make on gui header file, so the library on 1.0 sdk and 2.0 sdk is not compatible.

(2013-03-04, 09:59)CruNcher Wrote: btw the newer libstagefrights are more stable they don't crash the Kernel so fast only the old ones in the 15xx range did

v 1650/1739 shows artifcating but doesn't crashed once yet Smile

you do great work despite the fact that it reaches most user in the RK Ecosystem to late or never @ all Sad

even the yoon yoon sample works now, (of course its a slideshow due to the render path, and 60 fps seems a little to heavy for the RK3066 VPU overall (i get on the fast path around 28-30 fps), probably RK3188 will have no issues with this test sample especialy on the fast direct framebuffer path) Smile

though the birds sample is still not loading right

v 1650/1739

v 1689 (chens fix, seems not yet to have reached clients)
Yes, we found there is some drawback on interlaced video working flow in libstagefright. It makes a 60fps field rate interlaced video has about 5 second delay in 1 min. I am trying to improve it.

I will discuss the eco system with my manager soon. Hope we can find a solution for that.

@ Koying
Is it possible to rename the patched libstagefright.so, attached it in XBMC and use dlopen to use it?

BTW, what does it mean by RTFOP?


Re: libstagefright - Experimental hardware video decoding builds - Koying - 2013-03-07

@chen Embedding a specific version of libstagefright for rockchip is not an option. This is meant to be generic.

If very specific code is to be written for rockchip, it is pointless to use libstagefright, anyway, and it'd be more efficient to directly access the vpu, assuming documentation is available.

But that'd be another subproject, then...


RE: libstagefright - Experimental hardware video decoding builds - nikiiv - 2013-03-10

The last three versions crash on Telechips M805S TCC892x
The versions before that worked.. admittedly with some quirks but they did
I've tried some other versions from the nighties.. not the hardware accelerated and those do not crash it.
Logcat can be found here http://xbmclogs.com/show.php?id=3490
The device runs ICS 4.0.3 stock rooted using a timing attack.

PS
I have this tabled for an year now and I've always thought that this is an Allwinner device... Until I ran a CPUID program and googled a little bit. So please ignore all my previous posts staring that the logcats are from A10 device. They are not.. they are from this Telechips device. Sorry for the inconvenience


libstagefright - Experimental hardware video decoding builds - Memphiz - 2013-03-12

I will keep deleting posts with non-helpfull "bug reports" not obeying the well written rules in the first thread.


RE: libstagefright - Experimental hardware video decoding builds - Nitroburner77 - 2013-03-16

Good afternoon, and first thank you everybody for their hard work on this project. I am running a Minix Neo X5 on official 0117 firmware and the 0219 hardware accelerated XBMC, with the patched libstagefright.so from page 37 of this thread.
With libstagefright on, XBMC crashes while loading the movie.
My source is an animated movie processed with MakeMKV with default settings and then encoded into an mp4 with Handbrake.
I have tried changing settings in Handbrake involving turning off/on chapters, decomb and aac and ac3. My encoding profile is customized from the ATV2 profile with higher constant quality (18) since that is what I generally use to get near perfect playback on ATV2 and Pivos XIOS.
Catlog, XBMC.log and MediaInfo info attached. Please let me know if I didn't do something correctly.

Catlog
http://pastebin.com/Z7kSe87a
XBMC log
http://pastebin.com/7JGMXTaB
MediaInfo
http://xbmclogs.com/show.php?id=4834


RE: libstagefright - Experimental hardware video decoding builds - s7mx1 - 2013-03-18

@ned

Can you build the latest apk off the koying's branch? The fix for skipping alone is worth another build.


RE: libstagefright - Experimental hardware video decoding builds - DiscoDave - 2013-03-18

(2013-03-02, 20:59)longsleep Wrote: 19/02/2013 build works perfectly on my ODROID-U2 with todays Cyanogenmod Nighly with 1080p H.264 DTS 5.1 MKV. I will swich all my playback from Raspberry Pi to the ODROID now and will report problems should there be any.

I am using ODROID-U2 without fan only with the standard heat sink at 1800 Mhz max with ONDEMAND CPU govenour. It gets only slightly warm - so playback works without problem for hours now.

Great work!

Great news. I should get my U2 back from repair tomorrow (finally!).
I have really missed the wee guy while he has been gone.

1080p was the only thing missing, until now it seems.


RE: libstagefright - Experimental hardware video decoding builds - slipsystem - 2013-03-19

Hi I would like to contribute to this list http://wiki.xbmc.org/index.php?title=Android_hardware do I need to do a bug report? where can I list devices that where unable to install xbmc at all?

apologies if my question does not make scene or is unrelated to this topic.


RE: libstagefright - Experimental hardware video decoding builds - CruNcher - 2013-03-20

(2013-03-02, 20:59)longsleep Wrote: 19/02/2013 build works perfectly on my ODROID-U2 with todays Cyanogenmod Nighly with 1080p H.264 DTS 5.1 MKV. I will swich all my playback from Raspberry Pi to the ODROID now and will report problems should there be any.

I am using ODROID-U2 without fan only with the standard heat sink at 1800 Mhz max with ONDEMAND CPU govenour. It gets only slightly warm - so playback works without problem for hours now.

Great work!

How could Cyanogen integrate the VPU support ?


RE: libstagefright - Experimental hardware video decoding builds - DiscoDave - 2013-03-20

(2013-03-20, 01:53)CruNcher Wrote:
(2013-03-02, 20:59)longsleep Wrote: 19/02/2013 build works perfectly on my ODROID-U2 with todays Cyanogenmod Nighly with 1080p H.264 DTS 5.1 MKV. I will swich all my playback from Raspberry Pi to the ODROID now and will report problems should there be any.

I am using ODROID-U2 without fan only with the standard heat sink at 1800 Mhz max with ONDEMAND CPU govenour. It gets only slightly warm - so playback works without problem for hours now.

Great work!

How could Cyanogen integrate the VPU support ?

I don't think it uses VPU at all.
However, the more recent CM releases have an updated network driver for the U2, which previously caused it to crash when processing large files.


RE: libstagefright - Experimental hardware video decoding builds - Ned Scott - 2013-03-21

(2013-03-18, 16:06)s7mx1 Wrote: @ned

Can you build the latest apk off the koying's branch? The fix for skipping alone is worth another build.

If I knew how to compile for android :D

I just set up the first post to help out. Koying's been updating that post. I haven't actually read this thread in a week or so...


RE: libstagefright - Experimental hardware video decoding builds - tatubias - 2013-03-23

im using my mk808 with the libstagefright updated. its still buggy lots of frame skippying . i have posted the logs on the site you metion us.

its any way to compile 12.1 version with libstagefright update?


RE: libstagefright - Experimental hardware video decoding builds - Koying - 2013-03-23

Ok, finally got the Odroid U2.

At first sight, using the stock ICS build, everything seems ok. Has someone still noticed issues? Can someone confirm it's ok on JB, too?


RE: libstagefright - Experimental hardware video decoding builds - DiscoDave - 2013-03-23

Koying, it actually seems far more stable on CM10.1, as opposed to any of the vanilla Android releases (apart from Bluetooth being broken).
If you install JB, make sure that you install the very latest release.
Some of the images contain an older version with a bad network driver, which will cause the U2 to hang during heavy network activity (streaming anything, basically).

Give me a PM if you need any help.