简体   繁体   English

FFMPEG pipe 从 windows 上的命令行输入文件名

[英]FFMPEG pipe input filenames from command line on windows

I am concatenating a bunch of files on a windows 10 box into a single file using "ffmpeg -f concat -safe 0 -i list.txt -c copy output.mp4".我正在使用“ffmpeg -f concat -safe 0 -i list.txt -c copy output.mp4”将 windows 10 框中的一堆文件连接到一个文件中。 This works fine when I generate list.txt in the required format.当我以所需格式生成 list.txt 时,这可以正常工作。

What I am wanting is to not have to generate the file first and instead pipe the filenames in as the examples here show for *nix.我想要的是不必先生成文件,而是 pipe 中的文件名,如此处为 *nix 显示的示例所示

I have tried as follows "ffmpeg -f concat safe 0 -i <(for %i in (*.ts) do @echo file '%i') -c copy output.mp4" but I get "The system cannot find the file specified.".我尝试如下“ffmpeg -f concat safe 0 -i <(for %i in (*.ts) do @echo file '%i') -c copy output.mp4”但我得到“系统找不到指定的文件。”。

Any idea's how to make this work?任何想法如何使这项工作?

Command substitution on Unix... Unix 上的命令替换...

ffmpeg -i $(some-command-that-generates-an-url/path) [...]

...is possible on Windows through a for-loop: ...可以通过 for 循环在 Windows 上实现:

FOR /F "delims=" %A IN ('some-command-that-generates-an-url/path') DO ffmpeg -i %A

Process substitution on the other hand, as you describe, isn't possible on Windows.另一方面,正如您所描述的,在 Windows 上不可能进行进程替换。 Temporary files are inevitable.临时文件是不可避免的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM