gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-02 14:34:55 26 4
gpt4 key购买 nike

我知道 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com