An open API service indexing awesome lists of open source software.

https://github.com/crypticsignal/i-frames-saver

Takes a video file as input and saves the keyframes (or all I-frames) as PNG files.
https://github.com/crypticsignal/i-frames-saver

ffmpeg ffprobe frames i-frames idr keyframes png video

Last synced: 4 months ago
JSON representation

Takes a video file as input and saves the keyframes (or all I-frames) as PNG files.

Awesome Lists containing this project

README

        

# I-frames-saver
A command-line program that takes a video file as input and saves the I-frames (or keyframes only by using the `-k` argument) as PNG files.

Using this program is very simple, simply specify the path of the video using the `-f` argument, e.g. `python3 main.py -f video.mp4`. Include the `-k` argument if you are only interested in keyframes, e.g. `python3 main.py -f video.mp4 -k`

*Note: with H.264, "keyframes" refers to Instantaneous Decoder Refresh (IDR) frames, which is a special type of I-frame. Where there is an IDR frame, subsequent frames cannot reference any frames before the IDR frame. Because of this, video segments that begin with an IDR frame can be independently decoded.*
# Usage
```
usage: main.py [-h] -f FILE_PATH [-k]

optional arguments:
-h, --help show this help message and exit
-f FILE_PATH, --file-path FILE_PATH
Enter the path of the file that you want to analyse.
If the path contains a space, it must be surrounded in double quotes.
Example: -f "C:/Users/H/Desktop/my file.mp4"
-k, --key-frames-only
Only process keyframes.
```