add various fixes for bugs

This commit is contained in:
2023-06-07 19:57:31 +02:00
parent 98f2ec28ce
commit d19435277f
3 changed files with 13 additions and 9 deletions

View File

@@ -119,7 +119,11 @@ class Handler:
# Retrieving Video metadata
self.filelist = os.listdir(self.tmppath)
self.videometa = ffmpeg.probe(str(input_path))['streams'].pop(0)
try:
self.videometa = ffmpeg.probe(str(input_path))['streams'].pop(0)
except Exception:
print( '\n\n==> Failed to execute ffprobe. Please ensure that you have a valid ffmpeg & ffprobe installation.\n --> Refer to our wiki for a guide on a proper installation\n\n')
return False;
self.duration = self.videometa.get( 'duration' )
self.frames = len( self.filelist )
@@ -175,4 +179,6 @@ class Handler:
else:
print( 'OS CURRENTLY UNSUPPORTED!' );
return False
os.system( self.command )
os.system( self.command )
return True;