【问题标题】:How to speed up audio and video in FFmpeg如何在 FFmpeg 中加速音视频
【发布时间】:2017-12-21 12:12:32
【问题描述】:

我正在尝试使用 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 上找不到未标记输入垫 0 的匹配流(退出代码:1)”

【问题讨论】:

    标签: c# video ffmpeg


    【解决方案1】:

    线性过滤器不需要中间标签所以改变:

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

    到:

    atempo=2.0,atempo=2.0[a]
    

    【讨论】:

    猜你喜欢
    • 2013-09-24
    • 2022-12-11
    • 1970-01-01
    • 2014-10-10
    • 1970-01-01
    • 2019-10-07
    • 2016-04-11
    • 2019-08-29
    • 2012-09-04
    相关资源
    最近更新 更多