我正在尝试使用ffmpeg的C#包装器类将音频和视频加速到4倍。

这是它的外观。

     var ffMpeg = new NReco.VideoConverter.FFMpegConverter();
        ConvertSettings convertSettings = new ConvertSettings
        {
            CustomOutputArgs = "-filter_complex \"[0:v]setpts = 0.25 * PTS[v];[0:a] atempo=2.0[a],atempo=2.0[a] \" -map \"[v]\" -map \"[a]\""

        };

        string inputpath = tempvideolocation + "/tempvideo.mp4";
        string outputpath = tempvideolocation + "/convertedvideo.mp4";

        ffMpeg.ConvertMedia(inputpath, Format.mp4, outputpath, Format.mp4, convertSettings);


但是我收到“错误-在过滤器Parsed_atempo_2(退出代码:1)上找不到未标记输入板0的匹配流”

最佳答案

线性滤波器不需要中间标签,因此请更改:

atempo=2.0[a],atempo=2.0[a]


至:

atempo=2.0,atempo=2.0[a]

关于c# - 如何在FFmpeg中加速音频和视频,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/47917403/

10-09 00:08