Create Image Dataset from Video Frames

This task can be accomplished by either of the following methods:

  1. ffmpeg
  2. opencv

1. ffmpeg

ffmpeg -i /path/to/your/video.mp4 -r 1/1 $frame%04d.jpg     

E.g.

_config.yml

2. opencv

./opencv_frame_extraction -fn="/path/to/your/video.mp4"

E.g.

_config.yml

Source code:

Github:

FrameExtractionSample

Written on April 16, 2015