I'm pretty new to Python, so I hope this isn't too confusing. I'm using a module called Moviepy and I'm trying to export a video to a folder within the folder that the python script is in. If that made no sense, here is the folder structure:
VideoCreator |-- VideoCreator.py |-- BackgroundClips | |-- input.mp4 |-- OutputVideos | |-- output.mp4
Here is my current code:
# input video
clip = VideoFileClip("Video_Test_4k.mkv").subclip(50,60)
# random example text
txt_clip = TextClip("Example Text",fontsize=70,color='white')
# Overlay the text clip on the first video clip
video = CompositeVideoClip([clip, txt_clip])
# export video
video.write_videofile("Video_Test_4k_edited.mp4")
Right now, this script takes a video within the VideoCreator folder and exports it within the same folder. What I want it to do is pull a video from BackgroundClips, edit it within VideoCreator.py, and export it to OutputVideos. I'm not sure if this is something that can be done within python or if it takes something directly from the module itself, but I read the documentation for this method (https://zulko.github.io/moviepy/ref/VideoClip/VideoClip.html?highlight=write_videofile#moviepy.video.compositing.CompositeVideoClip.CompositeVideoClip.write_videofile) and couldn't find anything. Thanks!