我有一些 .wmv 文件(实际上,我的完整批处理文件处理多种文件类型),其中包含外部程序识别它们所需的奇怪数据流。
我正在尝试删除所有非数据或音频的流,这些流也需要重新编码。
我当前的命令是
fmpeg -y -loglevel debug -flags global_header -err_detect ignore_err -fflags +igndts -copy_unknown -i "%%~fV" -f !ext! -c copy -map 0 -vn -sn -b:a 32k "%%~pnxV.tmpoutput"
Run Code Online (Sandbox Code Playgroud)
它适用于具有相同类型数据流的其他文件类型,并且如果我添加,它将与 .wmv 一起使用-dn(即使外部程序无法识别我的文件)。对于 .wmv 文件,上面的命令将输出错误Could not write header for output file #0 (incorrect codec parameters ?): Operation not permitted。
从FFprobe(下面的完整输出)中,我可以看到该消息Unsupported codec with id 0 for input stream 2,因此我相信毫无疑问,原因确实是数据流。
问题是我本来希望-copy_unknown能够解决这个问题,但事实并非如此。我的问题是:如何复制这个不受支持、未在其他地方使用的数据流?还有其他方法来处理这个问题吗?
谢谢
完整的 FFmpeg 输出(带有-loglevel debug):
ffmpeg version 4.2 Copyright …Run Code Online (Sandbox Code Playgroud)