From b000707c10bb85875101a3b2c1c764dd0e9b7737 Mon Sep 17 00:00:00 2001 From: ed Date: Thu, 14 Apr 2022 18:20:48 +0200 Subject: [PATCH] detect poor ffmpeg builds --- copyparty/th_srv.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/copyparty/th_srv.py b/copyparty/th_srv.py index e6593de3..6d89a277 100644 --- a/copyparty/th_srv.py +++ b/copyparty/th_srv.py @@ -407,7 +407,14 @@ class ThumbSrv(object): or "Please choose an encoder manually" in serr ): self.args.th_ff_jpg = True - m = "FFmpeg failed because it was compiled without libwebp; enabling --th_ff_jpg to force jpeg output:\n" + m = "FFmpeg failed because it was compiled without libwebp; enabling --th-ff-jpg to force jpeg output:\n" + c = 1 + + if ( + "Requested resampling engine is unavailable" in serr + or "output pad on Parsed_aresample_" in serr + ): + m = "FFmpeg failed because it was compiled without libsox; you must set --th-ff-swr to force swr resampling:\n" c = 1 m += "\n".join(["ff: {}".format(x) for x in serr.split("\n")])