Extract frames from video for processing in PIL
Can I process video frame-by frame in PIL? I want to take a video, perform different operations on the video, then reform it into a video.
I'm thinking of using workflow to get a video, then convert it to GIF, then pass that to pythonista. I can find pure-Python libraries for working with GIFs.
images2gifworks well. I can process frames in Python, then make a gif of that which is sent back to workflow for conversion to video and saving.
In other words:
- Pythonista launches workflow using URL scheme
- Workflow gets latest video
- Workflow converts it to GIF
- Workflow passes GIF to to pythonista
- Pythonista extracts frames from GIF
- Pythonista processes frames with PIL
- Pythonista reforms frames into gif
- Pythonista passes GIF to workflow
- Workflow makes video from gif.
This seems horribly arduous for video processing.