reencode HE-AACv2 (not supported on chromium desktop) https://www.chromium.org/audio-video/

master
Aevann 2024-10-20 16:17:21 +03:00
parent 669e2399dd
commit 39d3e4482a
1 changed files with 4 additions and 2 deletions

View File

@ -184,7 +184,9 @@ def process_video(file, v):
if stream["codec_type"] == "video":
codec = stream['codec_name']
bitrate = int(stream.get('bit_rate', 3000000))
break
elif stream["codec_type"] == "audio":
profile = stream['profile']
except:
os.remove(old)
stop(400, "Something went wrong processing your video on our end. Please try uploading it to https://pomf2.lain.la and post the link instead.")
@ -194,7 +196,7 @@ def process_video(file, v):
stop(400, "Something went wrong processing your video on our end. Please try uploading it to https://pomf2.lain.la and post the link instead.")
is_reencoding = False
if codec != 'h264':
if codec != 'h264' or profile != 'LC':
is_reencoding = True
copyfile(old, new)
gevent.spawn(reencode_video, old, new)