0

I have a folder called "Videos" consisting of 7 videos of mp4 format. I want to fast forward all the 7 videos and store them in another folder. The issue is that only the 7th video is fast forwarded and stored in another folder. The rest 6 videos are not fast forwarded and stored!

Here is the code...

from moviepy.editor import *
import os
from natsort import natsorted

L =[]

for root, dirs, files in os.walk("G:/Oscid Technology/Videos"):
    #files.sort()
    files = natsorted(files)
    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 = video.fx(vfx.speedx, 3)
final_clip.to_videofile("G:/Oscid Technology/multiple_forward/multiple_forward.mp4")
Matthias
  • 12,873
  • 6
  • 42
  • 48
  • 1
    `final_clip = video.fx(vfx.speedx, 3)` isn't part of the loop. – Matthias Feb 16 '22 at 14:31
  • https://stackoverflow.com/q/28758474/193892 you actually need to concatenate the videos somewhere. I don't see that in your code. Have a look at this question for inspiration. – Prof. Falken Feb 16 '22 at 14:35

0 Answers0