-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpolicy.json
More file actions
80 lines (75 loc) · 2.84 KB
/
Copy pathpolicy.json
File metadata and controls
80 lines (75 loc) · 2.84 KB
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
78
79
80
{
"_comment": "Video Compress encoding policy. Author: Chanaveer Kadapatti. This file is the encoding contract — edit numbers to retune compression without code changes. CRF (Constant Rate Factor) is the quality knob: lower = better quality + larger file (libx264 sweet spot 18–28). VMAF is the perceptual quality metric: 95+ visually transparent, 93 hard to tell apart, 90 acceptable, <88 visible degradation. The pipeline retries at a tighter CRF if VMAF falls below a profile's floor.",
"defaults": {
"crf": 23,
"audio_bitrate": "128k",
"preset": "medium",
"vmaf_floor": 92,
"max_retries": 2,
"crf_step_on_retry": -2
},
"profiles": {
"screencast": {
"description": "Screen recordings, slides, code editors. Mostly static UI; tolerates aggressive CRF.",
"crf": 28,
"audio_bitrate": "96k",
"preset": "medium",
"vmaf_floor": 93
},
"animation": {
"description": "2D/3D animation, flat colors, cel-shaded. Compresses well; preserve edges.",
"crf": 26,
"audio_bitrate": "128k",
"preset": "medium",
"vmaf_floor": 93
},
"talking_head": {
"description": "Single speaker, low motion, simple background. Common podcast/interview format.",
"crf": 25,
"audio_bitrate": "128k",
"preset": "medium",
"vmaf_floor": 93
},
"cinematic": {
"description": "Film/cinematic content, controlled motion, may have grain. Preserve detail.",
"crf": 22,
"audio_bitrate": "192k",
"preset": "slow",
"vmaf_floor": 94
},
"sports": {
"description": "High motion, fast cuts, athletic action. Needs more bits to avoid blocking.",
"crf": 21,
"audio_bitrate": "128k",
"preset": "medium",
"vmaf_floor": 93
},
"mixed": {
"description": "Varied content within a single video. Conservative middle-of-the-road profile.",
"crf": 23,
"audio_bitrate": "128k",
"preset": "medium",
"vmaf_floor": 93
},
"unknown": {
"description": "Fallback when LLM is disabled, classification fails, or no profile matches.",
"crf": 23,
"audio_bitrate": "128k",
"preset": "medium",
"vmaf_floor": 92
}
},
"motion_modifiers": {
"_comment": "Adjusts CRF based on the motion signal from the classifier. high → tighter CRF (better quality, larger file). low → looser CRF (compress harder).",
"high": -2,
"medium": 0,
"low": 1
},
"detail_modifiers": {
"_comment": "Adjusts CRF based on fine-detail/grain signal. high → preserve more.",
"high": -1,
"low": 0
},
"_triage_comment": "Skip videos already encoded efficiently. If kbps < this × megapixels, the pipeline skips the encode entirely. Set to 0 to disable. 1080p ≈ 2.07 megapixels; at 1500 kbps/MP the floor is ~3100 kbps.",
"triage_floor_kbps_per_megapixel": 1500
}