good scale, width, height

💭 this will make the video stable but the video quality is little improved.

 how about the video quality?, this, i make like this so that heroku and railway users can get a fairly stable video quality.
This commit is contained in:
levina 2021-09-10 10:58:17 +07:00 committed by GitHub
parent d3927b6590
commit 96722b5806
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,11 +34,11 @@ def raw_converter(dl, song, video):
def youtube(url: str):
try:
params = {"format": "best[height=?720]/best", "noplaylist": True}
params = {"format": "best[height=?480]/best", "noplaylist": True}
yt = YoutubeDL(params)
info = yt.extract_info(url, download=False)
return info['url']
except ExtractorError: # do whatever
except ExtractorError:
return
except Exception:
return
@ -89,8 +89,8 @@ async def startvideo(client, m: Message):
InputVideoStream(
video_file,
VideoParameters(
width=1280,
height=720,
width=854,
height=480,
frame_rate=20,
),
),