From c2c16649cb08bb08fa5c07cdcb50bdd1621aceaf Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 6 Oct 2023 16:56:48 +0300 Subject: [PATCH] fix this https://rdrama.net/post/209432/marseykong2marseygorillamarseybowmarseyboobamarseytwerking/5115725#context --- files/helpers/media.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/files/helpers/media.py b/files/helpers/media.py index 40339b92f..91f94d747 100644 --- a/files/helpers/media.py +++ b/files/helpers/media.py @@ -143,7 +143,9 @@ def process_video(file, v): new = f'{old}.mp4' - if file.content_type != 'video/mp4': + codec = ffmpeg.probe(old)['streams'][0]['codec_name'] + + if codec != 'h264': copyfile(old, new) gevent.spawn(convert_to_mp4, old, new) else: