~kris/hacks

sframe

ref: 02a1b32f6354d21c58f4d2bd92c608b2ec120336 sframe/sframe.1 -rw-r--r-- 1.6 KiB
02a1b32f — Kris Yotam Add README 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
.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.