• 1
  • 2(current)
  • 3
  • 4
  • 5
  • 12
Support Thread for MediaCodec
#16
On MK808 video is choppy and audio gets out of sync with MediaCodec. With StageFright video is played well.

http://xbmclogs.com/show.php?id=69983

In the logfile, the video is played one time with mediacodec enabled and one time with mediacodec disabled

Could it be, that there is a problem with the implentation of mediacodec on rockchip devices?

The ROM used is Finless 2.1 Android 4.2
Reply
#17
Considering the number of reports, it looks like Rockchip has issues with MediCodec, indeed.

@davilla
I got the ReleaseOutputBuffer ExceptionOccurred, too. (on N7/T3; with yesterday's master, so w/o your additional debugging)
Code:
V/XBMC    (10508): 14:20:15 T:1656283640    INFO: CDVDPlayerVideo - Stillframe detected, switching to forced 23.976024 fps
V/XBMC    (10508): 14:20:15 T:1656283640    INFO: CDVDPlayerVideo - Stillframe left, switching to normal playback
V/XBMC    (10508): 14:20:15 T:1654568560   ERROR: CDVDMediaCodecInfo::ReleaseOutputBuffer ExceptionOccurred render(1)
V/XBMC    (10508): 14:20:16 T:1656283640 WARNING: CDVDMessageQueue(video)::Get - asked for new data packet, with nothing available
The device was struggling at that time, but the vid was local. Restarting the vid later (w/o exiting) worked fine.
Looks like it goes into error and cannot recover. I got a frozen frame, and funny fact is that even exiting to home kept the frozen frame instead of the background, with menus drawn over, up to the end of the vid.
Reply
#18
I'm also logging the exception so this must be some general java throw... No info.
Reply
#19
From what thread does it come from?
For libstagefright, I had issues when releasing the output buffers from the rendering thread, I don't think this is thread-safe.
I also had issues when the buffer was not released fast enough.
Reply
#20
All rendering items are created on the main thread, same as where it's rendered. If a buffer is not released fast enough, then decoder should just stall.
Reply
#21
Which version should i use? Have a Minix X5 mini with 4.1.1
Reply
#22
I tested on nexus7 2013 with xbmc nightly build xbmc-20131014-4ab2c1c (libstagefright off, MediaCodec on)

mpeg2 sample

xbmc crashes on playback
logcat:
Code:
10-16 05:00:52.578 V/XBMC    (23706): 05:00:52 T:2026985432    INFO: ffmpeg[78D157D8]: Input #0, mpegts, from '/storage/emulated/0/Movies/Slicies MPEG2 NTSC 1080i 29.97.ts':
10-16 05:00:52.578 V/XBMC    (23706): 05:00:52 T:2026985432    INFO: ffmpeg[78D157D8]:   Duration: 00:00:29.15, start: 600.000000, bitrate: 19987 kb/s
10-16 05:00:52.588 V/XBMC    (23706): 05:00:52 T:2026985432    INFO: ffmpeg[78D157D8]:   Program 1
10-16 05:00:52.588 V/XBMC    (23706): 05:00:52 T:2026985432    INFO: ffmpeg[78D157D8]:     Stream #0:0[0x1011], 98, 1/90000: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
10-16 05:00:52.588 V/XBMC    (23706): 05:00:52 T:2026985432    INFO: ffmpeg[78D157D8]:     Stream #0:1[0x1100], 103, 1/90000: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s
10-16 05:00:52.588 V/XBMC    (23706): 05:00:52 T:2026985432   DEBUG: CDVDDemuxFFmpeg::AddStream(0, ...) -> 0
10-16 05:00:52.588 V/XBMC    (23706): 05:00:52 T:2026985432   DEBUG: CDVDDemuxFFmpeg::AddStream(1, ...) -> 1
10-16 05:00:52.588 V/XBMC    (23706): 05:00:52 T:2026985432  NOTICE: Opening video stream: 0 source: 256
10-16 05:00:52.588 V/XBMC    (23706): 05:00:52 T:2026985432   DEBUG: StereoscopicsManager: Detected stereo mode in string '/storage/emulated/0/Movies/Slicies MPEG2 NTSC 1080i 29.97.ts' is 'mono'
10-16 05:00:52.588 V/XBMC    (23706): 05:00:52 T:2026985432  NOTICE: Creating video codec with codec id: 2
10-16 05:00:52.588 V/XBMC    (23706): 05:00:52 T:2026985432   DEBUG: CDVDFactoryCodec: compiled in hardware support: CrystalHD:no AMCodec:no MediaCodec:yes OpenMax:no libstagefright:yes VDPAU:no VAAPI:no
10-16 05:00:52.588 V/XBMC    (23706): 05:00:52 T:2026985432    INFO: MediaCodec Video Decoder...
10-16 05:00:52.588 V/XBMC    (23706): 05:00:52 T:2026985432   DEBUG: FactoryCodec - Video: mediacodec - Opening
10-16 05:00:52.598 I/OMXClient(23706): Using client-side OMX mux.
10-16 05:00:52.638 I/OMXClient(23706): Using client-side OMX mux.
10-16 05:00:52.638 E/OMX-VDEC-1080P(30000): get_parameter: OMX_IndexParamVideoProfileLevelQuerySupported nProfileIndex ret NoMore 2
10-16 05:00:52.638 E/OMX-VDEC-1080P(30000):
10-16 05:00:52.638 E/OMX-VDEC-1080P(30000):  Error in ioctl read next msg
10-16 05:00:52.638 E/OMX-VDEC-1080P(30000):
10-16 05:00:52.638 E/OMX-VDEC-1080P(30000): ERROR: read from pipe failed, ret -1 errno 9
10-16 05:00:52.638 E/        (30000):
10-16 05:00:52.638 E/        (30000):  Destroy C2D instance
10-16 05:00:52.638 E/        (30000):
10-16 05:00:52.638 E/        (30000):  Destroy C2D instance
10-16 05:00:52.648 V/XBMC    (23706): 05:00:52 T:2026985432   DEBUG: CDVDVideoCodecAndroidMediaCodec::Open m_codecname(OMX.qcom.video.decoder.mpeg2), colorFormat(2141391875)
10-16 05:00:52.648 V/XBMC    (23706): 05:00:52 T:2026985432   DEBUG: CDVDVideoCodecAndroidMediaCodec::Open m_codecname(OMX.qcom.video.decoder.mpeg2), colorFormat(19)
10-16 05:00:52.648 E/ACodec  (23706): [OMX.qcom.video.decoder.mpeg2] configureCodec returning error -1010
10-16 05:00:52.648 E/MediaCodec(23706): Codec reported an error. (omx error 0x80001001, internalError -1010)
10-16 05:00:52.648 W/JNIHelp (23706): Discarding pending exception (java.lang.IllegalStateException) to throw java/lang/IllegalStateException
Reply
#23
Generally, if possible, please specify if the problem you have is reproducable with libstagefright (MediaCodec off).

If neither works, it is probably a device issue. If it works with libstagefright, it is probably a MediaCodec issue indeed (xbmc or android).
Reply
#24
new nightly brewing, some slight MediaCodec changes in buffer handling.
Reply
#25
(2013-10-15, 09:34)Koying Wrote:
(2013-10-15, 09:23)davilla Wrote: is Advanced Simple Profile @ Level 5 (ASP@L5) good enough to test for ?
IIRC, qpel/gmc is part of ASP@L5, but nvidia didn't implement it, so no, unless you just want to narrow the blacklisting.

T3 has no problem soft decoding any mp4, though.

why not just look at the profile from hints for ASP@L5 and quirk it for nvidia ? Basically fault the open so that it falls back to FFMpeg.
Reply
#26
That's definitely a solution, indeed.

Just that blacklisting ASP@L5 de facto blacklists a majority of mp4's those days, so I was hoping there was a way to blacklist only this comparatively small amount of problematic mp4's.
Reply
#27
Tried with new nightly todays version and rk3066 (Minix neo g4) with newest official rom 4.2.2 of september
1st scene: mediacodec on, libstagefright off: 1st movie crashes after a few seconds, 2nd movie no crash, but horrible stuttering.
2nd scene: mediacodec off, libstagefright on: same stuttering but no crash.

Here is the logfile.

Hope you find a solution. Good luck and thank you very much for your hard working.
Reply
#28
Just tried the last nightlie build and it's still stuttering a lot!HD and SD content!
With libstagefright I have a similar issue but only after a while! I think it's related to buffer release!I'm not quite sure!the log states exactly the same as before!
Reply
#29
Amazing, I've tested the latest nightly and I think this is the first time that an official Android build working on my Ainol Hero 10 (Amlogic 8726-MX) without weird issues (black screen, no text on menus) after a few minutes.
Of course hw acceleration for video isn't working (crashing when hw mediacodec enabled) but with software codec I can play sd content without an issue and also tvheadend client works perfect.
Reply
#30
please, lets keep this thread MediaCodec specific.
Reply
  • 1
  • 2(current)
  • 3
  • 4
  • 5
  • 12

Logout Mark Read Team Forum Stats Members Help
Support Thread for MediaCodec5