A simple tool that takes a video and a timestamp, and creates a screenshot image at exactly that moment.
Imagine you're watching a video and want to save a picture from a specific moment. This tool helps you do that! You tell it:
- Which video you want to use
- The exact time in the video (like "2 minutes and 30 seconds")
And it will create a picture file for you in the same folder as your video.
- Visit the GitHub page:
https://github.com/chris-calo/framegrab - Look for the green "Code" button and click it
- Select "Download ZIP"
- Once downloaded, unzip the file to a folder on your computer
OR
If you're comfortable with the command line, you can run:
git clone https://github.com/chris-calo/framegrab.git
On macOS 15+
-
Open Terminal (find it in Applications > Utilities)
-
Navigate to where you saved the scripts:
cd path/to/framegrab -
Make the script executable (you only need to do this once):
chmod +x framegrab.sh -
Run the tool with your video and timestamp:
./framegrab.sh path/to/your/video.mp4 01:23.456The timestamp format is: minutes:seconds.milliseconds
On Linux (Ubuntu/PopOS/Debian 22.04+)
-
First, make sure FFMPEG is installed (required):
sudo apt install ffmpeg -
Open Terminal
-
Navigate to where you saved the scripts:
cd path/to/framegrab -
Make the script executable (you only need to do this once):
chmod +x framegrab.sh -
Run the tool with your video and timestamp:
./framegrab.sh path/to/your/video.mp4 01:23.456The timestamp format is: minutes:seconds.milliseconds
On Windows 11+
-
Open PowerShell (right-click on the Start button and select "Windows PowerShell")
-
Navigate to where you saved the scripts:
cd path\to\framegrab -
Run the tool with your video and timestamp:
.\framegrab.ps1 path\to\your\video.mp4 01:23.456The timestamp format is: minutes:seconds.milliseconds
macOS Example
Let's say you have a video called "birthday_party.mp4" in your Downloads folder, and you want a screenshot at 2 minutes and 15.5 seconds:
./framegrab.sh ~/Downloads/birthday_party.mp4 02:15.5
This will create a file called "birthday_party-02-15-5.png" in your Downloads folder.
Windows Example
Let's say you have a video called "holiday_video.mp4" on your desktop, and you want a screenshot at 3 minutes and 45 seconds:
.\framegrab.ps1 C:\Users\YourName\Desktop\holiday_video.mp4 03:45.000
This will create a file called "holiday_video-03-45-000.png" on your desktop.
Linux Example
Let's say you have a video called "lecture.mp4" in your Videos folder, and you want a screenshot at 5 minutes and 12 seconds:
./framegrab.sh ~/Videos/lecture.mp4 05:12.000
This will create a file called "lecture-05-12-000.png" in your Videos folder.
What's FFMPEG and why do I need it?
FFMPEG is a free tool that helps work with videos. Our script uses it to extract images from your videos. Don't worry, the script will help you install it if you don't have it.
"Command not found" error on macOS
If you see an error like "command not found," try these steps:
- Make sure you're in the right folder where the script is saved
- Check that you've made the script executable with:
chmod +x framegrab.sh
"Execution of scripts is disabled" error on Windows
If Windows doesn't let you run the script, you might need to change the execution policy:
- Open PowerShell as Administrator (right-click, "Run as Administrator")
- Run this command:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser - Try running the script again
What is Homebrew (for macOS users)?
Homebrew is like an app store for your Mac's Terminal. It helps install useful tools like FFMPEG.
Important: Homebrew requires Xcode (or Xcode Command Line Tools) to be installed. If you don't have it:
- Install Xcode Command Line Tools by opening Terminal and running:
xcode-select --install - Follow the on-screen instructions to complete the installation
Then, to install Homebrew:
- Open Terminal
- Paste and run this command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - Follow the instructions on screen
FFMPEG installation issues on Linux
If you have trouble installing FFMPEG on your Linux system:
-
Make sure your package lists are up-to-date:
sudo apt update -
Then try installing FFMPEG again:
sudo apt install ffmpeg
If you're still having issues, it might be due to repository configuration. On Ubuntu/PopOS or other Debian-based systems, FFMPEG should be available in the standard repositories.
What is Chocolatey (for Windows users)?
Chocolatey is like an app store for your Windows command line. It helps install useful tools like FFMPEG. If our script suggests installing it, you can:
- Open PowerShell as Administrator (right-click, "Run as Administrator")
- Paste and run this command:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) - Once installed, restart PowerShell before using our tool
The video exists but I get "file does not exist" error
Make sure you're using the correct path to your video. For example:
- On macOS: Use
~/Documents/myvideo.mp4for files in your Documents folder - On Windows: Use full paths like
C:\Users\YourName\Videos\myvideo.mp4 - On Linux: Use
~/Videos/myvideo.mp4for files in your Videos folder
If your path has spaces, put it in quotes:
- macOS:
./framegrab.sh "~/My Videos/birthday party.mp4" 01:23.456 - Windows:
.\framegrab.ps1 "C:\Users\YourName\My Videos\birthday party.mp4" 01:23.456 - Linux:
./framegrab.sh "~/My Videos/birthday party.mp4" 01:23.456
The screenshot is black or incorrect
This could happen if:
- The timestamp is beyond the length of the video
- The video format is unusual or corrupted
Try a different timestamp or check if the video plays correctly in a media player.
How do I find the exact timestamp I want?
- Play your video in VLC media player or similar
- Pause at the exact frame you want
- Note the time displayed (usually at the bottom of the player)
- Use that time as your timestamp
My screenshot is low quality
The tool creates screenshots at the same quality as your video. If your video is low resolution, the screenshot will be too.
Need More Help?
If you're still having trouble, please create an issue on our GitHub page with:
- The exact command you ran
- The error message you received
- Your operating system version
We'll help you sort it out!
Copyright © 2025 Chris Calo
This project is licensed under the MIT License - see the LICENSE file for details.