I’m on a Docker container with Ubuntu 20.04 and I want to concadenate a set of videoclips from a mkv file with MoviePy
This is my code:
combinated_video = concatenate_videoclips(clips)
video_name, extension = os.path.splitext(self.video_path)
combinated_video_path = video_name + "_combinated" + extension
combinated_video.write_videofile(combinated_video_path, codec="libx264", audio_codec="mp3")
clips is a list like this:
[<moviepy.video.io.VideoFileClip.VideoFileClip object at 0x7f07eff86400>, <moviepy.video.io.VideoFileClip.VideoFileClip object at 0x7f07eff86670>, <moviepy.video.io.VideoFileClip.VideoFileClip object at 0x7f07eff86940>, <moviepy.video.io.VideoFileClip.VideoFileClip object at 0x7f07eff86c10>, <moviepy.video.io.VideoFileClip.VideoFileClip object at 0x7f07eff86100>]
I tried it on my local machine with Windows 11 and it worked, but it doesn’t on Ubuntu 20.04
This is the error i get:
MoviePy couldn't find the codec associated with the filename. Provide the 'codec' parameter in write_videofile.