How to use FFMPEG

FFMPEG notes

How to use FFMPEG

Installation

  1. Unzip pack downloaded from FFMPEG website
  2. Set Windows environment variables

Extraction

Extract all frames

1
ffmpeg -i file.mpg -r 1/1 output-%02d.png

Specifying time interval

1
ffmpeg -ss hh:mm:ss -to hh:mm:ss -i filename.mp4 output-%2d.png

According to posts on Stackoverflow and testing, extraction speed seems to be JPG>PNG>BMP, while by quality BMP>PNG>JPG.

Concatenate

Simple concat into MP4

1
2
3
ffmpeg -i <input> -filter:v fps=30 <output>

ffmpeg -i input-%2d.png -vcodec mpeg4 -y output.mp4