From 027afb5400cd15ed6be293f1e6f87ede50cd571f Mon Sep 17 00:00:00 2001 From: aandrew-me Date: Sun, 24 Nov 2024 12:55:02 +0300 Subject: [PATCH] Fix correct resolution not downloading for playlists --- src/playlist.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/playlist.js b/src/playlist.js index 2a98897..0f79b6b 100644 --- a/src/playlist.js +++ b/src/playlist.js @@ -168,9 +168,9 @@ function download(type) { format = ""; } else { if (videoType === "mp4") { - format = `-f "mp4[height=${quality}]+m4a/mp4[height<=${quality}]+м4а/best[height<=${quality}]"`; + format = `-f "bestvideo[height<=1080]+bestaudio[ext=m4a]/best[height<=1080]/best" --merge-output-format "mp4" --recode-video "mp4"`; } else if (videoType === "webm") { - format = `-f "webm[height<=${quality}]+opus/bv*[height<=${quality}]+ba/${formatId}+m4a/mp4[height=${quality}]+m4a/best[height<=${quality}]"`; + format = `-f "bestvideo[height<=1080]+bestaudio[ext=webm]/best[height<=1080]/best" --merge-output-format "webm" --recode-video "webm"`; } else { format = `-f "bv*[height=${quality}]+ba/best[height=${quality}]/best[height<=${quality}]"`; }