-
-
Notifications
You must be signed in to change notification settings - Fork 268
Expand file tree
/
Copy pathrender_Video.py
More file actions
20 lines (17 loc) · 739 Bytes
/
render_Video.py
File metadata and controls
20 lines (17 loc) · 739 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from moviepy.editor import VideoFileClip,concatenate_videoclips
from listvideos import videoslist,pathOfVideo
import os
#Taking Input about Video Location.
def renderFinalVideo():
videoNames=[VideoFileClip(os.path.join(pathOfVideo, video)) for video in videoslist]
final_video = concatenate_videoclips(videoNames,method='compose')
filePath= input("Enter location to save file:-")
filePathExists= os.path.exists(filePath)
if filePathExists:
fileName= input("Enter file name;-")
if fileName.endswith(".mp4"):
final_video.write_videofile(os.path.join(filePath,fileName))
else:
print("Sorry the extension must be .mp4")
else:
print(f"Sorry Error Occured!!!Make sure this path exists:- {filePath}")