Move encoding options. Add version variable
This commit is contained in:
parent
207561a95c
commit
31e10cf1cb
@ -14,6 +14,24 @@ from collections import OrderedDict
|
||||
|
||||
import json
|
||||
|
||||
# encoding options used
|
||||
encoding = {
|
||||
"libx264": {
|
||||
"crf": [15, 20, 25, 30, 35],
|
||||
"presets": ["fast", "medium", "slow", "veryslow"],
|
||||
},
|
||||
"libx265": {
|
||||
"crf": [15, 20, 25, 30, 35],
|
||||
"presets": ["fast", "medium", "slow", "veryslow"],
|
||||
},
|
||||
"libaom-av1": {"crf": [20, 25, 30, 35, 40], "presets": [0, 2, 4, 6]},
|
||||
"libsvtav1": {"crf": [20, 25, 30, 35, 40], "presets": [0, 4, 8, 12]},
|
||||
}
|
||||
|
||||
# program version
|
||||
# make tests reproducible by tag
|
||||
version = "v0.0.1a1"
|
||||
|
||||
# always round timestamp to integer
|
||||
def now():
|
||||
return int(time.time())
|
||||
@ -59,23 +77,10 @@ def write_line(
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
encoding = {
|
||||
"libx264": {
|
||||
"crf": [15, 20, 25, 30, 35],
|
||||
"presets": ["fast", "medium", "slow", "veryslow"],
|
||||
},
|
||||
"libx265": {
|
||||
"crf": [15, 20, 25, 30, 35],
|
||||
"presets": ["fast", "medium", "slow", "veryslow"],
|
||||
},
|
||||
"libaom-av1": {"crf": [20, 25, 30, 35, 40], "presets": [0, 2, 4, 6]},
|
||||
"libsvtav1": {"crf": [20, 25, 30, 35, 40], "presets": [0, 4, 8, 12]},
|
||||
}
|
||||
|
||||
if not os.path.isdir("encoded"):
|
||||
os.mkdir("encoded")
|
||||
|
||||
datafile = "data-" + str(now()) + ".csv"
|
||||
datafile = version + "-data-" + str(now()) + ".csv"
|
||||
|
||||
with open(datafile, "w", newline="") as file:
|
||||
write = csv.writer(file)
|
||||
|
Loading…
Reference in New Issue
Block a user