linux下编译ffmpeg,并加入H264编码支持

1.libx264 编译

./configure --enable-static --disable-asm --prefix=/usr/local/ffmpegRedHat

make

make install

2.ffmpeg 编译

./configure --enable-shared --disable-yasm --enable-memalign-hack --enable-libx264 --enable-gpl --prefix=/usr/local/ffmpegRedHat --extra-cflags=-I/usr/local/ffmpegRedHat/include --extra-ldflags=-L/usr/local/ffmpegRedHat/lib --extra-libs=-ldl

make

make install

注意:--extra-cflags=-I/usr/local/ffmpegRedHat/include --extra-ldflags=-L/usr/local/ffmpegRedHat/lib用于指定libx264的路径,但是指定完以后需要添加--extra-libs=-ldl才能找到该路径。否则会提示 ERROR: libx264 not found


我编译使用的libx264和ffmpeg版本参考:http://blog.csdn.net/caoshangpa/article/details/50947926


你可能感兴趣的:(流媒体)