forked from mlsmithjr/transcoder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
simple.yml
84 lines (74 loc) · 2.22 KB
/
simple.yml
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
81
82
83
##
# NOTE: Very simple starter config for pytranscode
#
# Run using: pytranscoder -y simple.yml ...
##
##
# global configuration
##
config:
default_queue_file: '/tmp/fileoffiles.txt'
ffmpeg: '/usr/bin/ffmpeg'
colorize: yes
##
# profile definitions. You can model all your transcoding combinations here.
##
profiles:
#
# Sample cpu-based transcode, uses built-in default sequential queue
#
h264:
input_options:
output_options:
- "-threads 4"
- "-c:v x264 "
- "-crf 20 "
- "-c:a copy"
- "-c:s copy "
- "-f matroska"
extension: '.mkv'
threshold: 20
#
# Sample nVidia transcode setup, uses 'cuda' queue defined above
#
hevc_cuda:
input_options:
- "-hwaccel cuvid"
output_options:
- "-c:v hevc_nvenc"
- "-profile:v main"
- "-preset medium"
- "-crf 20"
- "-c:a copy"
- "-c:s copy"
- '-f matroska"
extension: '.mkv'
threshold: 20 # 20% minimum size reduction %, otherwise source is preserved as-is
#
# Rules are evaluated in order. First matching rule wins so order wisely.
# Rules with a profile of "SKIP" mean to skip processing of the matched video
#
rules:
'skip video if already encoded in hevc/h265':
profile: SKIP
criteria:
vcodec: 'hevc'
'skip video if resolution < 700':
profile: SKIP
criteria:
res_height: '<700'
'content just too big':
profile: hevc_cuda
criteria:
runtime: '>90' # more than 90 minutes
filesize_mb: '>4000' # ..and larger than 4 gigabytes
'small enough already': # skip if <2.5g size and higher than 720p and between 30 and 64 minutes long.
profile: SKIP # transcoding these will probably cause a noticeable quality loss so skip.
criteria:
filesize_mb: '<2500' # less than 2.5 gigabytes
res_height: '720-1081' # 1080p, allowing for random oddball resolutions still in the HD range
runtime: '30-65' # between 30 and 65 minutes long
'default': # this will be the DEFAULT (no criteria implies a match)
profile: hevc_cuda
criteria:
vcodec: '!hevc'