ubuntu12.10+NDK r9 编译 ffmpeg 的一些参考资料Perhaps you should add the directory containing `libssl.pc'
首先入门级的 编译宝典:
https://trac.ffmpeg.org/wiki/CompilationGuide/Android
http://www.roman10.net/how-to-build-ffmpeg-with-ndk-r9/
二进制文件+so库:
https://github.com/cine-io/android-ffmpeg-with-rtmp
一个利用二进制可执行文件的例子:
https://github.com/vanevery/Android-MJPEG-Video-Capture-FFMPEG
build_android.sh参数配置参考:http://www.cnblogs.com/ohmytime/archive/2013/05/12/ffmpeg-build-help.html
参数参考:http://www.cnblogs.com/ohmytime/archive/2013/05/12/ffmpeg-build-help.html
其次,确定你本地的 ssh正确生成并添加到了你的github的ssh 管理列表中,下面编译需要使用。
我的rsa:参考:http://blog.csdn.net/wide288/article/details/21003749
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDC/1KQiZR/lTMYOKSUajVK/KRyn3oTOC8sIhNztoxvN36mL/B2u3bx8pUNfaFIoAQ709QDOybfXY54IbeLDr6NVzoqFpkptjB/GSG2hLoOyt4tlkfLMtFLm0OC+QjKa6b4RMdNeKUof5Qx7xvJ6E7dn7yfK4Mzt9y8RE1IF0VxJJW/RIsfgT0i9tUXXPT5Hh2DOzaT/Wza+8PeBY3NfnpoG7Yejjld9xeSV2NLLj6kbmZpBDiPDlJc1DMlcWr90VlrKWURVVEMuMbMgDE7e855hBJJMde5HMeW6xEQwuX8riCbu1rNzQam/awHj/FgMWnaZakllzPyfNdiZZhWdL9r 302940116@qq.com
这个环境的private key 我忙了一晚上 参考:https://help.github.com/articles/error-permission-denied-publickey/(从上到下一个一个验证就行)
注意点: 1.如果 在生成ssh 的时候 你给的 文件名成不是 id_rsa ,后重命名的 ssh agent 是没有的,
解决办法:进行添加
ssh-add $HOME/.ssh/id_rsa
下面让我们来运行https://github.com/cine-io/android-ffmpeg-with-rtmp的例子
1. 下载压缩包解压 (目录随意)
2. cd android-ffmpeg-with-rtmp
3.修改build.sh中的几个参数为你自己的路径:
#-- try to intelligently determine where the Android NDK is installed
function find_ndk {
ndk_name="android-ndk-r9"//你的ndk存在本地的文件夹名
top_level_paths_to_search="/home/poe"//你的桌面$HOME路径
found_ndk=""
for d in $top_level_paths_to_search; do
test -d "$d" || continue
found_ndk=$(find $d -name $ndk_name -print)
test "$found_ndk" && break
done
echo "$found_ndk"
}
# create our configuration file if it doesn't yet exist
if [ ! -f "${config_file}" ]; then
# determine OS and architecture
OS_ARCH=$(uname -sm | tr 'A-Z' 'a-z' | sed "s/\ /\-/g")
# find / ask for the NDK
echo "Looking for the NDK ..."
NDK=$(find_ndk)
echo -n "Path to NDK [$NDK]: "
read typed_ndk_root
test "$typed_ndk_root" && NDK="$typed_ndk_root"
# save our configuration
echo "Saving configuration into ${config_file} ..."
echo "OS_ARCH=$OS_ARCH" > ${config_file}
echo "NDK=$NDK" >> ${config_file}
echo "SYSROOT=${NDK}/platforms/android-18/arch-arm" >> ${config_file}//因为我的是ndk-r9 所以没有android-19此处改为18
echo "TOOLCHAIN=${NDK}/toolchains/arm-linux-androideabi-4.8/prebuilt/${OS_ARCH}" >> ${config_file}
fi
继续./build.sh
open_ssl编译通过
open_rtmp编译通过
open_ffmpeg 不同过,查看 build/build.log 拖到底
patching file configure
Hunk #1 succeeded at 2727 (offset 58 lines).
Package libssl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libssl.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libssl', required by 'librtmp', not found
Package libssl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libssl.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libssl', required by 'librtmp', not found
ERROR: librtmp not found
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solve the problem.
根据以上提示我们在编译openssl的时候缺少了libssl.pc这个pkgconfig的文件,
按照提示我们需要把对应的包管理类拷贝到 你的PKG_CONFIG_PATH
(user/lib/pkgconfig)
文件参考这里:http://www.opensource.apple.com/source/OpenSSL098/OpenSSL098-27/pkgconfigs/
把这几个文件
![]() |
libcrypto.pc | 239 |
![]() |
libssl.pc | 254 |
![]() |
openssl.pc | 264 |
都拷贝到上面路径。
删除已经编译的缓存
$ rm -rf src build .build-config.sh
$ ./build.sh 编译通过!
.
├── bin
│ ├── ffmpeg
│ ├── openssl
│ └── ssltest
└── lib
├── libavcodec-56.so
├── libavdevice-56.so
├── libavfilter-5.so
├── libavformat-56.so
├── libavutil-54.so
├── libcrypto.so
├── librtmp-1.so
├── libssl.so
├── libswresample-1.so
└── libswscale-3.so
通过解压demo解压到制定内部文件目录发现二进制文件ffmpeg只有200k,发现无法运行。
http://blog.csdn.net/sxsj333/article/details/6929487
费解了,直接在 ubuntu系统执行也提示我无法执行,那么肯定是编译时候的问题了。
仔细研究参数从新编译:
我只要动态库,--disable-static \
--enable-shared \
http://www.cnblogs.com/ohmytime/archive/2013/05/12/ffmpeg-build-help.html
ubuntu12.10+NDK r9 编译 ffmpeg 的一些参考资料Perhaps you should add the directory containing `libssl.pc'的更多相关文章
- 使用NDK(r20)编译FFmpeg
前两天在论坛上看到一个问题,大意是怎么在UBUNTU下使用NDK-r20编译FFmpeg.我第一反应是不该用r20,因为我在很早前用过没有gcc版本的NDK,发现有很多问题不能编译,就立马回复了个使用 ...
- 在ubuntu 10.04下编译ffmpeg
最近准备研究ffmpeg-2.0.1. 那得先运行起来看看效果吧. 首先去官网下载源码: 然后 解压=> ./configure => make OK . 1. 编译好后,发现没有ffp ...
- Ubuntu12.10编译openwrt遇到的错误
由于Openwrt有很多工具是要先编译的,在Ubuntu12.10平台下编译openwrt时就遇到了下面这样的错误:elf.cpp: In static member function 'static ...
- 手把手图文并茂教你用Android Studio编译FFmpeg库并移植
转载请把头部出处链接和尾部二维码一起转载,本文出自逆流的鱼yuiop:http://blog.csdn.net/hejjunlin/article/details/52661331 之前曾写过一篇&l ...
- 64位 CentOS NDK 编译 FFMPEG
64位 CentOS NDK 编译 FFMPEG 一. 参考文章: http://www.cnblogs.com/baopu/p/4733029.html http://www.c ...
- Linux下NDK编译FFMPEG包含neon参数
FFMPEG编译成Android库已经有很多案例了,编译优化neon的也很多,以下是我通过实践成功的案例,这里主要讲编译的配置文件,其他设置可结合Linux下使用NDK编译FFMPEG(libstag ...
- [原]如何用Android NDK编译FFmpeg
我们知道在Ubuntu下直接编译FFmpeg是很简单的,主要是先执行./configure,接着执行make命令来编译,完了紧接着执行make install执行安装.那么如何使用Android的ND ...
- NDK编译FFMpeg[Linux]
最近在研究视频直播相关的技术,了解到了FFmpeg,就在网上查看如何将FFmpeg移植到Android中,查了几天,看的东西不少,就是没有一个可以完全移植成功的,最后通过产看各种资料,结合网上的资料, ...
- anroid ndk编译ffmpeg 引用librtmp libx264
Ffmpeg 无处不在,自然android系统少不了它,折腾了不少时间完成 ndk编译ffmpeg,生成so库中引用了外部库librtmp,libx264.条条大路通罗马, 也许还有别的更好的方法去完 ...
随机推荐
- 大神是如何玩C语言的!
我在酷壳上看到一篇文章,C语言结构体里的成员数组和指针,看得感觉让我真是佩服地五体投地啊.皓哥虽说谦称自己不是高手啥的,但是写出这样的文章来,真是让我感觉自己的水平真是渣渣!我看完了感觉有点小激动,也 ...
- webstorm 自定义代码模板
Ctrl+Shift+A查找设置live 添加代码片段Live Template 编写代码的时候 缩写+Tab 即可输出代码片段 缩写启动对应代码片段的钥匙. 描述代码片段的名字. 模板文本代码片段的 ...
- 基于jquery打造的网页右侧自动收缩浮动在线客服代码
基于jquery打造的网页右侧自动收缩浮动在线QQ客服代码, 当前比较流行的一款QQ在线jquery特效代码, 代码中还带有IE6下PNG图片透明的特效,如果想研究IE6下PNG透明的同学也可以下载研 ...
- php数组声明、遍历、数组全局变量使用小结
数组的本质:管理和操作一组变量,成批处理,下面为大家介绍下数组的分类.数组的分类及使用说明,感兴趣的朋友可以了解下哈 php教程:数组声明,遍历,数组全局变量 <? /* * 一.数组的概 ...
- 关于华为C8812救砖教程
问题:华为C8812刷机后,开机显示:---------------------------------------------------------------- Image signature ...
- linux文件目录下各文件简介
/bin:存放最常用命令: /boot:启动Linux的核心文件: /dev:设备文件: /etc:存放各种配置文件: /home:用户主目录: /lib:系统最基本的动态链接共享库: /mnt:一般 ...
- boost-内存管理
Boost智能指针——scoped_ptr boost::scoped_ptr和std::auto_ptr非常类似,是一个简单的智能指针,它能够保证在离开作用域后对象被自动释放. boost::sco ...
- matlab实现判断是否能否生成严格对角占优矩阵
如题: function X = IsStrictDiagMatrix(A) % input: A matrix % output: The matrix after transformation % ...
- [分享] Code::Blocks Windows Console 中文亂碼解決
相信各位大大們應該都有聽過Code::Blocks這個IDE,但網路上有許多人反應Code::Blocks不能編出中文的Console程式,但 Code::Blocks最新的版本預設使用UTF-8做為 ...
- SCRUM报告(一)
我们“来用”团队确定的PM是邓锐.这是我们第一篇SCRUM报告,报告的内容就是我们的Sprint会议.之前冲刺计划会议的内容已发博客,这里简单阐述一下. 一.会议过程大致如下: 1.总结目前的工作进展 ...