This includes decompiling videos. I’ve yet to come across a more efficient way to take a video file and turn it into a mass of still images. It’s a simple command line operation, one that might need to be tweaked and experimented with depending on what you want.
Decompile a video file into images
Before we can start the operation, you’ll need to have FFMPEG installed on your system. As this tool is quite popular, you should have no problem finding this software in your Linux distribution’s package repository. Search for ffmpeg. Once that’s done, find the video file you are looking for to decompile and launch a terminal window. Inside the terminal window, enter this command:
Note: it’s a good idea to move your video file into a separate folder away from all your other files. FFMPEG will turn your video into thousands of frames that you will need to sort through. If this command looks confusing, it’s because it hasn’t been configured. For starters, you’ll need to change videoname.filetype to whatever your video file is called (like video.mp4, etc.). Another thing you can change is the file type the frames will be saved as. The command has it set to the PNG image format. If you prefer something a little more memory conscious, consider changing this part of the command to image%d.jpg.
Once you’ve tweaked your command to your liking, just run it. The FFMPEG tool will take your video and spit out thousands of image files, one for each second of the video. This might take a long time (depending on your Computer power as well as video length), so be patient.
What can I do with these images?
Want to make a GIF animation out of the video you just decompiled? It’s very possible. All you really have to do is import some of your extracted frames into the Gimp image editor and create an animation. From there you can share your image with your friends. It’s a neat trick, really.
You can also import your frames as an image sequence in both OpenShot and Kdenlive. This sounds pointless on the surface, but it’s actually quite useful. For example: you have a video file in a less-than-stellar format. Why not just rip the audio, convert the video to frames then recompile them together in formats you actually like? The possibilities are endless!
Conclusion
FFMPEG is an awesome tool with a seemingly unending utility. I have troubling finding out exactly what this tool can’t do! Decompiling video frames is just one example of the many cool things that it can do! Do you know any FFMPEG secrets? Post them in the comments below!