Convert a video into images from GNU / Linux

ffmpeg

If you are thinking of transforming a video into images, frame by frame, now you can from GNU / Linux with the help of the ffmpeg tool. This tool is quite interesting, not only for this task, but also to transform between video formats, etc. We have already talked about it on other occasions, but now we explain how to easily convert a movie to images.

Either because you want to get an image of your favorite movie, because you want to get a frame of a video to use as a cover or because you are interested in getting the frames of a video to be able to save them as images, the first thing you should do is install ffmpeg if you don't have it already installed.

Once installed, you can use the following command:

ffmpeg -i nombre_video.extension nombre_imagen%d.png

By exampleImagine that you want to transfer a video that you have in the Downloads directory called wedding.mpg to PNG images called fotoX (where X is a number) and that is saved in a directory called frames. For this we would do the following:

cd Descargas
ffmpeg -i boda.mpg /fotogramas/foto%d.png

This we would generate a directory with numerous images named photo01.png, photo02.png, etc. So until the video is completed image by image so that you can use them as a cover, edit them and recreate a video with other software such as OpenShot, etc.

I hope this has helped you tutorial, if you have any problem, question or query, Leave a comment and I will try to help you as much as possible.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Elpidio Moreno said

    Greetings, thanks for the tutorial. Continuing with the FFmpeg theme, is it possible to use NVENC to speed up encoding?

    1.    Isaac PE said

      Hello,

      If possible ... You can take a look at this:

      https://github.com/Brainiarc7/ffmpeg_libnvenc

      Sorry not to help you anymore, but I don't use NVIDIA GPUs and I never have. Anyway, if you have doubts or any question, comment it to see if I can give you a cable.

      Greetings.