From d46ff92f09cfe6952055defaf3f7ec7efdd55087 Mon Sep 17 00:00:00 2001 From: Ralf Ertzinger Date: Sat, 10 Jul 2010 20:10:55 +0200 Subject: [PATCH] Youtube: Add support for 4k video format - Add support for video type 38 (4k) - Add quality level "insane", which prefers this format --- videosite/YouTubeGrabber.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/videosite/YouTubeGrabber.pm b/videosite/YouTubeGrabber.pm index 5d328de..c800bae 100644 --- a/videosite/YouTubeGrabber.pm +++ b/videosite/YouTubeGrabber.pm @@ -61,10 +61,11 @@ sub _parse { my $videourl; my $quality = $self->_getval('QUALITY'); my %preflist = ( - 'hd' => [37, 22, 35, 18, 34, 6, 5], - 'h264' => [18, 34, 37, 22, 35, 6, 5], - 'high' => [34, 35, 18, 37, 22, 6, 5], - 'normal' => [6, 5, 34, 35, 18, 22, 37]); + 'insane' => [38, 37, 22, 35, 18, 34, 6, 5], + 'hd' => [37, 22, 35, 18, 34, 6, 5, 38], + 'h264' => [18, 34, 37, 22, 35, 6, 5, 38], + 'high' => [34, 35, 18, 37, 22, 6, 5, 38], + 'normal' => [6, 5, 34, 35, 18, 22, 37, 38]); my $preflist; my $jsp; @@ -188,6 +189,8 @@ sub _parse { $self->debug('Found flv,h264: %s', $urls{$_}); } elsif ($_ == 22) { $self->debug('Found mp4,h264,720p: %s', $urls{$_}); + } elsif ($_ == 38) { + $self->debug('Found mp4,h264,4k: %s', $urls{$_}); } elsif ($_ == 37) { $self->debug('Found mp4,h264,1080p: %s', $urls{$_}); } elsif ($_ == 18) { -- 1.8.3.1