|
- from moviepy.editor import *
- import os
- path = 'D:\练习Python\\'
- for lujing,liebiao,wenjian in os.walk(path):
- for i in wenjian:
- url = lujing+i
- if url.endswith('mp4'):
- print(url)
- name = url.split("\")[-1]
- clip = VideoFileClip(url).subclip(0,60)
- clip.write_videofile(f"D:\练习Python\\00{name}")
复制代码
|
|