If you want to extract frames from a video fast and precise,
there is no better tool than the command line utility ffmpeg.
Hello everyone, It's Average Linux User helping you to install,
configure and use Linux.
In the previous video, you learned how to extract images with VLC player
In that video, I promised you to show the same process for the command line.
So, this video is exactly about how to extract images from a video
with the command line tools.
Some of you may get bored with these conversion-animation videos.
Sorry for that.
This is the last video on this topic.
On Friday, you will see a video on a new topic.
Most likely, it will be a video about how to make a backup with graphical programs.
Now let's open the terminal and extract images from a video.
To extract frames and save them as images you need to run this command.
I believe there are many options you can add to it.
ffmpeg is very powerful, but this is the simplest way you can use.
So, this command will convert mp4 video to png images.
And this %03d means how many digits you want to use in the number of your files.
In this case we gonna use three digits.
Unlike in VLC conversion, ffmpeg allows you specify the fragment you want to extract.
The -ss option defines the offset from the beginning of the video,
and the -t option specifies how long the fragment should be.
For this video I will use this famous answer of Linux Torvals about Nvidia graphics.
And the most interesting fragment is between 1:44 and 1:48.
So, in the command I specified the offset of 1:44 and 1:44 - 1:48 gives the duration
of 4 seconds.
This should extract exactly that nice moment.
Let's run it.
We can go to the file manager and see the results.
As you can see many images have been generated.
And they are numbered with three digits.
Let's check them.
Now I list through all the images.
This is exactly what we intended to obtain.
Now you have all the tools to make GIF animations from videos and images.
You can use VLC and ffmpeg to extract frames from a video
and then you can convert them to a GIF animation
using GIMP or Imagemagic.
You can watch all these GIF animation tutorials in this playlist.
Please, feel free to add any of your tips about making GIF animation in the comment section below.
Everyone will greatly appreciate it.
Thank you for watching.
Không có nhận xét nào:
Đăng nhận xét