Support Thread for libstagefright

  Thread Rating:
  • 5 Votes - 4.4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
phate89 Offline
Senior Member
Posts: 179
Joined: Nov 2012
Reputation: 4
Post: #1456
Hi.. I just install xbmc in my new nexus 2013 lte and I have a bug with libstagefright hardware acceleration. h264 1080p 24 decoding works well (but when i stop the video xbmc crashes) but when i try to watch mpeg2/h264 interlaced live tv or a ts interlaced recording xbmc crashes as soon as it start to play (i hear for a second the audio but the video never starts and crashes).
Here's the log:
http://xbmclogs.com/show.php?id=244230
And here's the logcat:
https://dl.dropboxusercontent.com/u/2219...fright.txt
And here's the log of the 1080p crash after stop playing:
http://xbmclogs.com/show.php?id=243446
and the logcat:
https://dl.dropboxusercontent.com/u/2219086/1080p.txt

with dalvik:

Here's the log:
http://xbmclogs.com/show.php?id=244241
And here's the logcat:
https://dl.dropboxusercontent.com/u/2219...dalvik.txt
  • Hardware: Nexus 7 2013 LTE
  • Rom: KitKat 4.4.3 stock
  • XBMC Gotham 13.1

My configuration:
  • Hardware Encoding: On
  • Libstagefright: On
  • MediaCodec: Off
(This post was last modified: 2014-07-11 01:21 by phate89.)
find quote
Koying Online
Team-XBMC Member
Posts: 1,840
Joined: Sep 2008
Reputation: 36
Location: Brussels, Belgium
Post: #1457
Mmm... MediaCodec is being used.
Wrong logcat?
find quote
phate89 Offline
Senior Member
Posts: 179
Joined: Nov 2012
Reputation: 4
Post: #1458
You're right it was with mediacodec.
I tried again and the behavior is a little bit different.
The 1080p is the same (plays well but when i stop it crashes) but interlaced doesn't crash. but it still have a bug because when i start the channel i got it only with audio and this to video:
[Image: 413b08338135839.jpg]
if i change again channel xbmc crashes again.
Here's the Log:
http://xbmclogs.com/show.php?id=244230
And here's the logcat:
https://dl.dropboxusercontent.com/u/2219...fright.txt
I tried with dalvik and it changes slightly. xbmc doesn't crash (never a crash with 1080p or interlaced) but i still get this with tv material:
[Image: 413b08338135839.jpg]

Here's the log:
http://xbmclogs.com/show.php?id=244241
And here's the logcat:
https://dl.dropboxusercontent.com/u/2219...dalvik.txt
(This post was last modified: 2014-07-11 01:20 by phate89.)
find quote
Koying Online
Team-XBMC Member
Posts: 1,840
Joined: Sep 2008
Reputation: 36
Location: Brussels, Belgium
Post: #1459
Looks like MPEG2 h/w decoding has a problem.

In advancedsettings.xml, for libstagefright, you can disable it with
Code:
<advancedsettings>
  ...
  <video>
    ...
    <stagefright>
      <!--  -1 is default, 0 is never used this codec, 1 is always use this codec, bypassing blacklist -->
      <usempeg2codec>0</usempeg2codec>
    </stagefright>
    ...
  </video>
  ...
</advancedsettings>

Please give it a try.
As said earlier, the "stop" crash will be solved in 13.2 (coming soon).
find quote
phate89 Offline
Senior Member
Posts: 179
Joined: Nov 2012
Reputation: 4
Post: #1460
(2014-07-11 11:51)Koying Wrote:  Looks like MPEG2 h/w decoding has a problem.

In advancedsettings.xml, for libstagefright, you can disable it with

Please give it a try.
As said earlier, the "stop" crash will be solved in 13.2 (coming soon).

It doesn't only happens with mpeg2 576i but also with h264 1080i. Happens only with interlaced sources.
I already tried to disable hardware acceleration and with mpeg2 576i is fine but via software it is Too slow to decode h264 1080i and it drops a lot of frames (impossible to watch)
(This post was last modified: 2014-07-11 13:25 by phate89.)
find quote
phate89 Offline
Senior Member
Posts: 179
Joined: Nov 2012
Reputation: 4
Post: #1461
Tried with the new beta. The stop crash is fixed but not the interlaced decoding..
find quote
JimK Offline
Junior Member
Posts: 3
Joined: May 2014
Reputation: 0
Post: #1462
(2014-07-11 11:51)Koying Wrote:  As said earlier, the "stop" crash will be solved in 13.2 (coming soon).

Thank you Koying and Davilla , great job on v13.2. No more "stop" video freeze, nice. Smile
(This post was last modified: 2014-07-25 12:40 by JimK.)
find quote
Mateo81 Offline
Junior Member
Posts: 12
Joined: Mar 2014
Reputation: 0
Post: #1463
(2014-07-25 04:39)JimK Wrote:  
(2014-07-11 11:51)Koying Wrote:  As said earlier, the "stop" crash will be solved in 13.2 (coming soon).

