From f0693a48f176c01dd7b22ca4aa2aca0299146b30 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 8 Jul 2023 11:41:56 +0200 Subject: Youtube: fix livestream not working (filtered out by yt-dlp) --- src/VideoPlayer.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/VideoPlayer.cpp b/src/VideoPlayer.cpp index e13f55f..5cf10b3 100644 --- a/src/VideoPlayer.cpp +++ b/src/VideoPlayer.cpp @@ -225,9 +225,12 @@ namespace QuickMedia { std::string ytdl_format; if(startup_args.no_video) - ytdl_format = "--ytdl-format=(bestaudio/best)[protocol=https]"; + ytdl_format = "(bestaudio/best)"; else - ytdl_format = "--ytdl-format=(bestvideo[ext=mp4][height<=?" + std::to_string(startup_args.monitor_height) + "]+bestaudio/best)[protocol=https]"; + ytdl_format = "(bestvideo[ext=mp4][height<=?" + std::to_string(startup_args.monitor_height) + "]+bestaudio/best)"; + + ytdl_format += "[protocol^=http]/" + ytdl_format + "[protocol^=m3u8]"; + ytdl_format = "--ytdl-format=" + ytdl_format; if(startup_args.use_youtube_dl) { args.push_back("--ytdl=yes"); -- cgit v1.2.3