-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.toml
70 lines (62 loc) · 1.73 KB
/
config.toml
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
output_dir = "/home/ociaw/Music (processed)"
[[input_dirs]]
priority = 100
path = "/home/ociaw/Music"
filters = [ { Glob = "*.flac" }, { Glob = "*.mp3" }, { Regex = ".*jpg$" } ]
[[input_dirs]]
priority = 50
path = "/home/ociaw/Music-test/cd-rips"
filters = [ { Glob = "*.flac" }, { Glob = "*.mp3" }, { Regex = ".*jpg$" } ]
[[input_dirs]]
priority = 40
path = "/home/ociaw/Music-test/digital-media"
filters = [ { Glob = "*.flac" }, { Glob = "*.mp3" }, { Regex = ".*jpg$" } ]
[[input_dirs]]
priority = 30
path = "/home/ociaw/Music-test/other"
filters = [ { Glob = "*.flac" }, { Glob = "*.mp3" }, { Regex = ".*jpg$" } ]
[[transformers]]
name = "Copy Images"
priority = 100
overwrite = { IfNewer = {} }
filters = [
{ Glob = "*.jpg" },
# An abomination
{ Glob = "*.jpeg" },
# Regex isn't needed, but useful for testing
{ Regex = ".*\\.png$" },
]
transformer = { CopyTransformer = {} }
[[transformers]]
# Assume that ogg files are already opus
name = "Copy ogg"
priority = 90
overwrite = { IfNewer = {} }
filters = [ { Glob = "*.ogg" } ]
transformer = { CopyTransformer = {} }
[[transformers]]
name = "Compress to opus"
priority = 80
overwrite = { IfNewer = {} }
filters = [ { Glob = "*.mp3" }, { Glob = "*.flac" } ]
# TOML isn't great at deeply nested configs...
transformer = { CommandTransformer = { output_file_ext = "ogg", transform_command = { program = "/usr/bin/ffmpeg", args = [
"-i",
"!INPUTPATH!",
# Quiet down
"-hide_banner",
"-nostats",
"-loglevel",
"error",
# Always overwrite existing files - this is handled at a higher level
"-y",
# Ignore video
"-vn",
# Audio codec is opus
"-c:a",
"libopus",
# Target bitrate is 96 kbps
"-b:a",
"96K",
"!OUTPUTPATH!"
] } } }