Support Thread for MediaCodec

  Thread Rating:
  • 5 Votes - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Hedda Offline
Fan
Posts: 436
Joined: Feb 2013
Reputation: 9
Post: #166
(2014-09-29 14:13)fritsch Wrote:  No ETA. Leave the code to the devs, especially as you see that Koying has assigned himself to the PR 16 hours ago.

If you want to help testing this PR, cherry-pick it, build it and try running it.
da-anda initiated a test build of XBMC with the patch which is now available at

http://mirrors.xbmc.org/test-builds/android/arm/

xbmc-20140915-9ad0ac9-hevc-hw-accel-armeabi-v7a.apk

Direct download link: http://mirrors.xbmc.org/test-builds/andr...bi-v7a.apk
(This post was last modified: 2014-09-29 16:43 by Hedda.)
find quote
AVRaskatov Offline
Junior Member
Posts: 2
Joined: Oct 2014
Reputation: 0
Post: #167
I have Android 4.2 Smart TV on MSTAR MSD6369IV. MXplayer shows any x264 1080p video hardware decoding. HBMS 13.2 and 14a only in the software mode. Can I install other / third-party codecs in XBMC/KODI?
find quote
tdw197 Offline
Senior Member
Posts: 241
Joined: Oct 2006
Reputation: 0
Post: #168
Is there an mediacodec equivalent to the advancedsettings for libstagefright:

<stagefright>
<usempeg2codec>0</usempeg2codec
</stagefright>

I want to disable mediacodec for mpeg2, but use for everything else (enabling mediacodec screws up deinterlacing on my fire tv,whilst libstagefright works fine - however, mediacodec works better on high bit rate h264)
find quote
karhukuoma Offline
Junior Member
Posts: 12
Joined: Nov 2014
Reputation: 0
Location: Finland
Post: #169
From Nexus 9 android 5, tegra 64-bit
(2014-11-21 00:22)karhukuoma Wrote:  
(2014-11-20 23:53)Koying Wrote:  https://github.com/xbmc/xbmc/pull/5773

Could you test http://mirrors.xbmc.org/test-builds/andr...bi-v7a.apk to confirm it's ok, please.

Installs, but crashes when trying to play videos atleast from SMB or UPnP sources. Local file seems to work. I can get the logcat this evening if no one gets it first.

Does this seem to be releted to nexus9? Same upnp source and file works on nexus5 lollipop with xbmc gotham 13.1.
Code:
V/XBMC    ( 6245): Debug Print: void XCURL::DllLibCurlGlobal::easy_aquire(const char*, const char*, XCURL::CURL_HANDLE**, XCURL::CURLM**) - Created session to http://192.168.0.2
V/XBMC    ( 6245): Debug Print: ------ Window Init (DialogBusy.xml) ------
V/XBMC    ( 6245): Debug Print: Window DialogBusy.xml was already loaded
V/XBMC    ( 6245): Debug Print: Alloc resources: 0.01m
V/XBMC    ( 6245): Debug Print: Unfocus WindowID: 10025, ControlID: 50
V/XBMC    ( 6245): Debug Print: SECTION:UnloadDelayed(DLL: libImageLib-arm.so)
V/XBMC    ( 6245): Debug Print: Unloading: /libImageLib-arm.so
V/XBMC    ( 6245): Debug Print: CCurlFile::GetMimeType - http://192.168.0.2:5001/get/0$1$11/south.park.1806.mp4 -> video/mpeg
V/XBMC    ( 6245): Debug Print: CFileCache::Open - opening <get/0$1$11/south.park.1806.mp4> using cache
V/XBMC    ( 6245): Debug Print: CurlFile::Open(0xac2d8cf8) http://192.168.0.2:5001/get/0$1$11/south.park.1806.mp4
V/XBMC    ( 6245): Debug Print: Creating Demuxer
V/XBMC    ( 6245): Debug Print: Thread FileCache start, auto delete: false
V/XBMC    ( 6245): Debug Print: bool CDVDDemuxFFmpeg::Open(CDVDInputStream*, bool, bool) - probing detected format [mpegts]
V/XBMC    ( 6245): Debug Print: bool CDVDDemuxFFmpeg::Open(CDVDInputStream*, bool, bool) - avformat_find_stream_info starting
V/XBMC    ( 6245): Debug Print: bool CDVDDemuxFFmpeg::Open(CDVDInputStream*, bool, bool) - av_find_stream_info finished
V/XBMC    ( 6245): Debug Print: Opening stream: 0 source: 256
V/XBMC    ( 6245): Debug Print: Creating video codec with codec id: 28
V/XBMC    ( 6245): Debug Print: CDVDFactoryCodec: compiled in hardware support: AMCodec:yes MediaCodec:yes OpenMax:no libstagefright:yes VDPAU:no VAAPI:no iMXVPU:no
V/XBMC    ( 6245): Debug Print: MediaCodec Video Decoder...
V/XBMC    ( 6245): Debug Print: FactoryCodec - Video: mediacodec - Opening
W/VideoCapabilities( 6245): Unsupported mime video/mpeg2
W/AudioCapabilities( 6245): Unsupported mime audio/mpeg-L2
W/VideoCapabilities( 6245): Unrecognized level 0 for video/x-vnd.on2.vp8
I/VideoCapabilities( 6245): Unsupported profile 4 for video/mp4v-es
I/OMXClient( 6245): Using client-side OMX mux.
V/XBMC    ( 6245): Debug Print: CDVDVideoCodecAndroidMediaCodec::Open m_codecname(OMX.Nvidia.h264.decode), colorFormat(2135033992)
V/XBMC    ( 6245): Debug Print: CDVDVideoCodecAndroidMediaCodec::Open m_codecname(OMX.Nvidia.h264.decode), colorFormat(21)
W/ACodec  ( 6245): cannot describe color format 0x15 = 21 with stride=0 and sliceHeight=404
F/ACodec  ( 6245): frameworks/av/media/libstagefright/ACodec.cpp:3232 CHECK_LE( rect.nLeft + rect.nWidth - 1,videoDef->nFrameWidth) failed: 4294967295 vs. 0
--------- beginning of crash
F/libc    ( 6245): Fatal signal 6 (SIGABRT), code -6 in tid 6429 (CodecLooper)
I/libc    ( 6245): Suppressing debuggerd output because prctl(PR_GET_DUMPABLE)==0
I/WindowState(18195): WIN DEATH: Window{35d0158c u0 org.xbmc.kodi/org.xbmc.kodi.Main}
E/OMXNodeInstance(17949): !!! Observer died. Quickly, do something, ... anything...
I/Zygote  ( 1077): Process 6245 exited due to signal (6)
I/ActivityManager(18195): Process org.xbmc.kodi (pid 6245) has died
W/ActivityManager(18195): Force removing ActivityRecord{361af9eb u0 org.xbmc.kodi/.Main t821}: app died, no saved state
W/SearchServiceClient(19365): Attempt to handover from detached client
find quote
RockerC Offline
Fan
Posts: 418
Joined: May 2011
Reputation: 4
Post: #170
(2014-11-06 12:23)tdw197 Wrote:  Is there an mediacodec equivalent to the advancedsettings for libstagefright:

<stagefright>
<usempeg2codec>0</usempeg2codec
</stagefright>

I want to disable mediacodec for mpeg2, but use for everything else (enabling mediacodec screws up deinterlacing on my fire tv,whilst libstagefright works fine - however, mediacodec works better on high bit rate h264)
Probabaly wrong thread for this request but +1 for the suggestion forum.kodi.tv/showthread.php?tid=168268
find quote
tdw197 Offline
Senior Member
Posts: 241
Joined: Oct 2006
Reputation: 0
Post: #171
(2014-12-09 13:30)RockerC Wrote:  
(2014-11-06 12:23)tdw197 Wrote:  Is there an mediacodec equivalent to the advancedsettings for libstagefright:

