Extract raw keyframe and non keyframes out of a video
If you feel like this example could be improved, you may edit this example here.
When extracting individual frames, FFmpeg is typically designed to extract full frames. However, extracting the frames as they are stored in the Codec is sometimes helpful when debugging.
Setting the -break_non_keyframes 1 parameter instructs ffmpeg to extract frames as raw binary data. Note that, for an H.264 input video, these images are not jpeg but the raw H.264 I/B/P frames. As far as I can tell, this is the only way to extract non-keyframes from FFmpeg.