Thank you Koying and Davilla , great job on v13.2. No more "stop" video freeze, nice. Smile

Do you mean gotham v13.2 beta 2?; I had tested and still I have same 10 min freezing video bug with this latest gotham 13.2 beta 1 and 2.
Only found the freezing bug solved with the fix introduced by koying on spmc v13.2.1.
Or are you talking about of other "stop" crash?.
find quote
phate89 Offline
Senior Member
Posts: 179
Joined: Nov 2012
Reputation: 4
Post: #1464
(2014-07-25 19:52)Mateo81 Wrote:  
(2014-07-25 04:39)JimK Wrote:  
(2014-07-11 11:51)Koying Wrote:  As said earlier, the "stop" crash will be solved in 13.2 (coming soon).

Thank you Koying and Davilla , great job on v13.2. No more "stop" video freeze, nice. Smile

Do you mean gotham v13.2 beta 2?; I had tested and still I have same 10 min freezing video bug with this latest gotham 13.2 beta 1 and 2.
Only found the freezing bug solved with the fix introduced by koying on spmc v13.2.1.
Or are you talking about of other "stop" crash?.
One thing is freeze another is crash.. Stop crash is literally a crash when you hit the stop button and xbmc immediately crashes and I can confirm it's fixed
find quote
Mateo81 Offline
Junior Member
Posts: 12
Joined: Mar 2014
Reputation: 0
Post: #1465
(2014-07-25 19:55)phate89 Wrote:  
(2014-07-25 19:52)Mateo81 Wrote:  
(2014-07-25 04:39)JimK Wrote:  Thank you Koying and Davilla , great job on v13.2. No more "stop" video freeze, nice. Smile

Do you mean gotham v13.2 beta 2?; I had tested and still I have same 10 min freezing video bug with this latest gotham 13.2 beta 1 and 2.
Only found the freezing bug solved with the fix introduced by koying on spmc v13.2.1.
Or are you talking about of other "stop" crash?.
One thing is freeze another is crash.. Stop crash is literally a crash when you hit the stop button and xbmc immediately crashes and I can confirm it's fixed
Ahh ok, thks. Funny, I never suffered before that "stop" crash.
(This post was last modified: 2014-07-25 23:18 by Mateo81.)
find quote
Koying Online
Team-XBMC Member
Posts: 1,840
Joined: Sep 2008
Reputation: 36
Location: Brussels, Belgium
Post: #1466
The stop crash is a pure ART one. There was a bug in XBMC but Dalvik just ignored it.
The 10min freeze, I don't actually know what solved it in SPMC, but I guess it is https://github.com/xbmc/xbmc/pull/5042
find quote
Mateo81 Offline
Junior Member
Posts: 12
Joined: Mar 2014
Reputation: 0
Post: #1467
Thanks for the explanation koying; so as I´m pretty sure my system work only based on dalvik, for that I had not experienced that stop crash.

Well, it´s great that the change you introduce on spm v13.2.1 to solve other issue as you describe in the link you have referenced, it had consequently being effective to solve the very annoying 10min freeze claimed on the last pages of this thread; it would be great that the upcoming updates of XBMC can add your solution. I´m happy that this had occurred, the stars were aligned in our benefit.
But you as well mention in the previous spmc v13.2.0 other change introduced: "Rockchip enhancements -->Better H/W acceleration via private API"; as I had not test that version, I´m not sure if that change may be combined with the latest related to MakeMKV had reached the final solution, but anyway the most important now is that 10min freeze problem is gone on your spmc.
find quote
ozNick Offline
Junior Member
Posts: 28
Joined: Jan 2007
Reputation: 0
Post: #1468
Hi,
Using an ARM based TV using a "CPU Mstar ARM dual core 1.2GHz w/ FPU, GPU is a quad core Mali-400MP"
Android is 4.2.1

libstagefright is on (mediacodec is off).

The test file is a small 720p video played locally.
During XBMC playback, the screen is just black with the exception of the a few pixels in the top left. The audio plays, through.
Local media player and MX Player in HW accel mode the file plays fine

Log file: http://xbmclogs.com/show.php?id=254707


Thanks, Nick
find quote
Koying Online
Team-XBMC Member
Posts: 1,840
Joined: Sep 2008
Reputation: 36
Location: Brussels, Belgium
Post: #1469
Try HW+ mode of MX player.
If it doesn't work, then your device just don't implement libstagefright/mediacodec.
find quote
ozNick Offline
Junior Member
Posts: 28
Joined: Jan 2007
Reputation: 0
Post: #1470
(2014-07-27 10:59)Koying Wrote:  Try HW+ mode of MX player.
If it doesn't work, then your device just don't implement libstagefright/mediacodec.

Thank you
I can confirm the file plays in HW+ mode of MX Player.

I tested multiple files with MX Player in HW+ mode - all work correctly.

Nick
Edit: update
(This post was last modified: 2014-07-27 14:32 by ozNick.)
find quote
Post Reply