[postprocessor:ugoira] pass '-f' if not present

This commit is contained in:
Mike Fährmann
2018-06-21 13:16:18 +02:00
parent 0c1c4557dd
commit 4eb94aca17
3 changed files with 9 additions and 10 deletions

View File

@@ -61,9 +61,10 @@ class UgoiraPP(PostProcessor):
if self.args:
args += self.args
if self.twopass:
log = tempdir + "/ffmpeg2pass"
if "-f" not in args:
args += ["-f", self.extension]
null = "NUL" if os.name == "nt" else "/dev/null"
args += ["-passlogfile", log, "-pass"]
args += ["-passlogfile", tempdir + "/ffmpeg2pass", "-pass"]
subprocess.Popen(args + ["1", "-y", null]).wait()
subprocess.Popen(args + ["2", pathfmt.realpath]).wait()
else: