OSError on `get_frame(__some_existing_large_index__)
See original GitHub issueExpected Behavior
> clip = VideoFileClip(str(video_path))
> clip.duration * clip.fps
252723.60000000003
> clip.get_frame(10000) # Should return 10000th frame
Actual Behavior
> clip = VideoFileClip(str(video_path))
> frame = clip.get_frame(0) # works
> clip.duration * clip.fps
63229.799999999996 # The duration is '17min 34sec'
> clip.get_frame(63220) # Throws OSError even though the given frame
# number is before the end of the video.
> clip.get_frame(6322) # Throws OSError
> clip.get_frame(632) # Works.
Here’s the error message:
OSError: MoviePy error: failed to read the first frame of video file /app/data/streams/unravel1/unravel1_cropped.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
Run the above code with the video: https://www.dropbox.com/s/27mie3v8kvo30fz/unravel16_cropped.mp4?dl=0
Specifications
- Python Version: ‘3.6.8 (default, Jan 14 2019, 11:02:34) \n[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]]’
- Moviepy Version: ‘1.0.0’
- Platform Name: Ubuntu
- Platform Version: 16.04LTS. Linux 4f9e6923e339 4.15.0-58-generic
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:7
Top Results From Across the Web
Capture axes or figure as movie frame - MATLAB getframe
This MATLAB function captures the current axes as it appears on the screen as a movie frame.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@SuperShinyEyes Did the above info help you resolve your problem?
.get_frame
’s input is seconds, not frame no.I use this: