官网是:http://ffmpeg.org/
/configure --enable-shared --prefix=/usr/local/ffmpeg
make
make install
如果出现 yasm/nasm not found or too old.
/configure --enable-shared --prefix=/usr/local/ffmpeg --disable-yasm
ffmpeg -f avfoundation -i 1 -r 30 out.yuv
ffmpeg -f avfoundation -list_devices true -i ""
问题:
ffmpeg: error while loading shared libraries: libavdevice.so.57: cannot open shared object file: No such file or directory
adminn@ubuntu:/usr/local/lib$ sudo vi /etc/ld.so.conf
修改如下
include ld.so.conf.d/*.conf
/usr/local/ffmpeg/lib
adminn@ubuntu:/usr/local/lib$sudo ldconfig
Unknown input format: 'avfoundation'