.TH SFRAME 1 "2026-02-20" "sframe 0.1"
.SH NAME
sframe \- extract unique frames from video files
.SH SYNOPSIS
.B sframe
.RB [ \-v ]
.RB [ \-t
.IR threshold ]
.RB [ \-f
.IR png | jpg ]
.RB [ \-o
.IR outdir ]
.IR video
.RI [ video... ]
.SH DESCRIPTION
.B sframe
(Simple Frame) extracts visually unique frames from video files for
research purposes. It uses perceptual hashing to detect and skip
duplicate or near-duplicate frames, saving only frames that differ
significantly from the previously saved frame.
.PP
Output is organized into subdirectories under the output directory,
one per video file. Frames are named with the video name and
timestamp:
.IR video-name-HH-MM-SS.mmm.png .
.SH OPTIONS
.TP
.BI \-t " threshold"
Perceptual hash threshold (0\(en64). Lower values are stricter,
meaning more frames are considered unique.
A value of 0 only removes exact duplicates.
Default: 8.
.TP
.BI \-f " format"
Output image format:
.B png
(default) or
.BR jpg .
.TP
.BI \-o " outdir"
Output directory. Default:
.IR ~/frames .
.TP
.B \-v
Print version and exit.
.SH EXAMPLES
Extract unique frames from a lecture recording:
.PP
.RS
sframe lecture.mp4
.RE
.PP
Use a stricter threshold and JPEG output:
.PP
.RS
sframe -t 4 -f jpg documentary.mkv
.RE
.PP
Process multiple videos into a custom directory:
.PP
.RS
sframe -o /tmp/research clip1.mp4 clip2.webm
.RE
.SH FILES
.TP
.I ~/frames/
Default output directory.
.SH EXIT STATUS
.B sframe
exits 0 on success, 1 if any video could not be processed.
.SH DEPENDENCIES
FFmpeg libraries (libavformat, libavcodec, libavutil, libswscale),
libpng, libjpeg.
.SH AUTHORS
Kris Yotam.
.SH LICENSE
MIT License. See LICENSE file.