Forrest logo
back to the ffplay tool

ffplay:tldr:6b832

ffplay: Show only video keyframes.
$ ffplay -vf select="${eq(pict_type\,PICT_TYPE_I)}" ${filename}
try on your machine

This command is using the ffplay tool, which is a simple media player based on the FFmpeg library. The purpose of this command is to play a video file (${filename}) while applying a video filter (-vf).

The video filter used is select="${eq(pict_type\,PICT_TYPE_I)}". Let's break it down:

  • select=: This is the keyword used to specify a filter for selecting specific frames in the video.
  • ${eq(...)}: This is a function used to evaluate a condition. In this case, it checks if the value before the comma equals the value after the comma.
  • pict_type: This is a property that represents the picture type of a frame in the video.
  • PICT_TYPE_I: This is a constant representing an I-frame (intra-frame) picture type.

So, the filter select="${eq(pict_type\,PICT_TYPE_I)}" is selecting only the I-frames from the video, while discarding other frame types like P-frames or B-frames. I-frames are fully encoded frames that are independent of other frames, making them useful for seeking or extracting key moments from a video.

Overall, this command will play the video file specified by ${filename} while displaying only the I-frames.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the ffplay tool