megui吧 关注:5,472贴子:37,794
  • 3回复贴,共1

关于MEGUI裁剪视频再合并的问题

取消只看楼主收藏回复

LoadPlugin("D:\Program Files (x86)\MeGUI\AVSWriter\dll\VSFilter.DLL")
LoadPlugin("D:\Program Files (x86)\MeGUI\AVSWriter\dll\DGDecode.DLL")
LoadPlugin("D:\Program Files (x86)\MeGUI\AVSWriter\dll\DeComb.DLL")
LoadPlugin("D:\Program Files (x86)\MeGUI\AVSWriter\dll\TomsMoComp.DLL")
LoadPlugin("D:\Program Files (x86)\MeGUI\AVSWriter\dll\Gradfun2db.DLL")
LoadPlugin("D:\Program Files (x86)\MeGUI\AVSWriter\dll\UnDot.DLL")
A=DirectShowSource("X:\视频1.avi",29.970,convertFPS=True).AssumeFPS(30000,1001).ConvertToYV12().Crop(0,0,0,0).AddBorders(0,0,0,0).LanczosResize(960,540).Sharpen(0.2).trim(240, 480)
B=DirectShowSource("X:\视频2.avi",29.970,convertFPS=True).AssumeFPS(30000,1001).ConvertToYV12().Crop(0,0,0,0).AddBorders(0,0,0,0).LanczosResize(960,540).Sharpen(0.2).trim(240, 480)
uotput=A+B
return uotput
这样可以实现2个视频裁剪一个部分然后合并
但如果我想裁剪其中某个视频的多个片段,再与另个视频的多个片段合并应该怎么写?


1楼2012-08-05 14:36回复
    单文件裁剪合并可以用
    __film = last
    __t0 = __film.trim(240, 480)
    __t1 = __film.trim(580, 1160)
    .......
    __t0 ++ __t1 ++......
    我是在想在多文件裁剪合并时 可不可以使用这类似的编码
    让几个视频一次性就裁剪合并完成
    虽然2楼提供的方法可行 我也最先想到的那种方法 但编起AVS来相当费事
    如果视频裁剪片段过多就会很大篇幅
    A=DirectShowSource("X:\视频1.avi",29.970,convertFPS=True).AssumeFPS(30000,1001).ConvertToYV12().Crop(0,0,0,0).AddBorders(0,0,0,0).LanczosResize(960,540).Sharpen(0.2).trim(240, 480)
    B=DirectShowSource("X:\视频1.avi",29.970,convertFPS=True).AssumeFPS(30000,1001).ConvertToYV12().Crop(0,0,0,0).AddBorders(0,0,0,0).LanczosResize(960,540).Sharpen(0.2).trim(720, 960)
    C=DirectShowSource("X:\视频1.avi",29.970,convertFPS=True).AssumeFPS(30000,1001).ConvertToYV12().Crop(0,0,0,0).AddBorders(0,0,0,0).LanczosResize(960,540).Sharpen(0.2).trim(1200, 1480)
    D=DirectShowSource("X:\视频2.avi",29.970,convertFPS=True).AssumeFPS(30000,1001).ConvertToYV12().Crop(0,0,0,0).AddBorders(0,0,0,0).LanczosResize(960,540).Sharpen(0.2).trim(240, 480)
    E=DirectShowSource("X:\视频2.avi",29.970,convertFPS=True).AssumeFPS(30000,1001).ConvertToYV12().Crop(0,0,0,0).AddBorders(0,0,0,0).LanczosResize(960,540).Sharpen(0.2).trim(720, 960)
    F=DirectShowSource("X:\视频2.avi",29.970,convertFPS=True).AssumeFPS(30000,1001).ConvertToYV12().Crop(0,0,0,0).AddBorders(0,0,0,0).LanczosResize(960,540).Sharpen(0.2).trim(1200, 1480)
    uotput=A+B+C+D+E+F
    return uotput
    


    6楼2012-08-08 19:11
    回复
      像以上那样 同一个
      =DirectShowSource("X:\视频1.avi",29.970,convertFPS=True).AssumeFPS(30000,1001).ConvertToYV12().Crop(0,0,0,0).AddBorders(0,0,0,0).LanczosResize(960,540).Sharpen(0.2)
      就使用了很多次


      7楼2012-08-08 19:12
      回复
        哈哈 行了 可以一次性裁剪合并了
        LoadPlugin("D:\Program Files (x86)\MeGUI\AVSWriter\dll\VSFilter.DLL")
        LoadPlugin("D:\Program Files (x86)\MeGUI\AVSWriter\dll\DGDecode.DLL")
        LoadPlugin("D:\Program Files (x86)\MeGUI\AVSWriter\dll\DeComb.DLL")
        LoadPlugin("D:\Program Files (x86)\MeGUI\AVSWriter\dll\TomsMoComp.DLL")
        LoadPlugin("D:\Program Files (x86)\MeGUI\AVSWriter\dll\Gradfun2db.DLL")
        LoadPlugin("D:\Program Files (x86)\MeGUI\AVSWriter\dll\UnDot.DLL")
        A=DirectShowSource("X:\视频1.avi",29.970,convertFPS=True).AssumeFPS(30000,1001).ConvertToYV12().Crop(0,0,0,0).AddBorders(0,0,0,0).LanczosResize(960,540).Sharpen(0.2)
        B=DirectShowSource("X:\视频2.avi",29.970,convertFPS=True).AssumeFPS(30000,1001).ConvertToYV12().Crop(0,0,0,0).AddBorders(0,0,0,0).LanczosResize(960,540).Sharpen(0.2)
        uotput=A+Breturn uotput
        __film = last
        __t0 = __film.trim(240, 480)
        __t1 = __film.trim(580, 1160)
        .......
        __t0 ++ __t1 ++......
        这样就行了


        8楼2012-08-08 19:37
        收起回复