1. 下载 libmfx/mfx_dispatch
    ./configure --enable-shared --libdir=/usr/lib/x86_64-linux-gnu/ --includedir=/usr/include --exec-prefix=/usr --prefix=/usr

2. 下载 ffmpeg 3.3.4 源码. 解压.
    ./configure --enable-libfreetype --enable-shared
    修改 config.h  #define CONFIG_LIBMFX 1
    修改 config.mak  !CONFIG_LIBMFX=yes  --> CONFIG_LIBMFX=yes
            EXTRALIBS= 部分加入  -lmfx

    make / make install.
3. 实验 
    ffmpeg -f video4linux2 -r 25 -s 640x480 -i /dev/video0 -an -vf rotate=PI/2 -vf "drawtext=expansion=strftime:fontfile=FreeMono.ttf:text='%Y-%m-%d %H\\:%M\\:%S':fontsize=30:fontcolor=white:box=1:x=10:y=10:boxcolor=black@0.5:"  -f flv rtmp://192.168.46.168:2000/hls/0_C

    需要把 FreeMono.ttf 文件放到本地.

其实主要更新的一个 avfilter 库, 不影响其他 ffmpeg / ffplay 等 应用. 仅仅时调用的时候多了一个支持的参数而已.
10-26 00:10
查看更多