diff --git a/server/szurubooru/app.py b/server/szurubooru/app.py index bd870ac..da00d7f 100644 --- a/server/szurubooru/app.py +++ b/server/szurubooru/app.py @@ -40,7 +40,7 @@ def _on_not_found_error(ex, _request, _response, _params): raise falcon.HTTPNotFound(title='Not found', description=str(ex)) def _on_processing_error(ex, _request, _response, _params): - raise falcon.HTTPNotFound(title='Processing error', description=str(ex)) + raise falcon.HTTPBadRequest(title='Processing error', description=str(ex)) def create_app(): ''' Create a WSGI compatible App object. ''' diff --git a/server/szurubooru/util/images.py b/server/szurubooru/util/images.py index 17b2a74..e94d675 100644 --- a/server/szurubooru/util/images.py +++ b/server/szurubooru/util/images.py @@ -38,11 +38,12 @@ class Image(object): def _execute(self, cli): proc = subprocess.Popen( - ['ffmpeg'] + cli, + ['ffmpeg', '-loglevel', '24'] + cli, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.PIPE) out, err = proc.communicate(input=self.content) if proc.returncode != 0: - raise errors.ConversionError(err) + raise errors.ProcessingError( + 'Error while processing image.\n' + err.decode('utf-8')) return out