Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

可以支援 android 嗎? #48

Open
WeilJimmer opened this issue Sep 12, 2024 · 23 comments
Open

可以支援 android 嗎? #48

WeilJimmer opened this issue Sep 12, 2024 · 23 comments

Comments

@WeilJimmer
Copy link

可以支援 android 嗎?在原項目的 ijkplayer 是 android/ios 都支援。

這個項目在 android 也能用嗎?

@debugly
Copy link
Owner

debugly commented Sep 12, 2024

经历了这几年的更新,现在不保证 Android 平台还能用起来。支持安卓平台需要做的事情如下:

1、Android 平台的 FFmpeg 需要从 4.0 升级上来,其他依赖库需要编译,支持高版本 ndk
2、Android平台的视频渲染最好能用 Vulkan 替代 OpenGL ES
3、源码上的改动需要适配下,相对比较简单

大家有能力和兴趣,可以提 PR,我一个人的精力有限。
伸手党们可以对我打赏,大家都知道加班写代码的辛苦。

@vinayhvaghamshi
Copy link

I have interested with this aura. and I found that develop branch is active for request so would I able to push the new commit for android

@debugly
Copy link
Owner

debugly commented Sep 20, 2024

Contributions are welcomed.

@juntaosun
Copy link

@debugly 期待支持 Android !支持~

@lckjcnWq
Copy link

@debugly 麻烦支持android,谢谢

@wnpllrzodiac
Copy link

@debugly
Copy link
Owner

debugly commented Jan 15, 2025

我准备支持安卓平台了,谁能告诉我需要支持哪些CPU结构?这么多年过去了,是不是该更新了,下面是之前支持的:

FF_ACT_ARCHS_32="armv5 armv7a x86"
FF_ACT_ARCHS_64="armv5 armv7a arm64 x86 x86_64"

@debugly
Copy link
Owner

debugly commented Jan 15, 2025

搜下微信支持到安卓6.0,那么暂定API 使用 23 版本。

@lckjcnWq
Copy link

@debugly 多谢大佬,期待

@WeilJimmer
Copy link
Author

@debugly 非常期待!也非常感謝大大!

@graphenn
Copy link

非常期待

@debugly
Copy link
Owner

debugly commented Jan 18, 2025

最新进展: 安卓平台的openssl,ffmpeg库已经成功编译,通用三方库编译工具基本成形!

有个问题,除了这俩库你们还用到啥功能了,依赖了什么三方库?

@WeilJimmer
Copy link
Author

最新进展: 安卓平台的openssl,ffmpeg库已经成功编译,通用三方库编译工具基本成形!

有个问题,除了这俩库你们还用到啥功能了,依赖了什么三方库?

ffmpeg 編譯成功代表其內部的codec也都幾乎 support 嗎? (例如 wmv, rmvb, ogg 等,只要在編譯時加入 COMMON_FF_CFG_FLAGS 參數指定編碼就能用嗎?)

抱歉不是很理解這個,我知道 rtsp 會用到 openssl。

@lckjcnWq
Copy link

还依赖了libx264,还有个265的

@debugly
Copy link
Owner

debugly commented Jan 20, 2025

最新进展: 安卓平台的openssl,ffmpeg库已经成功编译,通用三方库编译工具基本成形!
有个问题,除了这俩库你们还用到啥功能了,依赖了什么三方库?

ffmpeg 編譯成功代表其內部的codec也都幾乎 support 嗎? (例如 wmv, rmvb, ogg 等,只要在編譯時加入 COMMON_FF_CFG_FLAGS 參數指定編碼就能用嗎?)

抱歉不是很理解這個,我知道 rtsp 會用到 openssl。

不依赖三方库的解码器是可以开启的,比如 opus 解码器就需要先编译 libopus才能开启。

@debugly
Copy link
Owner

debugly commented Jan 20, 2025

还依赖了libx264,还有个265的

x264? 解码是不需要的,当需要编码时才需要哇。

@debugly
Copy link
Owner

debugly commented Jan 20, 2025

编译受阻,/ijkplayer-arm64/src/main/jni/ffmpeg/Android.mk:ijkffmpeg: LOCAL_SRC_FILES points to a missing file
兄弟们,要等年后解决了。

@debugly
Copy link
Owner

debugly commented Jan 20, 2025

ndk-build 编译失败:

Android NDK: ERROR:~/ijkplayer/android/ijkplayer/ijkplayer-arm64/src/main/jni/ffmpeg/Android.mk:avcodec: LOCAL_SRC_FILES should point to a file ending with ".so" 
Android NDK: The following file is unsupported: ~/ijkplayer/android/contrib/build/ffmpeg-arm64/output/libswscale.a

我编译好了 ffmpeg 的静态库,然后使用 ndk-build 接着构建 ijkplayer.so 呢,就遇到了上面的问题。

谁能给我点确切的答案,ndk-build 不允许依赖静态库吗?

@WeilJimmer
Copy link
Author

WeilJimmer commented Jan 21, 2025

ndk-build 编译失败:

Android NDK: ERROR:~/ijkplayer/android/ijkplayer/ijkplayer-arm64/src/main/jni/ffmpeg/Android.mk:avcodec: LOCAL_SRC_FILES should point to a file ending with ".so" 
Android NDK: The following file is unsupported: ~/ijkplayer/android/contrib/build/ffmpeg-arm64/output/libswscale.a

我编译好了 ffmpeg 的静态库,然后使用 ndk-build 接着构建 ijkplayer.so 呢,就遇到了上面的问题。

谁能给我点确切的答案,ndk-build 不允许依赖静态库吗?

我看了一下 ijkplayer/android/ijkplayer/ijkplayer-arm64/src/main/jni/Android.mk

按照原版 ijk 的編譯流程,會生成一個 libijkffmpeg.so,這裡看起來就是將這個 libijkffmpeg.so 附加到 LOCAL_SRC_FILES 這個變數裡。

你有編譯出 libijkffmpeg.so 放在正確的位置嗎?

@debugly
Copy link
Owner

debugly commented Jan 22, 2025

我没有使用原版编译脚本,完全重写了,我编译出来的是一堆.a静态库。

@wnpllrzodiac
Copy link

重写建议用CMake脚本。
android放弃android.mk 了

@debugly
Copy link
Owner

debugly commented Jan 24, 2025

谢谢提醒,我准备把三方库都编译成静态库,然后打包出来一个ijkplayer.so的动态库,你感觉这样做好吗?
后续debug调试会受影响吗?

@wnpllrzodiac
Copy link

第三方库静态库可以。应该也没有需求调试第三方库。
静态库的坏处是 size比较大。以前boost的android ios 静态库,有1个G大。不便于分发。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants