听说vlc底层也用的ffmpeg,免费开源的,业界做的不错的,就来看看 从网上找了很多例子,也从github上找了好多demo,好多都不全,或者下载下来编译失败 官网上下载的vlc-android就编译失败。 下面列两个可以用的: 一.有vlc源码,可以编译 https://github.com/qenter/vlc-android.git
最新版,这个有vlc/vlc.h,能编译
https://github.com/qenter/vlc-android.git
vlc-android/vlc/include/vlc/vlc.h
项目目录挪到这个下面: /home/qian/github/vlc-android/
1.sudoapt-get install automake ant autopoint cmake build-essentiallibtool patch pkg-config protobuf-compiler ragel subversionunzip git
2.路径,自己编译需要修改,如果是androidstudio就不用改这个:/home/qian/github/vlc-android/下的
local.properties文件修改
sdk.dir=/lbg/android/android-sdk-linux
ndk.dir=/lbg/android/android-ndk-r12b
3.运行,自己编译需要修改,如果是androidstudio就不用改这个: ./gradlew
4.安装autoconf:
cd/home/qian/github/vlc-android/vlc
sudo./bootstrap
5.执行命令,自己编译需要修改,如果是androidstudio就不用改这个:
exportANDROID_NDK=/lbg/android/android-ndk-r12b
exportANDROID_SDK=/lbg/android/android-sdk-linux
编译库:sudo ./compile-libvlc.sh -a arm
ARM: (armeabi-v7a|arm)
ARM64: (arm64-v8a|arm64)
X86: x86, x86_64
MIPS: mips, mips64.
5.自己编译需要修改,如果是androidstudio就不用改这个:
ANDROID_NDK,ANDROID_SDK
删除了一段测试:
TESTED_HASH=c7b91b5
if[ ! -d "vlc" ]; then
diagnostic"VLC source not found, cloning"
gitclone git://git.videolan.org/vlc.git vlc
checkfail"vlc source: git clone failed"
else
diagnostic"VLC source found"
cdvlc
if! git cat-file -e ${TESTED_HASH}; then
cat1>&2 << EOF
***
***Error: Your vlc checkout does not contain the latest tested commit:${TESTED_HASH}
***
EOF
exit1
fi
cd..
fi
#----------------------
1.ndk需要12版本
2.需要设置变量—— exportANDROID_NDK_HOME=/lbg/android/android-ndk-r8e
chmod+x ./compile-libvlc.sh
sudo./compile-libvlc.sh
库的路径:
/lbg/android/vlc/guanfang/vlc-android/vlc/contrib/tarballs
可以去网上搜索:tarballs
二.vlc-android源码-缩减了只剩下Android部分 https://github.com/xuie0000/vlc-android
安装配置:
sudo apt-get install automake ant autopoint cmake build-essential libtool \ patch pkg-config protobuf-compiler ragel subversion unzip git
缺点,可以播放, 不能编译,缺很多库
[armeabi]Compile arm : vlcjni <= libvlcjni.c
jni/libvlcjni.c:37:31:fatal error: libvlcjni-modules.h: No such file or directory
奇怪的地方:库很多,不好识别
ayear ago |
| ||
| ayear ago | ||
| ayear ago | ||
| ayear ago | ||
| ayear ago | ||
| ayear ago | ||
| ayear ago | ||
| ayear ago | ||
| ayear ago | ||
| ayear ago | ||
| ayear ago |
完整版vlc
https://github.com/xuie0000/VLC