FFMPEG reader fails after KeyboardInterrupt
See original GitHub issueAfter a manual KeyboardInterrupt ([Ctrl]+[c]), reading a frame with (index > 0) causes an FFMPEG error.
import imageio
reader = imageio.get_reader("imageio:cockatoo.mp4",format="ffmpeg")
#reader.get_data(2) #Initializing the reader by reading some frame here will cause the error to go away
try:
input("Do a manual KeyboardInterrupt [Ctrl]+[c] (raising an error with code won't trigger the error)")
except:
print(reader.get_data(1)) #Reading some frame, n>0 fails.
print(reader.get_data(0)) #Reading frame 0 works fine.
System: Imageio 2.4.1 Python 3.6.5 FFMPEG 3.2.4 Linux 64bit
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Parent process receives KeyboardInterrupt on subsequent ...
The problem I am having is that immediately upon the execution of subprocess.run() , Python issues a KeyboardInterrupt, and the Pool child ...
Read more >ffmpeg never finishes encoding, instead starts dropping ...
ffmpeg never finishes encoding, instead starts dropping frames indefinitely after reaching the -vframes limit.
Read more >VideoFileClip instance has no attribute 'reader' #512 - GitHub
I am trying just a simple program to read in a video file: from moviepy.editor import VideoFileClip, concatenate_videoclips from ...
Read more >Make Ctrl+C work on a script with concurrent.futures workers ...
Ctrl + C causes your program to throw the KeyboardInterrupt exception at whatever line it is at. It doesn't have anything to do...
Read more >raspbian - Interrupting a Program with a Button
Currently tying to stop the middle of a command if the user presses a certain button. I tried this bit of code below...
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
https://stackoverflow.com/questions/5045771
Looking into this now and having a facepalm moment when I realized it’s the ffmpeg process stopping because the interrupt propagates to the subprocesses 🤦♂