From 087f20c133e94385f889ca4f915e9378276c78f2 Mon Sep 17 00:00:00 2001 From: Niko Storni Date: Tue, 25 May 2021 21:08:12 +0200 Subject: [PATCH] fix broken video codec exclude audio codecs that don't work on mobile --- sources/youtubeVideo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/youtubeVideo.go b/sources/youtubeVideo.go index 117eaab..0b1913a 100644 --- a/sources/youtubeVideo.go +++ b/sources/youtubeVideo.go @@ -277,7 +277,7 @@ func (v *YoutubeVideo) download() error { for i := 0; i < len(qualities); i++ { quality := qualities[i] - argsWithFilters := append(ytdlArgs, "-fbestvideo[ext=mp4][height<="+quality+"]+bestaudio[ext!=webm]") + argsWithFilters := append(ytdlArgs, "-fbestvideo[ext=mp4][vcodec!*=av01][height<="+quality+"]+bestaudio[ext!=webm][format_id!=258][format_id!=251][format_id!=256][format_id!=327]") argsWithFilters = append(argsWithFilters, userAgent...) cmd := exec.Command("youtube-dl", argsWithFilters...) log.Printf("Running command youtube-dl %s", strings.Join(argsWithFilters, " "))