fix this https://watchpeopledie.tv/h/meta/post/61549/megathread-for-bugs-and-suggestions/3093990#context
parent
628b3dc3b5
commit
c7841d437a
|
@ -168,9 +168,12 @@ def process_video(file, v):
|
||||||
new = f'{old}.mp4'
|
new = f'{old}.mp4'
|
||||||
|
|
||||||
try:
|
try:
|
||||||
video_info = ffmpeg.probe(old)['streams'][0]
|
video_info = ffmpeg.probe(old)['streams']
|
||||||
codec = video_info['codec_name']
|
for stream in video_info:
|
||||||
bitrate = int(video_info.get('bit_rate', 3000000))
|
if stream["codec_type"] == "video":
|
||||||
|
codec = stream['codec_name']
|
||||||
|
bitrate = int(stream.get('bit_rate', 3000000))
|
||||||
|
break
|
||||||
except:
|
except:
|
||||||
os.remove(old)
|
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.")
|
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.")
|
||||||
|
|
Loading…
Reference in New Issue