Compare commits
No commits in common. "e94536baa40fd32f107036e3586ce5ed721e5737" and "8aab51464d4002db807553891f23cda2b5899d37" have entirely different histories.
e94536baa4
...
8aab51464d
@ -52,7 +52,7 @@ encoding: dict[str, Any] = {
|
|||||||
|
|
||||||
# program version
|
# program version
|
||||||
# make tests reproducible by tag
|
# make tests reproducible by tag
|
||||||
version = "v0.0.3a2"
|
version = "v0.0.3"
|
||||||
|
|
||||||
# always round timestamp to integer
|
# always round timestamp to integer
|
||||||
def now():
|
def now():
|
||||||
@ -367,48 +367,17 @@ def main(inputfile: str, outputpath: str = "encodes", keepencodes: bool = False)
|
|||||||
|
|
||||||
# execute previously defined encoding settings
|
# execute previously defined encoding settings
|
||||||
starttime = now()
|
starttime = now()
|
||||||
try:
|
|
||||||
ff.run()
|
ff.run()
|
||||||
except ffmpy.FFRuntimeError:
|
|
||||||
with open("error.log", "a") as file:
|
|
||||||
file.write(
|
|
||||||
"FFMPEG error. Failed encoding",
|
|
||||||
inputfile,
|
|
||||||
"to",
|
|
||||||
outputfile,
|
|
||||||
)
|
|
||||||
|
|
||||||
endtime = now()
|
endtime = now()
|
||||||
difftime = int(endtime - starttime)
|
difftime = int(endtime - starttime)
|
||||||
|
|
||||||
outputfilesize = os.path.getsize(outputfile) / 1024 / 1024
|
outputfilesize = os.path.getsize(outputfile) / 1024 / 1024
|
||||||
|
|
||||||
try:
|
|
||||||
vmaf = score_vmaf(outputfile=outputfile, inputfile=inputfile)
|
vmaf = score_vmaf(outputfile=outputfile, inputfile=inputfile)
|
||||||
except ffmpy.FFRuntimeError:
|
|
||||||
with open("error.log", "a") as file:
|
|
||||||
file.write(
|
|
||||||
"FFMPEG error. To calculate VMAF score of",
|
|
||||||
outputfile,
|
|
||||||
)
|
|
||||||
|
|
||||||
try:
|
|
||||||
ssim = score_ssim(outputfile=outputfile, inputfile=inputfile)
|
ssim = score_ssim(outputfile=outputfile, inputfile=inputfile)
|
||||||
except ffmpy.FFRuntimeError:
|
|
||||||
with open("error.log", "a") as file:
|
|
||||||
file.write(
|
|
||||||
"FFMPEG error. To calculate SSIM score of",
|
|
||||||
outputfile,
|
|
||||||
)
|
|
||||||
|
|
||||||
try:
|
|
||||||
mse = score_psnr(outputfile=outputfile, inputfile=inputfile)
|
mse = score_psnr(outputfile=outputfile, inputfile=inputfile)
|
||||||
except ffmpy.FFRuntimeError:
|
|
||||||
with open("error.log", "a") as file:
|
|
||||||
file.write(
|
|
||||||
"FFMPEG error. To calculate MSE score of",
|
|
||||||
outputfile,
|
|
||||||
)
|
|
||||||
|
|
||||||
write_line(
|
write_line(
|
||||||
datafile=datafile,
|
datafile=datafile,
|
||||||
|
Loading…
Reference in New Issue
Block a user