-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Tabs in python code #35
Comments
Thanks for that! It is fixed now. The strange thing is that I have never had any problem in Python3 with these tabs, what is your version exactly? |
I am using python3.3.5 under Mac OSX, installing using Macports. (I don't know whether MacPorts uses pip, easy_install or something else under the hood. I don't know if it uses six or other packages to mutate Python2 code into Python3 as it does it.) |
Ok thanks for the info. Could you try to reinstall and see it it works now? So that I can safely close the issue. |
Quick correction, I originally installed it using pip . More trouble: old-style print statements in After fixing that, it installs and imports correctly. Unfortunately, for my particular movie file, ffmpeg can't determine the duration, and so it chokes at |
This sounds like an interesting project. Just to be sure, are you reading from a finite video, or from a video that is still being recorded ? In the first case, what you could try is to rewrite the video with ffmpeg and see if the result has the good metadata (but this might take some time):
Otherwise I can also make the duration search optional (and send a warning when a video has no duration). Could you try this and see if it works? That is, replace that line 215 by duration=None, then do things like
Not ideal, but that would be a start. Does ffmpeg at least find the fps of the video ? The "print" statements are fixed, thanks for the report. |
I am reading from a file which was previously piped from the raspivid application (over the network). Since the compression is not too extreme, it requests a larger -probesize to get enough information to do what it can, but even with an arbitrarily large probesize, it doesn't get the duration. It returns an FPS of 25. However, this is wrong (actual FPS is 10 in my case). If I put the duration section in a try/except block, I can use FFMPEG_VideoReader() directly to get sequential frames from the beginning. However, when I use moviepy.editor.VideoFileClip(), I always get the same frame from fullclip.get_frame(t) independent of how I change t. Another Python3 change I found (which I needed for the coolTextEffects demo) was
|
Hi there, sorry to bother you with this old issue, but have you given it a try with the recent version ? There are chances that it may work properly. |
It's back to not working with Python 3.3
No such problem with python2.7. |
Thanks for catching that, I corrected it. Now working with Python3 too. |
Some of the files have tabs instead of spaces in some places. This is a barrier against using the package in Python3
The files I found were:
moviepy/video/compositing/transitions.py
moviepy/video/fx/even_size.py
moviepy/video/fx/fadeout.py
moviepy/video/fx/headblur.py
moviepy/video/fx/mirror_x.py
moviepy/video/fx/mirror_y.py
moviepy/video/fx/scroll.py
moviepy/video/fx/time_mirror.py
moviepy/video/io/sliders.py
moviepy/video/tools/tracking.py
and after detabbing, I could import moviepy.editor in python3 .
The text was updated successfully, but these errors were encountered: