diff options
author | trizen <trizen@protonmail.com> | 2020-08-08 14:49:36 +0300 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2020-08-14 14:50:39 -0500 |
commit | 519e45375172d6de1cf3d2450939006c7701bfcf (patch) | |
tree | da6a940d6a4de8419dcee876cf34532d6a4f7dcb | |
parent | 678fa96e985669cb4db26d0ac06af6b3325ba2f4 (diff) | |
download | fair-viewer-519e45375172d6de1cf3d2450939006c7701bfcf.tar.lz fair-viewer-519e45375172d6de1cf3d2450939006c7701bfcf.tar.xz fair-viewer-519e45375172d6de1cf3d2450939006c7701bfcf.zip |
When `prefer_mp4` is true and there is no AVC MP4 available, prefer VP9 over AV1. Much faster to decode.
Signed-off-by: Jesús <heckyel@hyperbola.info>
-rw-r--r-- | lib/WWW/FairViewer.pm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/WWW/FairViewer.pm b/lib/WWW/FairViewer.pm index bb23de7..037f469 100644 --- a/lib/WWW/FairViewer.pm +++ b/lib/WWW/FairViewer.pm @@ -922,10 +922,12 @@ sub get_streaming_urls { } if ($url->{type} =~ /\bvideo\b/i) { - if ($self->get_prefer_mp4 and $url->{type} =~ /\bmp4\b/i) { - push @video_urls, $url; + if ($url->{type} =~ /\bav[0-9]+\b/i) { # AV1 + if ($self->get_prefer_av1) { + push @video_urls, $url; + } } - elsif ($self->get_prefer_av1 and $url->{type} =~ /\bav[0-9]+\b/i) { + elsif ($self->get_prefer_mp4 and $url->{type} =~ /\bmp4\b/i) { push @video_urls, $url; } } |