FFMPEG无效选项



根据mklement0的建议,我将此处的输出缩短为仅包含相关代码和错误。此外,正如他所指出的,我已经改变了构造参数的方式(现在作为数组传递(。

此外,在kesh的评论中,我删除了"-filter _ complex";并且变为仅仅几个"-映射"s.

$TEMPDIR = "E:MediaConversionsBitLadder"
$FOLDER = 'White.Boy.Rick.2018.1080p.WEB-DL.H264.AC3-EVO'
$OUTPUTDIR = $TEMPDIR + '' + $FOLDER
# Mux the 8 Bitrate Ladder steps into a single file, with a common audio stream
$STEPS = @(Get-ChildItem -Path $OUTPUTDIR -Name)
$INPUT_FILES = @()
$MAP = @()
$COUNT = 0
ForEach ($STEP in $STEPS){
$INPUT_FILES += ('-i', "$STEP")
$MAP += ('-map ' + "$COUNT" + ':v', '-map ' + "$COUNT" + ':a') 
$COUNT++
}
$OPTIONS = ('-' + "$INPUT_FILES", "$MAP")
#$OPTIONS
D:Applicationsffmpegbinffmpeg.exe "$OPTIONS" -f matroska "E:MediaConversionsWhite.Boy.Rick.2018_MultiStreamTest_AAC.H264.mkv"

但遗憾的是,我仍然会遇到同样令人沮丧的错误:

Unrecognized option '-i White.Boy.Rick.2018.1080p.WEB-DL.H264.AC3-EVO_STEP1.mp4 -i White.Boy.Rick.2018.1080p.WEB-DL.H264.AC3-EVO_STEP2.mp4 -i White.Boy.Rick.2018.1080p.WEB-DL.H264.AC3-EVO_STEP3.mp4 -i White.Boy.Rick.2018.1080p.WEB-DL.H264.AC3-EVO_STEP4.mp4 -i White.Boy.Rick.2018.1080p.WEB-DL.H264.AC3-EVO_STEP5.mp4 -i White.Boy.Rick.2018.1080p.WEB-DL.H264.AC3-EVO_STEP6.mp4 -i White.Boy.Rick.2018.1080p.WEB-DL.H264.AC3-EVO_STEP7.mp4 -i White.Boy.Rick.2018.1080p.WEB-DL.H264.AC3-EVO_STEP8.mp4 -map 0:v -map 0:a -map 1:v -map 1:a -map 2:v -map 2:a -map 3:v -map 3:a -map 4:v -map 4:a -map 5:v -map 5:a -map 6:v 
-map 6:a -map 7:v -map 7:a'.
Error splitting the argument list: Option not found

您不需要-complex_filter就可以将输入流映射到输出文件。您只需要使用-map的次数与流的次数一样多:

... -map 0:v -map 1:v ... -map 0:a -map 1:a ...

相关内容

  • 没有找到相关文章