Search code examples
ffmpegvideo-processingdecodinghevclibx265

How to extract all HEVC i-frame images from a x265 video?


I need to drop all the B-frames and P-frames, only keeping the I-frames to be saved as images.


Solution

  • You can instruct the decoder to skip non-keyframes using -skip_frame.

    ffmpeg -skip_frame nokey -i input.mp4 -vsync vfr img%04d.png