Open seanc1505 opened 3 years ago
Repeated this with a clip of length 1778.82 seconds.
The frame is displayed if end_time is <=1778.725 seconds. The frame is not displayed if end_time is set to 1778.75 seconds
You could try with v2.0.0.dev2 or the current master branch.
Successfully installed moviepy-2.0.0.dev2 numpy-1.20.0
What wasn't highlighted in the above post was that the user also sets the start time of the subclip (wasn't relevant to the issue i thought). And this is displayed also
Using v2.0.0.dev2 build.
The end frame is still displayed up until 56.038.
When end time is set to 56.04 the end frame displayed is the same frame as the one displayed for the start frame and the following error is highlighted
C:\Users...\io\ffmpeg_reader.py:165: UserWarning: In file C:/Users/.../sample_video_clip.mp4, 6220800 bytes wanted but 0 bytes read at frame index 3359 (out of a total 3363 frames), at time 56.04/56.11 sec. Using the last valid frame instead. UserWarning,
@seanc1505 The above sounds like instructions or (future) docs could be improved. If you have suggestions/would submit a PR, that'd be great.
Also, if you could update your comment using proper formatting (so code, output, regular text can be differentiated), that'd be helpful.
Expected Behavior
Building a video editor using tkinter and moviepy
User enters the end time of the subclip the frame at the specified time of the source clip is displayed. if user does not specify a time, the duration of the source clip is used.
Actual Behavior
If the does not specify the end time, the duration of the source video is used. which leads to the error:
File "c:/Users/...gui_basics.py", line 292, in on_create_subclip_button end_frame_image_array = source_video.get_frame((end_time))
OSError: MoviePy error: failed to read the first frame of video file C:/Users/.../sample_video_clip.mp4. That might mean that the file is corrupted. That may also mean that you are using a deprecated version of FFMPEG. On Ubuntu/Debian for instance the version in the repos is deprecated. Please update to a recent version from the website.
Steps to Reproduce the Problem
When testing this i used a clip that was 56.11 seconds long. (tested on other .mp4 of varying length also) I entered the end time as 45 seconds and the end frame displays as desired this Continues up to 56.038 if the end time is set to 56.039 the error is displayed and no image is displayed.
The Stack Overflow question may give some more detail on this bug. Suggested by another user to raise this bug.
Specifications
My first time logging a github bug. Please advise if edits/more info are needed.