file - ffmpeg:哪些文件格式支持标准输入使用?

标签 file stream ffmpeg stdout stdin

我知道 ffmpeg 能够从 stdin 读取数据,而不是使用 ffmpeg -i - 从磁盘读取数据。所有文件格式都支持吗?如果不是,是否有支持的文件格式列表?

最佳答案

您需要运行 ffmpeg -protocols 来确定您的 ffmpeg 版本是否支持 pipe 协议(protocol)(从标准输入和标准输出读取和写入),然后ffmpeg -formats 查看支持的格式列表。在下面的摘录中,您将看到输出管道上的注释,表明它对于某些协议(protocol)必须是可查找的。对于输入协议(protocol)则没有这样的限制。

来自man ffmpeg-protocols:

PROTOCOLS

Protocols are configured elements in FFmpeg which allow to access resources which require the use of a particular protocol.

When you configure your FFmpeg build, all the supported protocols are enabled by default. You can list all available ones using the configure option --list-protocols.

You can disable all the protocols using the configure option --disable-protocols, and selectively enable a protocol using the option --enable-protocol=PROTOCOL, or you can disable a particular protocol using the option --disable-protocol=PROTOCOL.

The option -protocols of the ff* tools will display the list of supported protocols.

A description of the currently available protocols follows. ... pipe
UNIX pipe access protocol.

Allow to read and write from UNIX pipes.

The accepted syntax is:

       pipe:[<number>]

number is the number corresponding to the file descriptor of the pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr). If number is not specified, by default the stdout file descriptor will be used for writing, stdin for reading.

Note that some formats (typically MOV), require the output protocol to be seekable, so they will fail with the pipe output protocol.

关于file - ffmpeg:哪些文件格式支持标准输入使用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12999674/

相关文章:

dart - 如何将最新的流图组合成值图?

java - System.out 声明为 static final 并用 null 初始化?

php - FFMPEG 无法在 CentOS Linux 服务器上工作

ffmpeg - 如何获取使用ffmpeg提取的图像的时间戳

android - 保存数据的最佳方法 - 首选项、sqlite、可序列化或其他?

android - 从 surfaceView android 获取 JPG 文件

二进制文件中的 Java 对象流

FFMPEG如何在视频拼接时添加虚拟音频

java - 文件不会删除

python - 从文件 Python 中删除一行