我正在使用 Docker 使用melt
命令创建一个用于视频处理的容器。目前输出的所有视频都不包含任何音频。
这是 Dockerfile:
FROM ubuntu
RUN apt-get update
RUN apt-get install -y melt swh-plugins
WORKDIR /input
CMD [ "melt", "input.mp4", "-consumer", "avformat:/output/output.mp4" ]
当我运行容器时,我收到以下错误:
consumer_avformat.c: Unable to encode audio - disabling audio output.
我怀疑这会告诉你很多。但是,我尝试将命令运行为:
melt input.mp4 -consumer avformat:/output/output.mp4 acodec=libmp3lame
...当我这样做时,我没有收到错误,但输出文件中仍然没有音频。
因为我不太了解音频处理,所以我不确定我是否缺少插件或以其他方式未指定要求。对于熟悉 Docker 和多媒体的人来说,这应该是一个相对容易的解决方法。