diff --git a/chart/model-values.yaml b/chart/model-values.yaml index 7f8c364..13bc085 100644 --- a/chart/model-values.yaml +++ b/chart/model-values.yaml @@ -304,7 +304,7 @@ deployments: thenlper/gte-base - name: "retro-sadtalker" - image: "crgooeyprodwestus1.azurecr.io/gooey-gpu-retro:9" + image: "crgooeyprodwestus1.azurecr.io/gooey-gpu-retro:10" autoscaling: queueLength: 2 minReplicaCount: 3 diff --git a/ffmpeg_util.py b/ffmpeg_util.py index ac0091e..7540672 100644 --- a/ffmpeg_util.py +++ b/ffmpeg_util.py @@ -28,6 +28,13 @@ class AudioMetadata(BaseModel): codec_name: typing.Optional[str] = None +FFMPEG_ERR_MSG = ( + "Unsupported File Format\n\n" + "We encountered an issue processing your file as it appears to be in a format not supported by our system or may be corrupted. " + "You can find a list of supported formats at [FFmpeg Formats](https://ffmpeg.org/general.html#File-Formats)." +) + + def ffprobe_audio(input_path: str) -> AudioMetadata: text = call_cmd( "ffprobe", @@ -35,6 +42,7 @@ def ffprobe_audio(input_path: str) -> AudioMetadata: "-print_format", "json", "-show_streams", input_path, "-select_streams", "a:0", + err_msg=FFMPEG_ERR_MSG, ) # fmt:skip data = json.loads(text) @@ -58,6 +66,7 @@ def ffprobe_video(input_path: str) -> VideoMetadata: "-print_format", "json", "-show_streams", input_path, "-select_streams", "v:0", + err_msg=FFMPEG_ERR_MSG, ) # fmt:skip data = json.loads(text) @@ -132,13 +141,6 @@ def ffmpeg_get_writer_proc( return subprocess.Popen(cmd_args, stdin=subprocess.PIPE) -FFMPEG_ERR_MSG = ( - "Unsupported File Format\n\n" - "We encountered an issue processing your file as it appears to be in a format not supported by our system or may be corrupted. " - "You can find a list of supported formats at [FFmpeg Formats](https://ffmpeg.org/general.html#File-Formats)." -) - - def ffmpeg(*args) -> str: return call_cmd("ffmpeg", "-hide_banner", "-y", *args, err_msg=FFMPEG_ERR_MSG)