ffmpeg 中添加264支持

转自:http://blog.sina.com.cn/s/blog_513f4e8401011yuq.html

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 FilesMicrosoft Visual Studio 8VCinvcvars32.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
原文地址:https://www.cnblogs.com/x_wukong/p/4834034.html