diff options
| author | 2022-04-29 01:58:56 -0400 | |
|---|---|---|
| committer | 2022-04-29 01:58:56 -0400 | |
| commit | c6b88a96bd191711fc540d7babab3d2e09c68da8 (patch) | |
| tree | 288f3641ea19865740191b452da8832021772b8c /gallery_dl/postprocessor | |
| parent | 2fe1dfed848fc26b7419e3bfe91a62e686960429 (diff) | |
New upstream version 1.21.2.upstream/1.21.2
Diffstat (limited to 'gallery_dl/postprocessor')
| -rw-r--r-- | gallery_dl/postprocessor/ugoira.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/gallery_dl/postprocessor/ugoira.py b/gallery_dl/postprocessor/ugoira.py index c5477d2..fb57e84 100644 --- a/gallery_dl/postprocessor/ugoira.py +++ b/gallery_dl/postprocessor/ugoira.py @@ -49,7 +49,7 @@ class UgoiraPP(PostProcessor): mkvmerge or shutil.which("mkvmerge")): demuxer = "mkvmerge" else: - demuxer = "concat" if util.WINDOWS else "image2" + demuxer = "concat" if demuxer == "mkvmerge": self._process = self._process_mkvmerge @@ -137,6 +137,8 @@ class UgoiraPP(PostProcessor): self.log.error("Unable to invoke FFmpeg (%s: %s)", exc.__class__.__name__, exc) pathfmt.realpath = pathfmt.temppath + except Exception: + pathfmt.realpath = pathfmt.temppath else: if self.mtime: mtime = pathfmt.kwdict.get("_mtime") @@ -150,7 +152,13 @@ class UgoiraPP(PostProcessor): def _exec(self, args): self.log.debug(args) out = None if self.output else subprocess.DEVNULL - return subprocess.Popen(args, stdout=out, stderr=out).wait() + retcode = subprocess.Popen(args, stdout=out, stderr=out).wait() + if retcode: + print() + self.log.error("Non-zero exit status when running %s (%s)", + args, retcode) + raise ValueError() + return retcode def _process_concat(self, pathfmt, tempdir): rate_in, rate_out = self.calculate_framerate(self._frames) @@ -215,7 +223,7 @@ class UgoiraPP(PostProcessor): def _finalize_mkvmerge(self, pathfmt, tempdir): args = [ self.mkvmerge, - "-o", self._realpath, + "-o", pathfmt.path, # mkvmerge does not support "raw" paths "--timecodes", "0:" + self._write_mkvmerge_timecodes(tempdir), ] if self.extension == "webm": |
