16

What I want to do is extract every frame of a video file and output the images.

I tried using VLC's commands through terminal, however it seems to be skipping frames, even though I turned off "skip frames." I guess my MacBook Pro i7 is too slow. It seems weird that I can't play a video file without skipping frames. Anyways, are there any alternatives that would allow me to get every frame? It seems vlc tries to do it in real time which could be a problem if working on a slow machine.

Here is the VLC command I used:

/Applications/VLC.app/Contents/MacOS/VLC /Users/name/Downloads/complete/video.mkv --video-filter=scene --scene-prefix=movie --scene-ratio=1 --scene-path=/folder --start-time=1035 --stop-time=1100 --no-skip-frames
2
  • Download and Register Apple's QuickTime 7, one of the Export options is to export each frame as JPEG, PNG, etc. Commented Apr 18, 2018 at 23:22
  • [@MicroMachine] Note: Export is only available in the Pro version of Apple's QuickTime 7. goo.gl/LLmCHE
    – emallove
    Commented Dec 7, 2018 at 16:03

1 Answer 1

23

I'd do it with FFmpeg, which you can get through Homebrew, or alternatively ffmpegX.

In the first case, install Homebrew and then run brew install ffmpeg. This will require Xcode and building from source, which might be a bit of an overhead for your simple requirement.

In the second case, install the .app, and use the ffmpeg version bundled with it – however be advised that this version is from 2006, and therefore might not work with all input files.

/Applications/ffmpegX.app/Contents/Resources/ffmpeg

It worked for a h.264/MP4 clip for me.


Regardless, use FFmpeg to output each frame individually:

ffmpeg -i /path/to/video.mkv /path/to/output-%04d.jpg

You can also use png instead of jpg for lossless results, and change the number in %04d if you need more digits when the file is longer.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .