From 478ae2e060a3ae04cac0c31e588237029971d2d7 Mon Sep 17 00:00:00 2001 From: Jiawen Geng Date: Fri, 7 Jul 2023 08:16:34 +0000 Subject: [PATCH] fix: exclude vp09 for download --- .gitpod.yml | 9 +++++++++ ytdlbot/downloader.py | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 .gitpod.yml diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 00000000..76d9ef38 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,9 @@ +# This configuration file was automatically generated by Gitpod. +# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml) +# and commit this file to your remote git repository to share the goodness with others. + +# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart + +tasks: + - init: pip3 install -r requirements.txt + - init: sudo apt update && sudo apt install ffmpeg -y diff --git a/ytdlbot/downloader.py b/ytdlbot/downloader.py index d34bd9d2..965b3abe 100644 --- a/ytdlbot/downloader.py +++ b/ytdlbot/downloader.py @@ -170,8 +170,8 @@ def ytdl_download(url: str, tempdir: str, bm, **kwargs) -> list: "--split=16", ] formats = [ - # 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", + # webm , vp9 and av01 are not streamable on telegram, so we'll extract mp4 and not av01 codec + "bestvideo[ext=mp4][vcodec!*=av01][vcodec!*=vp09]+bestaudio[ext=m4a]/bestvideo+bestaudio", "bestvideo[vcodec^=avc]+bestaudio[acodec^=mp4a]/best[vcodec^=avc]/best", None, ]