我正在尝试为我的ffmpeg concat命令设置标题(如此处所示),如下所示:
ffmpeg \ -f concat \ - 安全0 -protocol_whitelist文件,http,https,tcp,tls \ -headers $’内容-…
当单个输入被定向馈送到ffmpeg时( -i ),可以在其上设置各种选项,具体取决于输入阅读器允许和识别的内容。
-i
但是,FFmpeg本身不会从文本文件中读取输入列表。有一个名为the的定制模块 concat demuxer ,调用 -f concat ,解析输入列表,打开每个文件并连接它们。对于主ffmpeg管道,它由concat模块生成的单个输入表示。并且concat模块不识别或结转用于的选项 单个文件列出 在文本文件中。所有列出的文件只能使用各自的解复用器/解码器/协议等的默认参数打开。这是一个限制。您可以在trac.ffmpeg.org上打开功能请求以更改此功能。
concat demuxer
-f concat
您可以做的是直接读取所有输入。
ffmpeg \ -headers $'Content-Type: audio/wav\r\n' \ -i 'https://google1.com' \ -headers $'Content-Type: audio/wav\r\n' \ -i 'https://google2.com' \ -headers $'Content-Type: audio/wav\r\n' \ -i 'https://google3.com' \ -headers $'Content-Type: audio/wav\r\n' \ -i 'https://google4.com' \ -filter_complex "[0][1][2][3]concat=n=4:v=0:a=1" \ 'output.wav'
对于WAV输入,重新编码为WAV不会失去质量。