Skip to content

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

License

Notifications You must be signed in to change notification settings

CrypticSignal/I-frames-saver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Languages