remove print-debugging

master
Aevann 2024-04-06 10:16:16 +02:00
parent b9b8111464
commit 024dddf9d2
1 changed files with 0 additions and 6 deletions

View File

@ -139,7 +139,6 @@ def reencode_video(old, new, check_sizes=False):
if check_sizes:
old_size = os.stat(old).st_size
new_size = os.stat(tmp).st_size
print(old_size, new_size, flush=True)
if new_size > old_size:
os.remove(tmp)
return
@ -158,8 +157,6 @@ def reencode_video(old, new, check_sizes=False):
def process_video(file, v):
print('help me', flush=True)
old = f'/videos/{time.time()}'.replace('.','')
file.save(old)
@ -178,15 +175,12 @@ def process_video(file, v):
os.remove(old)
abort(400, "Something went wrong processing your video on our end. Please try uploading it to https://pomf2.lain.la and post the link instead.")
print(bitrate, flush=True)
is_reencoding = False
if codec != 'h264':
copyfile(old, new)
gevent.spawn(reencode_video, old, new)
is_reencoding = True
elif bitrate >= 3000000:
print(bitrate, flush=True)
copyfile(old, new)
gevent.spawn(reencode_video, old, new, True)
is_reencoding = True