Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.