How to get button to open video and extract the video in frames to temp directory

I know this sounds complicated but I was wondering if it would be possible to get and extract frames of a particular short 4 second video in a temp directory (or else where)