-
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
Add fps_source option for #404 #516
Conversation
add the following to the top of your test files:
then you can use any of the files that are contained in the download_media.py file. These will be downloaded and placed in your ./media directory. if you want an extra media file added, we can look at modifying the download_media.py script, and also adding the media file to the earney/moviepy-media repo. Let me know if you have additional questions. |
The only video you have is the "Big Buck Bunny" one, which I have downloaded to test, and it has the same fps as tbr, which makes it unsuitable for testing. Can we add a different one? One that was actually filmed on a camera would probably be best. |
yes, we can add more videos. Do you have one in mind? |
I can't seem to find any videos on youtube where they are different. Maybe youtube uniforms them as they are uploaded? |
Are there any other ways we can do it? e.g. load a video into Travis? Or the actual repo? |
we load a video up to earney/moviepy-media. When Travis runs the tests, the first test in the python file is a test that sees if all the media files have been downloaded. If not, they are downloaded to the media directory. |
So is there any way for me to use my own files in the test without download_media having to get them from youtube? |
download_media can download any url, so if you have a location, we can download it. I created a repo just for media for this project called earney/moviepy_media, so that the media will not get moved like it does from sources that we do not control, etc. |
@gloin1313 I'm not aware of any other way of using our own files, but to use the download_media script I created. If you can find some other way, I'm interested. |
@Earney Ok, I've uploaded a video to vimeo here: https://vimeo.com/210765693 |
its located at https://github.com/earney/moviepy_media/tree/master/tests/videos as fire2.mp4. Let me know if you need some additional help. |
Aweseome!.. @Gloin1313 I think this is ready to merge.. :) |
Great! One thing I wasn't sure about; is defining a function inside of the function recommended? Do we agree readability over speed? |
yes, readability > speed |
In #404 Zulko suggested a
fps_source
parameter forVideoFileClip
, to tell it to readfps
instead oftbr
if required.I'm not sure how to implement the test (download the file), so if someone could let me know how, or do it yourself, that would be great!
And is it ok to declare the functions inside the main function? I did it like that so that they would be right before they are called for reference, but it might impact performance a little. Your decision.