<stagefright>
<usempeg2codec>0</usempeg2codec
</stagefright>

I want to disable mediacodec for mpeg2, but use for everything else (enabling mediacodec screws up deinterlacing on my fire tv,whilst libstagefright works fine - however, mediacodec works better on high bit rate h264)
Probabaly wrong thread for this request but +1 for the suggestion forum.kodi.tv/showthread.php?tid=168268

It's there in spmc, have a look at the advanced settings page of the wiki
find quote
elmcguinness Offline
Junior Member
Posts: 33
Joined: Jun 2013
Reputation: 0
Post: #172
I have an odd issue with an old set of AVI files being played by KODI, they simply refuse to play under mediacodec, but play fine via libstagefright. The device this is being played on is an OUYA and I am using the build: 14.0 Git:2014-12-23-ad747d9-dirty.

To be clear, when trying to play these files with mediacodec and libstagefright enabled I only hear audio for a fraction of a second and see no video, followed by Kodi promptly crashing. However, if I disable mediacodec I then can play the files without a hitch. Please let me know if there is anymore information I can provide.

mediainfo for a file
Code:
General
Format                                   : AVI
Format/Info                              : Audio Video Interleave
File size                                : 349 MiB
Duration                                 : 1h 30mn
Overall bit rate mode                    : Variable
Overall bit rate                         : 541 Kbps
Writing application                      : VirtualDubMod 1.5.10.1 (build 2366/release)
Writing library                          : VirtualDubMod build 2366/release

Video
ID                                       : 0
Format                                   : MPEG-4 Visual
Format settings, BVOP                    : 2
Format settings, QPel                    : No
Format settings, GMC                     : 2 warppoints
Format settings, Matrix                  : Default (H.263)
Codec ID                                 : DX50
Codec ID/Hint                            : DivX 5
Duration                                 : 1h 30mn
Bit rate                                 : 447 Kbps
Width                                    : 384 pixels
Height                                   : 288 pixels
Display aspect ratio                     : 4:3
Frame rate                               : 23.976 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.169
Stream size                              : 288 MiB (83%)
Writing library                          : DivX 1328m

Audio
ID                                       : 1
Format                                   : MPEG Audio
Format version                           : Version 1
Format profile                           : Layer 3
Mode                                     : Joint stereo
Mode extension                           : MS Stereo
Codec ID                                 : 55
Codec ID/Hint                            : MP3
Duration                                 : 1h 30mn
Bit rate mode                            : Variable
Bit rate                                 : 80.0 Kbps
Channel(s)                               : 2 channels
Sampling rate                            : 44.1 KHz
Compression mode                         : Lossy
Stream size                              : 52.1 MiB (15%)
Alignment                                : Aligned on interleaves
Interleave, duration                     : 26 ms (0.63 video frame)
Interleave, preload duration             : 237 ms
Writing library                          : LAME3.90.
Encoding settings                        : -m j -V 4 -q 2 -lowpass 13.6 --abr 80

Logcat of crash with mediacodec

I apologize in advance if this is the wrong area in the forum, but it did seem to fit the issue.
find quote
Koying Online
Team-Kodi Member
Posts: 2,433
Joined: Sep 2008
Reputation: 48
Location: Brussels, Belgium
Post: #173
Yeah. I have a PR to not even try to h/w decode SD MP4's.
Those are quite messy and easily break h/w decoders, while they can easily be decoded in s/w by ffmpeg.
find quote
elmcguinness Offline
Junior Member
Posts: 33
Joined: Jun 2013
Reputation: 0
Post: #174
Sounds great Koying, thanks for all your work. I was thinking I would just rerip all these files to hd and x264, but that PR will save me the trouble.
find quote
Post Reply