Grab the knack of ffmpeg

1 minute read

What is ffmpeg

Have you ever thought “I want to cut out an image from a video”, “I want to extract only audio from a video”, “I want to make a video from multiple images”, “I want to convert jpeg to png”, etc.?
However, it is troublesome to download the software one by one, and there are many types such as paid and free, so I do not know which one to choose after all.
Ffmpeg is very convenient in such a case. The reading is FM Peg.

How to install

Windows: here
Mac: Run “brew install ffmpeg”

how to use

Basic: “ffmpeg -i [input data path] [output data path]” (encoded with the extension specified by the output data path)
Example: “ffmpeg -i input.avi output.mp4” => input.avi is converted to output.mp4 and output

Cut out the image with the highest image quality

“ffmpeg -i input.mp4 -q 1 -qmin 1 %4d.jpg “
You can cut out with the highest image quality by specifying 1 with -q and -qmin.
At% 4d, it doesn’t matter if the image name is determined by the serial number of 4 digits in the number string.
The number of cutouts per second can be specified by adding an option such as -r 30.