有几种不同版本的ffmpeg
和ffprobe
飞来飞去,每个版本都有不同的API。
如果我在Ubuntu 16.04上使用apt-get install ffmpeg
,我会得到ffmpeg version 2.8.15-0ubuntu0.16.04.1
。如果我在Ubuntu 18.04上安装apt-get install ffmpeg
,我会得到version 3.4.4-0ubuntu0.18.04.1
。
当我访问ffmpeg documentation时,它说“以下文档每晚重新生成,并且对应于最新的FFmpeg版本。请参阅本地安装的旧版本文档。”也就是说,托管文档既不是这两个版本。
所以我有两个问题:
man ffmpeg
?或者有没有办法将文档作为网页托管?对于任何使用docker并希望在不考虑过多的情况下托管文档的人来说,这就是我提出的Dockerfile。
FROM ubuntu:18.04
# Install requirements for ffmpeg doc generation
RUN apt-get update && apt-get install -y git build-essential texinfo yasm
# Install requirements for minimal webserver
RUN apt-get install -y webfs mime-support && update-mime
RUN git clone https://git.ffmpeg.org/ffmpeg.git
# Checkout the version that you want
RUN cd ffmpeg \
&& git checkout tags/n2.8.15 \
&& ./configure \
&& make doc
WORKDIR /ffmpeg/doc
CMD webfsd -F -p 80
然后你可以
docker build -t ffmpeg-doc .
docker run --rm -it -p 80:80 ffmpeg-doc
并访问http://localhost
获取生成的文件列表。常见的将是http://localhost/ffmpeg.html
或http://localhost/ffprobe.html
。