Analyze video files by extracting frames at 1-second intervals using ffmpeg, then examining the frames to understand the video content.
Requires ffmpeg installed on the system. Install if missing:
# Ubuntu/Debian
sudo apt-get install -y ffmpeg
# macOS
brew install ffmpeg
scripts/extract_frames.sh <video_path> [output_dir] [fps]
Arguments:
video_path (required): Path to the video fileoutput_dir (optional): Directory for extracted frames. Default: creates frames_ in current directoryfps (optional): Frames per second to extract. Default: 1 (one frame per second)Example:
scripts/extract_frames.sh /path/to/video.mp4
scripts/extract_frames.sh /path/to/video.mp4 ./my_frames
scripts/extract_frames.sh /path/to/video.mp4 ./my_frames 2 # 2 frames per second
Output:
frame_001.jpg, frame_002.jpg, etc.extract_frames.sh on the video fileread tool to view images共 1 个版本