如何禁止 FFmpeg 通过 HTTP/HTTPS 访问远程文件?

How do you disable FFmpeg from accessing remote files over HTTP/HTTPS?

是否有强制FFmpeg只能访问本地文件的编译选项?如果我的系统的用户指定某种指向 Internet 上任意位置的恶意输入文件(如 HLS 清单),我不希望 FFmpeg 遵循 link.

Is there a compilation option that forces FFmpeg to only be able to access local files?

--disable-network 禁用网络支持。

其他相关选项:

  • --disable-protocol=NAME 禁用特定协议。
  • --disable-protocols 禁用 所有 协议,然后 --enable-protocol=file,pipe 仅启用 file 和 [=例如 22=]pipe 协议。

有关详细信息,请参阅 ./configure --help