ChinaFFmpeg

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 11546|回复: 5

[Android] 编译FFMPEG为动态库,生成链接的问题。

[复制链接]
发表于 2013-11-18 09:43:38 | 显示全部楼层 |阅读模式
请问 如何编译FFMPEG为动态库,不生成链接文件,这链接文件太讨厌了,求解!谢谢老大!谢谢各位!


回复

使用道具 举报

发表于 2013-11-18 09:46:22 | 显示全部楼层

  1. [StevenLiu@localhost ffmpeg]$ ./configure --enable-shared
  2. [StevenLiu@localhost ffmpeg]$ make
  3. [StevenLiu@localhost ffmpeg]$ find . -name "*.dylib"
  4. ./libavcodec/libavcodec.55.dylib
  5. ./libavcodec/libavcodec.dylib
  6. ./libavdevice/libavdevice.55.dylib
  7. ./libavdevice/libavdevice.dylib
  8. ./libavfilter/libavfilter.3.dylib
  9. ./libavfilter/libavfilter.dylib
  10. ./libavformat/libavformat.55.dylib
  11. ./libavformat/libavformat.dylib
  12. ./libavutil/libavutil.52.dylib
  13. ./libavutil/libavutil.dylib
  14. ./libpostproc/libpostproc.52.dylib
  15. ./libpostproc/libpostproc.dylib
  16. ./libswresample/libswresample.0.dylib
  17. ./libswresample/libswresample.dylib
  18. ./libswscale/libswscale.2.dylib
  19. ./libswscale/libswscale.dylib
  20. [StevenLiu@localhost ffmpeg]$
  21. [StevenLiu@localhost ffmpeg]$
  22. [StevenLiu@localhost ffmpeg]$
  23. [StevenLiu@localhost ffmpeg]$ ll ./libpostproc/*.dylib
  24. -rwxr-xr-x  1 StevenLiu  staff  121460 11 18 09:28 ./libpostproc/libpostproc.52.dylib
  25. lrwxr-xr-x  1 StevenLiu  staff      20 11 18 09:29 ./libpostproc/libpostproc.dylib -> libpostproc.52.dylib
  26. [StevenLiu@localhost ffmpeg]$
复制代码
生成链接文件和原文件,原文件的话一般是带上对应的版本号的

  1. StevenLiu@localhost ffmpeg]$ ffmpeg
  2. ffmpeg version N-56531-g6d61a91 Copyright (c) 2000-2013 the FFmpeg developers
  3.   built on Nov 13 2013 18:21:09 with Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
  4.   configuration: --enable-libx264 --enable-libmp3lame --enable-gpl  xxxxxxxxxxxxxx
  5.   libavutil      52. 45.100 / 52. 45.100
  6.   libavcodec     55. 33.100 / 55. 33.100
  7.   libavformat    55. 18.102 / 55. 18.102
  8.   libavdevice    55.  3.100 / 55.  3.100
  9.   libavfilter     3. 86.102 /  3. 86.102
  10.   libswscale      2.  5.100 /  2.  5.100
  11.   libswresample   0. 17.103 /  0. 17.103
  12.   libpostproc    52.  3.100 / 52.  3.100
  13. Hyper fast Audio and Video encoder
  14. usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...


复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-11-18 10:30:53 | 显示全部楼层
本帖最后由 Leo_p 于 2013-11-18 10:35 编辑
孙悟空 发表于 2013-11-18 09:46
生成链接文件和原文件,原文件的话一般是带上对应的版本号的

老大 我参考这篇文章 http://www.mingjianhua.com/post/ ... B9%B3%E5%8F%B0.html 编译的FFMPEG,编译成功了,但是在安卓上使用不了,这是为什么?报错如下:
11-17 20:15:33.825: E/AndroidRuntime(1615): java.lang.UnsatisfiedLinkError: Couldn't load avutil from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.voole.test-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.voole.test-1, /system/lib]]]: findLibrary returned null

生成了一堆链接文件,有什么办法编译之后不生成这些链接文件?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 支持 反对

使用道具 举报

发表于 2013-11-18 10:34:50 | 显示全部楼层
看错误信息说是没有找到对应的lib
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-11-19 10:40:28 | 显示全部楼层
问题解决!
回复

使用道具 举报

发表于 2013-11-19 18:51:33 | 显示全部楼层

分享一下嘛,让后来人也可以看到解决的步骤
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|Archiver|ChinaFFmpeg

GMT+8, 2024-4-26 08:07 , Processed in 0.064547 second(s), 15 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表