【问题标题】:AviSynth - video framerate doesn't matchAviSynth - 视频帧率不匹配
【发布时间】:2015-05-28 19:06:42
【问题描述】:

我正在尝试仅加速视频中的某些帧,而不是将其拆分为多个文件,这是我用来执行此操作的代码

AVISource("C:\Users\me\Desktop\source_10FPS.avi")   # get the 10 fps video source

a= Trim(0,100)                                       # trim the first 10  seconds
b= Trim(100,200).AssumeFPS(14, sync_audio=TRUE)      # trim and speed it up 
c= Trim(200,0).AssumeFPS(10, 1, true)                #trim and go back to original speed 

return (a+b+c)                                       # combine the 3 Trims

但我收到“视频帧率不匹配”错误

任何帮助将不胜感激

【问题讨论】:

    标签: video video-editing avisynth


    【解决方案1】:

    帧率实际上不匹配,因为通过 AssumeFPS(14) 您将 b 的 FPS 更改为 14 并尝试将其与两个 10 FPS 片段连接起来。 FPS 通常不会随着视频的进行而改变,除非是 VFR(可变帧率),但这很复杂。

    对于更简单的解决方案,您可以执行以下操作:

    Ar=Audiorate()                                                                  #get audio sampling rate of original clip
    a= Trim(0,100)                                                                  #trim the first 10  seconds
    b= Trim(101,200).AssumeFPS(14, sync_audio=TRUE).ChangeFPS(10).ResampleAudio(Ar) #trim and speed it up while keeping audio rate and fps intact
    c= Trim(201,0)                                                                  #note that to avoid having repeating frames (#100 and #200) you need to change Trim numbers
    

    您也可以使用 ConvertFPS 代替 ChangeFPS 以获得更流畅的播放效果。


    在此处了解更多信息:http://avisynth.nl/index.php/FPS

    【讨论】:

    • 非常感谢,您能否指导我访问更多链接或视频以了解有关 avisynth 的更多信息,例如,我找不到任何有关 Audiorate() 函数和 ResampleAudio() 的文档
    • @Nassim 在 Avisynth wiki 本身 (avisynth.nl/index.php/ResampleAudio) 中有一篇关于 Resample 的文章,Audiorate 是一个剪辑属性 (avisynth.nl/index.php/Clip_properties)。至于资源,有Doom9。我还推荐使用AvsPmod 编辑器,它提供代码完成功能。
    猜你喜欢
    • 1970-01-01
    • 2021-07-19
    • 2021-04-12
    • 1970-01-01
    • 1970-01-01
    • 2013-06-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多