在FFmpeg使用到编码时要使用到libx264,通过FFmpeg+libx264可实现视频编码效果。 下面就是各个步骤:
1、x264库的编译
1.》使用最基本x264-ios脚本编译 首先我们从http://www.videolan.org/developers/x264.html中下载x264的码源。这里有两种方式下载: 通过get方式:
git clone http://git.videolan.org/git/x264.git
通过终端cd到下载目录执行上面命令就可以了 如:
Last login: Tue Sep 5 15:43:13 on ttys000
-bash: pyenv: command not found
bogon:~ xiyin$ cd /Users/xiyin/desktop/name
bogon:name xiyin$ git clone http://git.videolan.org/git/x264.git
第二种方式: 点击图片红圈就可以了
Paste_Image.png
下载脚本进行编译: