From 53f79e38f22a11640edce141a3e6f96c4f39a9bb Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 30 Jul 2023 23:44:17 +0200 Subject: Youtube: fix some videos (disable av1, breaks mpv), allow webm --- src/QuickMedia.cpp | 5 +++-- src/VideoPlayer.cpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index 86d4f8f..df5984d 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -8007,10 +8007,11 @@ namespace QuickMedia { } full_filepath = directory; - char buffer[10]; + char buffer[8]; if(generate_random_characters(buffer, sizeof(buffer), "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", 62)) { - std::string new_filename = filename.filename_no_ext() + " "; + std::string new_filename = filename.filename_no_ext() + " ("; new_filename.append(buffer, sizeof(buffer)); + new_filename += ")"; new_filename += filename.ext(); full_filepath.join(new_filename); } else { diff --git a/src/VideoPlayer.cpp b/src/VideoPlayer.cpp index 5cf10b3..9036155 100644 --- a/src/VideoPlayer.cpp +++ b/src/VideoPlayer.cpp @@ -227,7 +227,7 @@ namespace QuickMedia { if(startup_args.no_video) ytdl_format = "(bestaudio/best)"; else - ytdl_format = "(bestvideo[ext=mp4][height<=?" + std::to_string(startup_args.monitor_height) + "]+bestaudio/best)"; + ytdl_format = "(bestvideo[vcodec!*=av01][height<=?" + std::to_string(startup_args.monitor_height) + "]+bestaudio/best)"; ytdl_format += "[protocol^=http]/" + ytdl_format + "[protocol^=m3u8]"; ytdl_format = "--ytdl-format=" + ytdl_format; -- cgit v1.2.3