Ffmpeg移植S3C2440
来源:互联网 发布:手机截图编辑软件 编辑:程序博客网 时间:2024/05/20 16:14
Ffmpeg移植过程:
FFmpeg是一个开源免费跨平台的视频和音频流方案,属于自由软件,采用LGPL或GPL许可证。它的移植同样遵循LGPL或GPL移植方法:configure、make、make insatll。
1.下载ffmpeg开源库(ffmpeg-0.5.tar.bz2)放到相应文件夹。
#tar jxvf ffmpeg-0.5.tar.bz2
#cd ffmpeg-0.5
2.配置编译选项
#./configure --cross-prefix=/usr/local/arm/3.4.1/bin/arm-linux- --enable-cross-compile --target-os=linux --cc=arm-linux-gcc --arch=arm --prefix=/usr/local/ffmpeg --enable-shared --disable-static --enable-gpl --enable-nonfree --enable-ffmpeg --enable-ffplay --enable-ffserver --enable-swscale --disable-vhook --enable-pthreads --disable-network --disable-ipv6 --enable-libamr-nb --enable-libamr-wb --enable-libfaac --enable-libfaad --enable-libmp3lame --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-yasm --disable-stripping --disable-optimizations --extra-cflags=-I/usr/local/ffextra/include --extra-ldflags=-L/usr/local/ffextra/lib
交叉编译器:arm-linux-gcc3.4.1
--cflags:ffmpeg第三方库头文件声明
--extra-ldflags:第三方库库文件路径
3.
#make
4.
#make install
把编译生成的库拷贝到2440开发板,配置环境变量。
编译过程错误:
1:libavcodec/arm/dsputil_arm_s.S
libavcodec/arm/dsputil_arm_s.S: Assembler messages:
libavcodec/arm/dsputil_arm_s.S:25: Error: unknown pseudo-op: `.eabi_attribute'
libavcodec/arm/dsputil_arm_s.S:641: Error: bad instruction `push {r4-r10}'
libavcodec/arm/dsputil_arm_s.S:724: Error: bad instruction `pop {r4-r10}'
make: *** [libavcodec/arm/dsputil_arm_s.o] 错误 1
解决:在make的时候有一些asm指令找不到
ffmpeg-0.5/libavcodec/arm/asm.S
24行: .eabi_attribute 24, /val改为@.eabi_attribute 24, /val
28行: .eabi_attribute 25, /val改为@.eabi_attribute 25, /val
ffmpeg-0.5/libavcodec/arm/dsputil_arm_s.S
641行: push {r4-r10} 改为 stmfd sp!, {r4-r10} @ push {r4-r10}
724行: pop {r4-r10} 改为 ldmfd sp!, {r4-r10} @ pop {r4-r10}
2:/home/liao/ffmpeg-0.5/libavcodec/libavcodec.so: undefined reference to `dlerror'
/home/liao/ffmpeg-0.5/libavcodec/libavcodec.so: undefined reference to `dlclose'
/home/liao/ffmpeg-0.5/libavcodec/libavcodec.so: undefined reference to `dlopen'
/home/liao/ffmpeg-0.5/libavcodec/libavcodec.so: undefined reference to `dlsym'
解决:缺少libdl库文件,在Makefile文件中添加库文件
68行:ffserver_g$(EXESUF): FF_LDFLAGS += $(FFSERVERLDFLAGS)后面添加FF_LDFLAGS +=-ldl
至此,ffmpeg可以顺利编译!!
注意:
ffmpeg中ffplay需要SDL支持,如需编译ffplay,则需下面步骤:
编译SDL,将其include、lib文件拷贝至第三方库路径(/usr/local/ffextra)
在configure之前修改configure文件2042行:
SDL_CONFIG="${cross_prefix}sdl-config"改为SDL_CINFIG="/usr/local/sdl/bin/sdl-config"
ffmpeg针对mp3、wma音频格式解码为浮点型,难以在arm上流畅运行。
- Ffmpeg移植S3C2440
- Ffmpeg移植S3C2440
- ffmpeg视频编码库S3C2440移植
- ffmpeg 移植
- ffmpeg移植
- ffmpeg移植
- ffmpeg移植
- ffmpeg移植
- ffmpeg移植
- ffmpeg移植
- ffmpeg移植
- 移植Qtopia4到S3C2440
- 移植ucGUI到s3c2440
- linux内核移植 s3c2440
- s3c2440 DM9000驱动移植
- miniGUI移植到s3c2440
- miniGUI移植到s3c2440
- S3C2440移植alsa-lib
- HDU2062题解 01背包而已
- codeigniter源代码分析之路由处理类 Router.php
- 希尔排序 原理及实现
- 《算法导论》学习笔记(4)——红黑树(c++语言实现)
- Lesson_for_java_day17--java中的IO流(IO基本流、键盘输入、管道流、文件及文件夹操作、Properties类、切割文件、记录软件运行次数)
- Ffmpeg移植S3C2440
- Java中字符串在不同字符编码中所占字节数
- lua数学库
- 继承的使用
- 琐碎资料收集整理
- 读取clob格式文件
- Jquery+Json+struts交互demo,以及为什么要配置includeProperties,root
- 【编程之美-扩展】找出N个数中的第二大数
- arm-linux-gcc 安装(非编译)