ffmpeg:哪些文件格式支持stdin的使用? [英] ffmpeg: which file formats support stdin usage?

查看:285
本文介绍了ffmpeg:哪些文件格式支持stdin的使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

解决方案

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



man ffmpeg-protocols


协议



协议是FFmpeg中配置的元素,允许访问
资源,需要使用特定的协议。



配置FFmpeg构建时,所有支持的协议都默认为
。您可以使用
配置选项 - list-protocols 列出所有可用的。



您可以使用配置选项
- disable-protocols 禁用所有协议,并使用
选项选择性启用协议 - -enable-protocol = PROTOCOL ,或者您可以使用选项 - disable-protocol = PROTOCOL 禁用特定的
协议。 / p>

ff *工具的选项 -protocols 将显示支持
的协议列表。 p>

以下是当前可用协议的描述。 ...管道

UNIX管道访问协议。



允许从UNIX管道读取和写入。



接受的语法是:

  pipe:[< number>] 

数字是与
管道的文件描述符相对应的数字(例如stdin为0,stdout为1,stderr为2) )。如果number不是
指定,默认情况下,stdout文件描述符将用于
写入,stdin用于阅读。



请注意,某些格式通常是MOV),需要输出协议
可寻求,所以它们将失败,并输出管道输出协议。



I know ffmpeg is able to read data from stdin rather than reading from disk using ffmpeg -i -. Is this supported for all file formats? If it is not, is there a list which file formats are supported?

解决方案

You need to run ffmpeg -protocols to determine if the pipe protocol (the read and write from stdin and stdout) supported in your version of ffmpeg and then ffmpeg -formats to see the list of supported formats. In the excerpt below you will see the note on output pipe that it must be seekable for some protocols. For input protocols it has no such restriction.

From 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.

这篇关于ffmpeg:哪些文件格式支持stdin的使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