remove webm and av01 from codec detection

fix #216
This commit is contained in:
Benny 2023-04-08 12:49:29 +02:00
parent 282bf3c97b
commit ee3dfbdffa
No known key found for this signature in database
GPG key ID: 6CD0DBDA5235D481

View file

@ -163,7 +163,6 @@ def ytdl_download(url, tempdir, bm, **kwargs) -> dict:
"outtmpl": output,
"restrictfilenames": False,
"quiet": True,
"proxy": os.getenv("YTDL_PROXY"),
}
if ENABLE_ARIA2:
ydl_opts["external_downloader"] = "aria2c"
@ -174,7 +173,8 @@ def ytdl_download(url, tempdir, bm, **kwargs) -> dict:
"--split=16",
]
formats = [
"bestvideo[ext=mp4]+bestaudio[ext=m4a]/bestvideo+bestaudio",
# webm and av01 are not streamable on telegram, so we'll extract mp4 and not av01 codec
"bestvideo[ext=mp4][vcodec!*=av01]+bestaudio[ext=m4a]/bestvideo+bestaudio",
"bestvideo[vcodec^=avc]+bestaudio[acodec^=mp4a]/best[vcodec^=avc]/best",
None,
]