[BACKEND] Show ffmpeg conversion errors (#1016)
This commit is contained in:
parent
85ee967d39
commit
0ed8aec83d
1 changed files with 5 additions and 3 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
import os
|
import os
|
||||||
|
from subprocess import CalledProcessError
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from typing import Dict
|
from typing import Dict
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
@ -204,9 +205,10 @@ class FileConvertPlugin(Plugin[FileConvertOptions]):
|
||||||
try:
|
try:
|
||||||
FFMPEG.run(ffmpeg_args)
|
FFMPEG.run(ffmpeg_args)
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
raise ValidationException(
|
err_msg = f"ffmpeg_post_process_args {' '.join(ffmpeg_args)} result in an error"
|
||||||
f"ffmpeg_post_process_args {' '.join(ffmpeg_args)} result in an error"
|
if isinstance(exc, CalledProcessError):
|
||||||
) from exc
|
err_msg += f":\n{exc.stderr.decode('utf-8')}"
|
||||||
|
raise ValidationException(err_msg) from exc
|
||||||
|
|
||||||
if not os.path.isfile(tmp_output_file):
|
if not os.path.isfile(tmp_output_file):
|
||||||
raise ValidationException(
|
raise ValidationException(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue