temporary changes

This commit is contained in:
janis
2023-05-15 16:00:51 +02:00
parent 0b9a1e43d8
commit 00988c524e
3 changed files with 34 additions and 2 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -117,9 +117,41 @@ class Handler:
os.system( self.command )
print( '\n==> Video split ' )
self.fsrScaler( self.tmppath, filepath, threads, quality_mode, fsrpath, quality_setting, sharpening, scaling )
# get Video's audio
print( '\n\n==>Finished Upscaling individual images. \n==>Retrieving Video audio to append\n\n' )
time.sleep( 2 );
try:
os.remove(f"{self.tmppath}audio.aac")
os.remove(f"{output_path}")
except FileNotFoundError:
pass
if self.os_type == 'linux':
self.command = f'ffmpeg -i {self.filepath} -vn -acodec copy {self.tmppath}audio.aac'
elif self.os_type == 'win32':
self.command = f'ffmpeg -i {self.filepath} -vn -acodec copy {self.tmppath}audio.aac'
else:
print( 'OS CURRENTLY UNSUPPORTED!' )
return False
os.system( self.command )
# reassemble Video
print( '\n\n==>Reassembling Video... with framerate @', self.framerate, '\n\n' )
if self.os_type == 'linux':
self.command = f'ffmpeg -framerate {self.framerate} -i {self.tmppath}sc/ig%08d.bmp {output_path} -i {self.tmppath}audio.aac'
elif self.os_type == 'win32':
self.command = f'ffmpeg -framerate {self.framerate} -i \"{self.tmppath}sc\\ig%08d.bmp\" {output_path} -i {self.tmppath}audio.aac'
else:
print( 'OS CURRENTLY UNSUPPORTED!' );
return False
os.system( self.command )
def fsrScaler ( self, tmppath, filepath, threads, quality_mode, fsrpath, quality_setting, sharpening, scaling ):
# Locate Images and assemble FSR-Command
self.file_list = []
self.filelist = os.listdir(self.tmppath)
self.filelist = os.listdir(tmppath)
self.filelist.pop(0)
self.filelist.sort()
self.number = 0