-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
don't read *.mp4 file #75
Comments
I upgraded ffmpeg and work all, but don't can write gif on file <moviepy.video.io.VideoFileClip.VideoFileClip instance at 0x2fc1b00> on ./ directory created anna_olaf.gif file python code from moviepy.editor import * anna_olaf = (VideoFileClip("c5baba648903aefc48771937de56918f.mp4") composition = CompositeVideoClip([anna_olaf, snapshot]) |
I want to write to file 1.56, 1.67, 1,80,1.89 frame. how I can create this. please help |
Have you installed ImageMagick ? |
I installed and all OK, thank you very much, sorry for stupid question :) |
Problem solved :) |
By the way, what do you mean by this -> "I want to write to file 1.56, 1.67, 1,80,1.89 frame." |
Yes of course. For example I have video 3 sec. I want to get Image frame from video in 1sec 56 ms, 1 sec. 67 ms ... |
What I didn't understand is what you want to do with these. I mean, if you just want the arrays that correspond to the images (these will be numpy arrays), you write
If you want to save these frames as image files you will write
Did that answer your question ? |
yes thanks) |
Cool ! |
Hi @Zulko , from moviepy import editor Error details are as following Traceback (most recent call last): Please help me to get it working. Thanks |
Hi.
I have some problems.
I have debian server where installed moviepy and ffmpeg . I want to create gif from *.mp4 video but look what write.
-------------gif creator script---------------
from moviepy.editor import *
anna_olaf = (VideoFileClip("c5baba648903aefc48771937de56918f.mp4")
.subclip(1,1)
.speedx(0.5) # Play at half speed
.resize(.4))
snapshot = (anna_olaf
.crop(x2= anna_olaf.w/2) # remove right half
.to_ImageClip(0.2) # snapshot of the clip at t=0.2s
.set_duration(anna_olaf.duration))
composition = CompositeVideoClip([anna_olaf, snapshot])
composition.write_gif('anna_olaf.gif', fp
s=15)
video http://109.120.161.43/uploads/c5baba648903aefc48771937de56918f.mp4
return message
root@vps-1049546:~# python /var/www/uploads/gif.py
Traceback (most recent call last):
File "/var/www/uploads/gif.py", line 3, in
clip = (VideoFileClip("c5baba648903aefc48771937de56918f.mp4")
File "/usr/local/lib/python2.7/dist-packages/moviepy-0.2.1.8.12-py2.7.egg/moviepy/video/io/VideoFileClip.py", line 55, in init
self.reader = FFMPEG_VideoReader(filename, pix_fmt=pix_fmt)
File "/usr/local/lib/python2.7/dist-packages/moviepy-0.2.1.8.12-py2.7.egg/moviepy/video/io/ffmpeg_reader.py", line 22, in init
infos = ffmpeg_parse_infos(filename, print_infos, check_duration)
File "/usr/local/lib/python2.7/dist-packages/moviepy-0.2.1.8.12-py2.7.egg/moviepy/video/io/ffmpeg_reader.py", line 225, in ffmpeg_parse_infos
"path.")%filename)
IOError: MoviePy error: the file c5baba648903aefc48771937de56918f.mp4 could not be found !
Please check that you entered the correct path.
Exception AttributeError: "VideoFileClip instance has no attribute 'reader'" in <bound method VideoFileClip.del of <moviepy.video.io.VideoFileClip.VideoFileClip instance at 0x7f2dc57e1320>> ignored
please help, what I doing not true?
The text was updated successfully, but these errors were encountered: