Avoid using software decoder in android
Posted: 09 Jun 2018 20:45
Hi,
I'm developing an app using libvlc for android (to allow to be used from unity) but when I play a movie it seems it uses the software decoder and performance is very bad:
While debugging VLC it seems to choose ffmpeg (and performance is perfect):
Any ideas?
I'm developing an app using libvlc for android (to allow to be used from unity) but when I play a movie it seems it uses the software decoder and performance is very bad:
Code: Select all
06-09 15:05:30.507 19044-19396/es.arklay.uvlc D/VLC: [b9815b28/4bc4] avcodec decoder: CPU flags: 0x0000003f
06-09 15:05:30.511 19044-19396/es.arklay.uvlc D/VLC: [b9815b28/4bc4] avcodec decoder: allowing 4 thread(s) for decoding
06-09 15:05:30.514 19044-19396/es.arklay.uvlc D/VLC: [b9815b28/4bc4] avcodec decoder: codec (h264) started
06-09 15:05:30.514 19044-19396/es.arklay.uvlc D/VLC: [b9815b28/4bc4] avcodec decoder: using frame thread mode with 4 threads
06-09 15:05:30.514 19044-19396/es.arklay.uvlc D/VLC: [b9815b28/4bc4] core decoder: using decoder module "avcodec"
06-09 15:05:30.515 19044-19396/es.arklay.uvlc D/VLC: [e9fec028/4bc4] core decoder: looking for decoder module matching "mediacodec_ndk,all": 40 candidates
06-09 15:05:30.515 19044-19396/es.arklay.uvlc D/VLC: [e9fec028/4bc4] avcodec decoder: CPU flags: 0x0000003f
06-09 15:05:30.517 19044-19073/es.arklay.uvlc I/MediaSurfacePlugin: MediaSurface:: UnityRenderEvent UPDATE
06-09 15:05:30.521 19044-19396/es.arklay.uvlc D/VLC: [e9fec028/4bc4] avcodec decoder: codec (aac) started
06-09 15:05:30.522 19044-19396/es.arklay.uvlc D/VLC: [e9fec028/4bc4] core decoder: using decoder module "avcodec"
06-09 15:05:30.522 19044-19396/es.arklay.uvlc D/VLC: [eaa49a78/4bc4] core demux meta: looking for meta reader module matching "any": 2 candidates
06-09 15:05:30.524 19044-19396/es.arklay.uvlc D/VLC: [eaa49a78/4bc4] core demux meta: using meta reader module "taglib"
06-09 15:05:30.524 19044-19396/es.arklay.uvlc D/VLC: [eaa5e9a8/4bc4] core demux: removing module "taglib"
06-09 15:05:30.524 19044-19396/es.arklay.uvlc D/VLC: [d8436028/4bc4] core input: `file:///storage/emulated/0/Android/data/es.arklay.uvlc/files/temp.mp4' successfully opened
06-09 15:05:30.525 19044-19396/es.arklay.uvlc D/VLC: [eaa5e9a8/4bc4] mp4 demux: elst (0) gives 0ms (movie)-> 0ms (track)
06-09 15:05:30.525 19044-19396/es.arklay.uvlc D/VLC: [eaa5e9a8/4bc4] mp4 demux: track[Id 0x1] using Sync Sample Box (stss)
06-09 15:05:30.525 19044-19396/es.arklay.uvlc D/VLC: [eaa5e9a8/4bc4] mp4 demux: stss gives 0 --> 0 (sample number)
06-09 15:05:30.525 19044-19396/es.arklay.uvlc D/VLC: [eaa5e9a8/4bc4] mp4 demux: elst (0) gives 0ms (movie)-> 0ms (track)
06-09 15:05:30.525 19044-19396/es.arklay.uvlc D/VLC: [d8436028/4bc4] core input: Buffering 0%
06-09 15:05:30.525 19044-19397/es.arklay.uvlc D/VLC: [b9815b28/4bc5] avcodec decoder: available software decoder output format 0 (yuv420p)
06-09 15:05:30.525 19044-19394/es.arklay.uvlc E/VLC-std: [h264 @ 0xb9816200] Reinit context to 3840x2160, pix_fmt: 0
Code: Select all
06-09 19:25:53.125 26218-26311/org.videolan.vlc.debug D/VLC: [bc02ac30/66c7] libvlc decoder: allowing 6 thread(s) for decoding
06-09 19:25:53.127 26218-26311/org.videolan.vlc.debug D/VLC: [bc02ac30/66c7] libvlc decoder: codec (h264) started
[bc02ac30/66c7] libvlc decoder: using frame thread mode with 6 threads
[bc02ac30/66c7] libvlc decoder: using video decoder module "avcodec"
06-09 19:25:53.128 26218-26311/org.videolan.vlc.debug D/VLC: [bc02aeb0/66c7] libvlc decoder: looking for audio decoder module matching "mediacodec_ndk,all": 17 candidates
[bc02aeb0/66c7] libvlc decoder: using ffmpeg Lavc58.6.103
[bc02aeb0/66c7] libvlc decoder: CPU flags: 0x0000003f
06-09 19:25:53.134 26218-26311/org.videolan.vlc.debug D/VLC: [bc02aeb0/66c7] libvlc decoder: codec (aac) started
[bc02aeb0/66c7] libvlc decoder: using audio decoder module "avcodec"
[ab798b10/66c7] libvlc demux meta: looking for meta reader module matching "any": 2 candidates
06-09 19:25:53.137 26218-26311/org.videolan.vlc.debug D/VLC: [ab798b10/66c7] libvlc demux meta: using meta reader module "taglib"
[ab7fe870/66c7] libvlc demux: removing module "taglib"
[c2abd830/66c7] libvlc input: `file:///storage/emulated/0/vlctemp.mp4' successfully opened
[ab7fe870/66c7] libvlc demux: elst (0) gives 0ms (movie)-> 0ms (track)
06-09 19:25:53.137 26218-26218/org.videolan.vlc.debug I/VLC/MediaDatabase: Media.Event.ParsedChanged