基本思想:学习视频编解码,先从环境开始~
其实可以不用编译,因为系统库含有ffmpeg库可以直接跳到ngnix环境搭建~
一、先编译x264源码
ubuntu@ubuntu:~$ git clone https://github.com/mirror/x264
ubuntu@ubuntu:~/x264$ mkdir build
ubuntu@ubuntu:~/x264$./configure --enable-static --prefix=build/
ubuntu@ubuntu:~/x264$make
ubuntu@ubuntu:~/x264$make install
ubuntu@ubuntu:~/x264/build$ tree -l
.
├── bin
│ └── x264
├── include
│ ├── x264_config.h
│ └── x264.h
└── lib
├── libx264.a
└── pkgconfig
└── x264.pc
4 directories, 5 file
二、编译ffmpeg源码
ubuntu@ubuntu:~/FFmpeg$ export PKG_CONFIG_PATH=../x264/build/lib/pkgconfig
ubuntu@ubuntu:~/FFmpeg$ ./configure --prefix=build/ --enable-static --enable-