コード例 #1
0
 def cap():
     nonlocal video, audio, width, height
     capC(int(width), int(height),
          cap=d['cap']).save(f"{pat}/cap{e0}.png")
     video = ffmpeg.input(f"{pat}/cap{e0}.png").filter(
         "pad", h=f"(ih+{height})+mod((ih+{height}), 2)").overlay(
             video, y=f"(main_h-{height})")
     height = str(int(height) + getImageRes(f"{pat}/cap{e0}.png")[1])
コード例 #2
0
ファイル: destroyer.py プロジェクト: tatey12/videoEditBot
 def cap():
     nonlocal video, audio, width, height
     if d['topcap']:
         capC(int(width), int(height), cap = d['topcap']).save(f"{pat}/topcap{e0}.png")
         video = ffmpeg.input(f"{pat}/topcap{e0}.png").filter("pad",h = f"(ih+{height})+mod((ih+{height}), 2)").overlay(video, y = f"(main_h-{height})")
         height = str(int(height) + getImageRes(f"{pat}/topcap{e0}.png")[1])
     if d['bottomcap']:
         capC(int(width), int(height), cap = d['bottomcap']).save(f"{pat}/bottomcap{e0}.png")
         capHeight = getImageRes(f"{pat}/bottomcap{e0}.png")[1]
         video = video.filter("pad", h = f"ih+{capHeight}+mod((ih+{capHeight}), 2)").overlay(ffmpeg.input(f"{pat}/bottomcap{e0}.png"), y = f"main_h-{capHeight}")
         height = str(int(height) + capHeight)