14 lines
463 B
Python
14 lines
463 B
Python
from moviepy.editor import *
|
|
import os
|
|
L = []
|
|
path = "/home/wanghc/output1/001020210507185532"
|
|
for root ,dirs,files in os.walk(path):
|
|
files.sort()
|
|
for file in files:
|
|
if os.path.splitext(file)[1] == ".mp4":
|
|
filepath = os.path.join(root,file)
|
|
video = VideoFileClip(filepath)
|
|
L.append(video)
|
|
final_clip = concatenate_videoclips(L)
|
|
final_clip.to_videofile(os.path.join(path,"result.mp4"),fps= 25,remove_temp=False)
|