proper skip for --resume + fixes

This commit is contained in:
Zen 2020-02-14 08:15:44 +02:00
parent bf1806bba6
commit bfca7df315

View file

@ -3,7 +3,10 @@
# Todo:
# Benchmarking
# Add conf file
# Add new paths for frame check to all encoders
# Make it not split if splits are there
import time
from tqdm import tqdm
import sys
import os
@ -400,6 +403,7 @@ class Av1an:
self.frame_check(source, target)
def concatenate_video(self):
# Using FFMPEG to concatenate all encoded videos to 1 file.
# Reading all files in A-Z order and saving it to concat.txt
@ -454,7 +458,7 @@ class Av1an:
# Video Mode
if self.mode == 0:
if bool(self.args.resume) != bool(self.temp_dir.exists()):
if not (self.args.resume and self.temp_dir.exists()):
# Check validity of request and create temp folders/files
self.setup(self.args.file_path)
@ -512,8 +516,10 @@ if __name__ == '__main__':
# Main thread
try:
start = time.time()
av1an = Av1an()
av1an.main()
print(f'Finished: {round(time.time() - start, 1)}s')
except KeyboardInterrupt:
print('Encoding stopped')
if sys.platform == 'linux':