diff options
author | dec05eba <dec05eba@protonmail.com> | 2023-07-30 23:44:17 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2023-07-30 23:44:17 +0200 |
commit | 53f79e38f22a11640edce141a3e6f96c4f39a9bb (patch) | |
tree | 2fd4a1f8a3610f587713ea8cc62d04e6d7d13622 /src | |
parent | 1139e4a16a76d5de64c87b4075ac570914ef192f (diff) |
Youtube: fix some videos (disable av1, breaks mpv), allow webm
Diffstat (limited to 'src')
-rw-r--r-- | src/QuickMedia.cpp | 5 | ||||
-rw-r--r-- | 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; |