Answer the question
In order to leave comments, you need to log in
How to expand video through mirror_x in Moviepy?
Good afternoon. I need to automate the mirroring of video clips, after reading the documentation for Moviepy, my crooked hands gave out the following code
from moviepy.editor import *
import moviepy
import os
import requests
import moviepy.video.fx.all as vfx
i = 0
directory = "D:\Документы\проекты\1 группа\заготовки"
tema = 'D:\Документы\проекты\1 группа\обложка' # адрес обложки
oblojka = os.listdir(tema)
files = os.listdir(directory)
print(files[i])
print(oblojka[i])
volume = len(files) #пределяем размер массива
volume2 = len(oblojka) #пределяем размер массива
print(volume, volume2)
clip = VideoFileClip(files[i])
mclip = clip.fx(vfx.mirror_x)
mclip.write_videofile('mirror_fname.mp4')
C:\Users\s2kor_000\AppData\Local\Programs\Python\Python36\python.exe D:/htpthd/bin/Movieredaktor.py
1.mp4
aaaaaaa.JPG
1 1
Traceback (most recent call last):
File "D:/htpthd/bin/Movieredaktor.py", line 21, in <module>
clip = (VideoFileClip(files[i]))
File "C:\Users\s2kor_000\AppData\Local\Programs\Python\Python36\lib\site-packages\moviepy\video\io\VideoFileClip.py", line 91, in __init__
fps_source=fps_source)
File "C:\Users\s2kor_000\AppData\Local\Programs\Python\Python36\lib\site-packages\moviepy\video\io\ffmpeg_reader.py", line 33, in __init__
fps_source)
File "C:\Users\s2kor_000\AppData\Local\Programs\Python\Python36\lib\site-packages\moviepy\video\io\ffmpeg_reader.py", line 272, in ffmpeg_parse_infos
"path.")%filename)
OSError: MoviePy error: the file 1.mp4 could not be found!
Please check that you entered the correct path.
Помогите разобраться.
Answer the question
In order to leave comments, you need to log in
the file 1.mp4 could not be found
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question