win10子系統linux編譯ffmpeg

android-ndk-r14b(linux版)

ffmpeg-4.0

開啟win10子系統(控制面板-》程序和功能-》啟用或關閉Windows功能 然后在 適用與 Linux 的 Windows 子系統前面打勾)

然后點擊確定,等待安裝,電腦會重啟

然后在win10應用商店 搜索ubuntu安裝后 即可打開liunx控制臺(以后直接在windows控制臺輸入bash即可進入linux控制臺)

首次進入linux控制臺后還需要安裝gcc和make

安裝 gcc
apt-get install gcc
安裝 make
apt-get install make

?下面是執行的命令 ffmpeg的configure不需要做任何修改

android-ndk-r14b可以編譯成功,但是使用android-ndk-r16卻編譯不通過

在e:/ffmpeg/4.0/build/ffmpeg-4.0/目錄下 新建?build.sh 文件內容如下?cd到該目錄下 執行chmod 777 build.sh? 在執行./build.sh? ??

#!/bin/sh
cd /mnt/e/ffmpeg/4.0/build/ffmpeg-4.0
#這里的這些變量根據自己本地的環境切換
export NDK=/mnt/e/ffmpeg/SDK/android-ndk-r14b
export PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt 
export PLATFORM=$NDK/platforms/android-16/arch-arm
export TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64
export CPU=arm
export PREFIX=/mnt/e/ffmpeg/4.0/build/android/$CPUbuild_one(){
./configure \
--target-os=linux \
--prefix=$PREFIX \
--enable-cross-compile \
--disable-asm \
--arch=$CPU \
--cross-prefix=$PREBUILT/linux-x86_64/bin/arm-linux-androideabi- \
--disable-stripping \
--nm=$PREBUILT/linux-x86_64/bin/arm-linux-androideabi-nm \
--sysroot=$PLATFORM \
--enable-gpl \
--enable-static \
--disable-shared \
--enable-small \
--disable-ffprobe \
--disable-ffplay \
--disable-ffmpeg \
--disable-debug \
$ADDITIONAL_CONFIGURE_FLAG
make clean
make j8
make install
}build_one$TOOLCHAIN/bin/arm-linux-androideabi-ld \
-rpath-link=$PLATFORM/usr/lib \
-L$PLATFORM/usr/lib \
-L$PREFIX/lib \
-soname libffmpeg.so -shared -nostdlib -Bsymbolic --whole-archive --no-undefined -o \
$PREFIX/libffmpeg.so \
libavcodec/libavcodec.a \
libavfilter/libavfilter.a \
libswresample/libswresample.a \
libavformat/libavformat.a \
libavutil/libavutil.a \
libswscale/libswscale.a \
libpostproc/libpostproc.a \
libavdevice/libavdevice.a \
-lc -lm -lz -ldl -llog --dynamic-linker=/system/bin/linker \
$TOOLCHAIN/lib/gcc/arm-linux-androideabi/4.9.x/libgcc.a \cd ..

?這里我只編譯了arm架構的

android ffmpeg的簡單使用

?

轉載于:https://www.cnblogs.com/rchao/p/8973811.html

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/390559.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/390559.shtml
英文地址,請注明出處:http://en.pswp.cn/news/390559.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

ip登錄打印機怎么打印_不要打印,登錄。

ip登錄打印機怎么打印Often on Python, especially as a beginner, you might print( ) a variable in order to see what is happening in your program. It is possible if you rely on too many print statements throughout your program you will face the nightmare of h…

leetcode 451. 根據字符出現頻率排序

給定一個字符串,請將字符串里的字符按照出現的頻率降序排列。 示例 1:輸入: "tree"輸出: "eert"解釋: e出現兩次,r和t都只出現一次。 因此e必須出現在r和t之前。此外,"eetr"也是一個有效的答案。 示例 2:輸入…

Spring-Security 自定義Filter完成驗證碼校驗

Spring-Security的功能主要是由一堆Filter構成過濾器鏈來實現,每個Filter都會完成自己的一部分工作。我今天要做的是對UsernamePasswordAuthenticationFilter進行擴展,新增一個Filter,完成對登錄頁面的校驗碼的驗證。下面先給一張過濾器的說明…

如何使用Ionic和Firebase在短短三天內創建冠狀病毒跟蹤器應用程序

I am really fond of Hybrid App technologies – they help us achieve so much in a single codebase. Using the Ionic Framework, I developed a cross-platform mobile solution for tracking Coronavirus cases in just 3 days. 我真的很喜歡Hybrid App技術-它們可以幫助…

二、Java面向對象(7)_封裝思想——this關鍵字

2018-04-30 this關鍵字 什么是this: 表示當前對象本身,或當前類的一個實例,通過 this 可以調用本對象的所有方法和屬性。 this主要存在于兩個地方: 1)構造函數:此時this表示調用當前創建的對象 2)成員方法中…

