Git Product home page Git Product logo

Comments (9)

lewis-v avatar lewis-v commented on June 20, 2024 2

是使用asset的方式播放的问题,使用File的方式播放就好了

from vap.

hexleo avatar hexleo commented on June 20, 2024

这里MediaExtractor低版本确实有兼容问题,这个我想办法解决。这里你先检查一下,有没有校验文件的md5,遇到很多问题是上传服务器后,mp4被服务器修改导致文件有问题。我们的vap工具输出的时候有原始的md5,不要用服务器的hash进行校验。或者你升级到2.0.11试试,看看能不能避免这个问题。

from vap.

lewis-v avatar lewis-v commented on June 20, 2024

使用的动效视频是本地资源,而且日志上看是一开始是播放正常的,但是播放多几次就出问题了(同一个View)

from vap.

hexleo avatar hexleo commented on June 20, 2024

素材是h264的还是h265的

from vap.

lewis-v avatar lewis-v commented on June 20, 2024

h264的
这个是用ffmpeg输出的信息
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.29.100
Duration: 00:00:10.00, start: 0.000000, bitrate: 1872 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 736x912, 1871 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
Metadata:
handler_name : VideoHandler

from vap.

hexleo avatar hexleo commented on June 20, 2024

你用的是哪个版本?我这代码行数对不上

from vap.

hexleo avatar hexleo commented on June 20, 2024

先记录下当前结论:
播放接口:fun startPlay(assetManager: AssetManager, assetsPath: String)

这里应该MediaExtractor的兼容问题,目前想到的解决方法是手动实现mp4封装,但工作量比较大,手动实现mp4解封装需要充分测试

from vap.

lewis-v avatar lewis-v commented on June 20, 2024

对应2.0.9的HardDecoder的228
private fun release(decoder: MediaCodec?, extractor: MediaExtractor?) {
renderThread.handler?.post {
render?.clearFrame()
try {
ALog.i(TAG, "release")
decoder?.apply {
stop()
release()
}
extractor?.release()//这里。。。。。
glTexture?.release()
glTexture = null
speedControlUtil.reset()
player.pluginManager.onRelease()
render?.releaseTexture()
} catch (e: Throwable) {
ALog.e(TAG, "release e=$e", e)
}
isRunning = false
onVideoComplete()
if (needDestroy) {
destroyInner()
}
}
}

from vap.

luohong avatar luohong commented on June 20, 2024

荣耀 BND AL10 Android 8.0.0,level 26,VAP V2.0.13 遇到了同样的问题。出错堆栈:

1 #00 pc 0004b97c /system/lib/libc.so (tgkill+12) [armeabi-v7a]
2 #1 pc 0001a4e3 /system/lib/libc.so (abort+54) [armeabi-v7a]
3 #2 pc 000c29df /system/lib/libstagefright.so (android::MPEG4Extractor::parseChunk(long long*, int)+13962) [armeabi-v7a]
4 #3 pc 000c097b /system/lib/libstagefright.so (android::MPEG4Extractor::parseChunk(long long*, int)+5670) [armeabi-v7a]
5 #4 pc 000c097b /system/lib/libstagefright.so (android::MPEG4Extractor::parseChunk(long long*, int)+5670) [armeabi-v7a]
6 #5 pc 000c097b /system/lib/libstagefright.so (android::MPEG4Extractor::parseChunk(long long*, int)+5670) [armeabi-v7a]
7 #6 pc 000bef03 /system/lib/libstagefright.so (android::MPEG4Extractor::readMetaData()+98) [armeabi-v7a]
8 #7 pc 000bf12d /system/lib/libstagefright.so (android::MPEG4Extractor::countTracks()+4) [armeabi-v7a]
9 #8 pc 000e6f63 /system/lib/libstagefright.so (android::MediaExtractor::CreateFromService(android::spandroid::DataSource const&, char const*, unsigned int)+1066) [armeabi-v7a]
10 #9 pc 000e6a55 /system/lib/libstagefright.so (android::MediaExtractor::Create(android::spandroid::DataSource const&, char const*)+228) [armeabi-v7a]
11 #10 pc 000ee77f /system/lib/libstagefright.so (android::NuMediaExtractor::setDataSource(int, long long, long long)+142) [armeabi-v7a]
12 #11 pc 0002a5e3 /system/lib/libmedia_jni.so [armeabi-v7a]
13 #12 pc 0067df5f /system/framework/arm/boot-framework.oat (oatexec+6807391) [armeabi]
14 java:
15 com.tencent.qgame.animplayer.FileContainer.setDataSource(FileContainer.kt:5)
16 com.tencent.qgame.animplayer.util.MediaUtil.getExtractor(MediaUtil.kt:2)
17 com.tencent.qgame.animplayer.AudioPlayer.startPlay(AudioPlayer.kt:1)
18 com.tencent.qgame.animplayer.AudioPlayer.access$startPlay(AudioPlayer.kt:1)
19 com.tencent.qgame.animplayer.AudioPlayer$start$1.run(AudioPlayer.kt:1)
20 android.os.Handler.handleCallback(Handler.java:808)

from vap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.