ZiB 10 месяцев назад
Родитель
Сommit
661809e3be
1 измененных файлов с 7 добавлено и 2 удалено
  1. 7 2
      remux/remux/probe.py

+ 7 - 2
remux/remux/probe.py

@@ -14,7 +14,12 @@ class Probe:
   def probe(self, path):
     self.logger.debug(f"Probing: {path}")
     streams = []
-  
+
+    # Sanity
+    if not path.exists():
+      self.logger.warn(f"No such file: {path}")
+      return streams
+
     # ffprobe
     args = [ self.ffprobe_exec, '-hide_banner', '-show_streams', path ]
     self.logger.debug(f"ffprobe command: {args}")
@@ -24,7 +29,7 @@ class Probe:
     if probe.returncode != 0:
       self.logger.error(f"ffprobe error ({probe.returncode}): {probe.stderr.decode(self.encoding)}")
       self.logger.debug(f"ffprobe stdout: {data}")
-      return None
+      return steams
 
     # Parse streams
     prefix = None