機器學習模型 非線性模型_調試機器學習模型的終極指南

機器學習模型 非線性模型You’ve divided your data into a training, development and test set, with the correct percentage of samples in each block, and you’ve also made sure that all of these blocks (specially development and test set) come from the same di…

leetcode 645. 錯誤的集合

集合 s 包含從 1 到 n 的整數。不幸的是,因為數據錯誤,導致集合里面某一個數字復制了成了集合里面的另外一個數字的值,導致集合 丟失了一個數字 并且 有一個數字重復 。 給定一個數組 nums 代表了集合 S 發生錯誤后的結果。 請你找出重復出…

Linux環境變量總結

現在每天測試到時候會與Linux打交道,自然也會用到環境變量了。看了網上幾篇文章,結合自己到實踐和看法,總結以下Linux的環境變量吧。一、什么是環境變量?環境變量相當于給系統或用戶應用程序設置的一些參數, 具體起什么作用這當然…

目錄指南中的Python列表文件-listdir VS system(“ ls”)通過示例進行解釋

🔹歡迎 (🔹 Welcome) If you want to learn how these functions work behind the scenes and how you can use their full power, then this article is for you.如果您想了解這些功能在后臺如何工作以及如何充分利用它們的功能,那么本文適合…

Java多線程并發學習-進階大綱

1、synchronized 的實現原理以及鎖優化?2、volatile 的實現原理?3、Java 的信號燈?4、synchronized 在靜態方法和普通方法的區別?5、怎么實現所有線程在等待某個事件的發生才會去執行?6、CAS?CAS 有什么缺陷…

大數據定律與中心極限定理_為什么中心極限定理對數據科學家很重要?

大數據定律與中心極限定理數據科學 (Data Science) The Central Limit Theorem is at the center of statistical inference what each data scientist/data analyst does every day.中心極限定理是每個數據科學家/數據分析師每天所做的統計推斷的中心。 Central Limit Theore…

useEffect語法講解

useEffect語法講解 用法 useEffect(effectFn, deps)能力 useEffect Hook 相當于 componentDidMount,componentDidUpdate 和 componentWillUnmount 這三個函數的組合。 可以模擬渲染后、更新后、銷毀三個動作。 案例演示 渲染后更新標題 useEffect(()>{doc…

leetcode 726. 原子的數量

給定一個化學式formula(作為字符串),返回每種原子的數量。 原子總是以一個大寫字母開始,接著跟隨0個或任意個小寫字母,表示原子的名字。 如果數量大于 1,原子后會跟著數字表示原子的數量。如果數量等于 1…

web相關基礎知識1

2017-12-13 09:47:11 關于HTML 1.絕對路徑和相對路徑 相對路徑:相對于文件自身為參考。 (工作中一般是使用相對路徑) 這里我們用html文件為參考。如果說html和圖片平級,那直接使用src 如果說圖片在和html平級的文件夾里面&#xf…

JavaScript循環:標簽語句,繼續語句和中斷語句說明

標簽聲明 (Label Statement) The Label Statement is used with the break and continue statements and serves to identify the statement to which the break and continue statements apply. Label語句與break和continue語句一起使用,用于標識break和continue語…

馬約拉納費米子:推動量子計算的“天使粒子”

據《人民日報》報道,以華人科學家為主體的科研團隊找到了正反同體的“天使粒子”——馬約拉納費米子,從而結束了國際物理學界對這一神秘粒子長達80年的漫長追尋。該成果由加利福尼亞大學洛杉磯分校何慶林、王康隆課題組,美國斯坦福大學教授張…

leetcode 1711. 大餐計數

大餐 是指 恰好包含兩道不同餐品 的一餐,其美味程度之和等于 2 的冪。 你可以搭配 任意 兩道餐品做一頓大餐。 給你一個整數數組 deliciousness ,其中 deliciousness[i] 是第 i?????????????? 道餐品的美味程度,返回你可以用…

您的第一個簡單的機器學習項目

This article is for those dummies like me, who’ve never tried to know what machine learning was or have left it halfway for the sole reason of being overwhelmed. Follow through every line and stay along. I promise you’d be quite acquainted with giving yo…

eclipse報Access restriction: The type 'BASE64Decoder' is not API處理方法

今天從svn更新代碼之后,由于代碼中使用了BASE64Encoder 更新之后報如下錯誤: Access restriction: The type ‘BASE64Decoder’ is not API (restriction on required library ‘D:\java\jdk1.7.0_45\jre\lib\rt.jar’) 解決其實很簡單,把JR…

【躍遷之路】【451天】程序員高效學習方法論探索系列(實驗階段208-2018.05.02)...

(躍遷之路)專欄 實驗說明 從2017.10.6起,開啟這個系列,目標只有一個:探索新的學習方法,實現躍遷式成長實驗期2年(2017.10.06 - 2019.10.06)我將以自己為實驗對象。我將開源我的學習方法,方法不斷…