【FFMPEG】ffmpeg 中添加264支持

来源:互联网 发布:amv格式视频软件 编辑:程序博客网 时间:2024/03/29 08:00

ffmpeg 中带有264的解码,没有编码,需要添加x264;

参考百度上的“windows_ffmpeg ”

文档

下载ffmpeg 代码合x264代码,

ffmpeg 代码:http://ffmpeg.org/

x264代码:http://www.videolan.org/developers/x264.html

相关资源获取的地方:

http://ffmpeg.zeranoe.com/builds/

 

 

1 按照minGW 环境

2 修改msys.bat,添加call "C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat"

3 进入到x264目录

$./configure --enable-static --enable-win32thread --host=i686-w32-mingw32 --prefix=/home/yingchen/dev

make

make install

4 进入ffmpeg目录编译

 ./configure --enable-shared --enable-version3 --enable-gpl --enable-nonfree --disable-pthreads --enable-w32threads --enable-runtime-cpudetect --enable-memalign-hack --arch=x86 --enable-libx264 --prefix=/home/yingchen/dev/ --target-os=mingw32 --extra-cflags="-I/home/yingchen/dev/include" --extra-ldflags="-L/home/yingchen/dev/lib"
 make
 make install

在/home/yingchen/bin 中得到相关内容

 

5 验证是否加入正确

ffmpeg.exe -i s.avi -vcodec libx264 -acodec libfaac s.mp4

0 0