UBUNTU16 64位編譯VLC-2.2.8/4 WIN32應用 遇到的問題及解決辦法
主要參考:
https://blog.csdn.net/longji/article/details/52304590 vlc-2.2.4 交叉編譯 UbuntuX64_1604_Desktop 編譯windows版本vlc
1,make prebuilt 時不要自動下載vlc-contrib-i686-w64-mingw32-latest.tar.bz2,請下載 手動下載
20150630及以前版本不要使用,否則在後邊MAKE時會出MKV等模組編譯失敗。
最新的版本也不能使用,否則會提示libavautil等版本不能使用大小55或56的新版本。
2, 有這些相關報錯時:gperf,flex,bison,等,可用 sudo apt-get install gperf flex bison安裝。
3,JAVA版本,一定要看清楚:
java version "1.8.0_181" Java(TM) SE Runtime Environment (build 1.8.0_181-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
如果是openjdk 需要:sudo apt-get remove openjdk* 參考https://www.linuxidc.com/Linux/2017-02/140908.htm 解除安裝後發現ANT也沒有了,需要重新安裝。不知為什麼我每次開一個終端看JAVA版本還是OPENJDK 只能再重新寫下配置讓其生效後才得到想要的JDK1.8
4, 64位UBUNTU上編譯VLC時提示需要32位LUAC 按以下方式安裝。 configure: error: You need 32-bits luac when using lua from contrib 參考:https://stackoverflow.com/questions/36273574/configure-error-you-need-32-bits-luac-when-using-lua-from-contrib sudo apt-get install lua5.1:i386
5,2.2.8目前在打包時不能下載 失敗,但編譯出的程式是可用的。
6,這兩個版本都能正常播放視訊, 但我串流時能拉流,轉換為HTTP流推出時失敗, 試了下官方的好象也不行,不知是不是版本問題,官方的3.0以上版本是可以的。
7,使用 sudo make install 否則可能有許可權問題。
8,最後一步make package-win32-zip 遇到錯誤 提示/usr/include/wine/windows/stdole2.idl 檔案找不到,
我試了下:sudo apt-get install wine-dev 可以了。
9,以下為主要命令:
sudo wget https://mirrors.ustc.edu.cn/videolan-ftp/vlc/3.0.4/vlc-3.0.4.tar.xz sudo apt-get install gcc-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64-tools sudo apt-get update sudo apt-get upgrade
sudo apt-get install gcc-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64-tools sudo apt-get install lua5.1 lua5.2 liblua5.1-dev liblua5.2.dev sudo apt-get install libtool automake autoconf autopoint make gettext sudo apt-get install pkg-config qt4-dev-tools qt5-default sudo apt-get install git subversion cmake cvs zip p7zip p7zip-full nsis bzip2 sudo apt-get install yasm ragel wine-dev sudo wget https://mirrors.ustc.edu.cn/videolan-ftp/contrib/i686-w64-mingw32/vlc-contrib-i686-w64-mingw32-20160218.tar.bz2 ../bootstrap --host=i686-w64-mingw32 make prebuilt cd ../.. cd win32 ../bootstrap
sudo apt-get install flex bison sudo apt-get install gperf
//以下配置注意版本,這是2.2.4的 export PKG_CONFIG_PATH=$HOME/vlc-2.2.4/contrib/i686-w64-wingw32/lib/pkgconfig export PKG_COFIG_LIBDIR=$HOME/vlc-2.2.4/contrib/i686-w64-mingw32/lib/pkgconfig export PKG_CONFIG_PATH_CUSTOM=$PKG_CONFIG_LIBDIR
java -version
../configure --host=i686-w64-mingw32 make make package-win-common wine ./vlc-2.2.4/vlc.exe sudo apt-get install wine wine ./vlc-2.2.4/vlc.exe make package-win32-7zip sudo apt-get install wine-dev make package-win32-7zip 編譯出的庫比官方小, 串流時能拉出流,卻不能推出HTTP OGG的流。VLM返回流失敗