jenkins-bot has submitted this change and it was merged.

Change subject: Add support for 4K videos
......................................................................


Add support for 4K videos

* Supports 4k videos at resolution 4096x2160.

The video can be played using vp8 or vp9 for webm video.

The video can also be played in h264 which is also off by default.

This is off by default to enable please do the following

$wgEnabledTranscodeSet[] = WebVideoTranscode::ENC_WEBM_2160P;
$wgEnabledTranscodeSet[] = WebVideoTranscode::ENC_VP9_2160P;
$wgEnabledTranscodeSet[] = WebVideoTranscode::ENC_H264_2160P;

Bug: T98694
Change-Id: I65c59bc3b93276b9764081d37aa1de8ea96aebf9
---
M TimedMediaHandler.php
M WebVideoTranscode/WebVideoTranscode.php
M i18n/en.json
M i18n/qqq.json
4 files changed, 54 insertions(+), 0 deletions(-)

Approvals:
  Brion VIBBER: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/TimedMediaHandler.php b/TimedMediaHandler.php
index 5095156..05bcda2 100644
--- a/TimedMediaHandler.php
+++ b/TimedMediaHandler.php
@@ -145,6 +145,9 @@
        // A full-HD high quality WebM stream
        WebVideoTranscode::ENC_WEBM_1080P,
 
+       // A 4K full high quality WebM stream
+       // WebVideoTranscode::ENC_WEBM_2160P,
+
 
        // Ogg Theora/Vorbis
        // Fallback for Safari/IE/Edge with ogv.js
@@ -182,6 +185,9 @@
 
        // A full-HD high quality stream; higher end phones, tablets, smart tvs
        WebVideoTranscode::ENC_H264_1080P,
+
+       // A 4K high quality stream; higher end phones, tablets, smart tvs
+       WebVideoTranscode::ENC_H264_2160P,
 */
 );
 
diff --git a/WebVideoTranscode/WebVideoTranscode.php 
b/WebVideoTranscode/WebVideoTranscode.php
index 97b8d73..8717b5d 100644
--- a/WebVideoTranscode/WebVideoTranscode.php
+++ b/WebVideoTranscode/WebVideoTranscode.php
@@ -39,18 +39,21 @@
        const ENC_WEBM_480P = '480p.webm';
        const ENC_WEBM_720P = '720p.webm';
        const ENC_WEBM_1080P = '1080p.webm';
+       const ENC_WEBM_2160P = '2160p.webm';
 
        // WebM VP9/Opus profiles:
        const ENC_VP9_360P = '360p.vp9.webm';
        const ENC_VP9_480P = '480p.vp9.webm';
        const ENC_VP9_720P = '720p.vp9.webm';
        const ENC_VP9_1080P = '1080p.vp9.webm';
+       const ENC_VP9_2160P = '2160p.vp9.webm';
 
        // mp4 profiles:
        const ENC_H264_320P = '320p.mp4';
        const ENC_H264_480P = '480p.mp4';
        const ENC_H264_720P = '720p.mp4';
        const ENC_H264_1080P = '1080p.mp4';
+       const ENC_H264_2160P = '2160p.mp4';
 
        const ENC_OGG_VORBIS = 'ogg';
        const ENC_OGG_OPUS = 'opus';
@@ -208,6 +211,15 @@
                                'videoCodec'                 => 'vp8',
                                'type'                       => 'video/webm; 
codecs="vp8, vorbis"',
                        ),
+               WebVideoTranscode::ENC_WEBM_2160P =>
+                        array(
+                               'maxSize'                    => '4096x2160',
+                               'videoQuality'               => 7,
+                               'audioQuality'               => 3,
+                               'noUpscaling'                => 'true',
+                               'videoCodec'                 => 'vp8',
+                               'type'                       => 'video/webm; 
codecs="vp8, vorbis"',
+                       ),
 
                // WebM VP9 transcode:
                WebVideoTranscode::ENC_VP9_360P =>
@@ -254,6 +266,20 @@
                         array(
                                'maxSize'                    => '1920x1080',
                                'videoBitrate'               => '2048',
+                               'samplerate'                 => '48000',
+                               'noUpscaling'                => 'true',
+                               'twopass'                    => 'true',
+                               'keyframeInterval'           => '128',
+                               'bufDelay'                   => '256',
+                               'videoCodec'                 => 'vp9',
+                               'audioCodec'                 => 'opus',
+                               'tileColumns'                => '4',
+                               'type'                       => 'video/webm; 
codecs="vp9, opus"',
+                       ),
+               WebVideoTranscode::ENC_VP9_2160P =>
+                        array(
+                               'maxSize'                    => '4096x2160',
+                               'videoBitrate'               => '8192',
                                'samplerate'                 => '48000',
                                'noUpscaling'                => 'true',
                                'twopass'                    => 'true',
@@ -316,6 +342,16 @@
                                'audioBitrate' => '128k',
                                'type' => 'video/mp4; codecs="avc1.42E01E, 
mp4a.40.2"',
                        ),
+               WebVideoTranscode::ENC_H264_2160P =>
+                       array(
+                               'maxSize' => '4096x2160',
+                               'videoCodec' => 'h264',
+                               'videoBitrate' => '16384k',
+                               'audioCodec' => 'aac',
+                               'channels' => '2',
+                               'audioBitrate' => '128k',
+                               'type' => 'video/mp4; codecs="avc1.42E01E, 
mp4a.40.2"',
+                       ),
 
                //Audio profiles
                WebVideoTranscode::ENC_OGG_VORBIS =>
diff --git a/i18n/en.json b/i18n/en.json
index 80999a8..b17d066 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -83,6 +83,8 @@
        "timedmedia-derivative-desc-720p.webm": "High quality downloadable WebM 
(720P)",
        "timedmedia-derivative-1080p.webm": "WebM 1080P",
        "timedmedia-derivative-desc-1080p.webm": "Full HD downloadable WebM 
(1080P)",
+       "timedmedia-derivative-2160p.webm": "WebM 2160P",
+       "timedmedia-derivative-desc-2160p.webm": "Full 4K downloadable WebM 
(2160P)",
        "timedmedia-derivative-360p.vp9.webm": "VP9 360P",
        "timedmedia-derivative-desc-360p.vp9.webm": "Web streamable WebM VP9 
(360P)",
        "timedmedia-derivative-480p.vp9.webm": "VP9 480P",
@@ -91,6 +93,8 @@
        "timedmedia-derivative-desc-720p.vp9.webm": "HD streamable WebM VP9 
(720P)",
        "timedmedia-derivative-1080p.vp9.webm": "VP9 1080P",
        "timedmedia-derivative-desc-1080p.vp9.webm": "Full HD streamable WebM 
VP9 (1080P)",
+       "timedmedia-derivative-2160p.vp9.webm": "VP9 2160P",
+       "timedmedia-derivative-desc-2160p.vp9.webm": "Full 4K streamable WebM 
VP9 (2160P)",
        "timedmedia-derivative-320p.mp4": "H264 320P",
        "timedmedia-derivative-desc-320p.mp4": "Device-friendly MP4 (320P)",
        "timedmedia-derivative-480p.mp4": "H264 480P",
@@ -99,6 +103,8 @@
        "timedmedia-derivative-desc-720p.mp4": "HD quality MP4 (720P)",
        "timedmedia-derivative-1080p.mp4": "H264 1080P",
        "timedmedia-derivative-desc-1080p.mp4": "Full HD quality MP4 (1080P)",
+       "timedmedia-derivative-2160p.mp4": "H264 2160P",
+       "timedmedia-derivative-desc-2160p.mp4": "Full 4K quality MP4 (2160P)",
        "timedmedia-derivative-ogg": "Ogg Vorbis",
        "timedmedia-derivative-desc-ogg": "Ogg Vorbis",
        "timedmedia-derivative-opus": "Opus",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index fd52d08..26e597b 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -99,6 +99,8 @@
        "timedmedia-derivative-desc-720p.webm": "{{optional}} A type of media 
format encoding",
        "timedmedia-derivative-1080p.webm": "{{optional}}  A type of media 
format encoding",
        "timedmedia-derivative-desc-1080p.webm": "{{optional}} A type of media 
format encoding",
+       "timedmedia-derivative-2160p.webm": "{{optional}}  A type of media 
format encoding",
+       "timedmedia-derivative-desc-2160p.webm": "{{optional}} A type of media 
format encoding",
        "timedmedia-derivative-360p.vp9.webm": "{{optional}}  A type of media 
format encoding",
        "timedmedia-derivative-desc-360p.vp9.webm": "{{optional}} A type of 
media format encoding",
        "timedmedia-derivative-480p.vp9.webm": "{{optional}}  A type of media 
format encoding",
@@ -107,6 +109,8 @@
        "timedmedia-derivative-desc-720p.vp9.webm": "{{optional}} A type of 
media format encoding",
        "timedmedia-derivative-1080p.vp9.webm": "{{optional}}  A type of media 
format encoding",
        "timedmedia-derivative-desc-1080p.vp9.webm": "{{optional}} A type of 
media format encoding",
+       "timedmedia-derivative-2160p.vp9.webm": "{{optional}}  A type of media 
format encoding",
+       "timedmedia-derivative-desc-2160p.vp9.webm": "{{optional}} A type of 
media format encoding",
        "timedmedia-derivative-320p.mp4": "{{optional}}  A type of media format 
encoding",
        "timedmedia-derivative-desc-320p.mp4": "{{optional}} A type of media 
format encoding",
        "timedmedia-derivative-480p.mp4": "{{optional}}  A type of media format 
encoding",
@@ -115,6 +119,8 @@
        "timedmedia-derivative-desc-720p.mp4": "{{optional}} A type of media 
format encoding",
        "timedmedia-derivative-1080p.mp4": "{{optional}}  A type of media 
format encoding",
        "timedmedia-derivative-desc-1080p.mp4": "{{optional}} A type of media 
format encoding",
+       "timedmedia-derivative-2160p.mp4": "{{optional}}  A type of media 
format encoding",
+       "timedmedia-derivative-desc-2160p.mp4": "{{optional}} A type of media 
format encoding",
        "timedmedia-derivative-ogg": "{{optional}} Short form of a media 
format.",
        "timedmedia-derivative-desc-ogg": "{{optional}} Media format.",
        "timedmedia-derivative-opus": "{{optional}} Short form of a media 
format.",

-- 
To view, visit https://gerrit.wikimedia.org/r/210407
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I65c59bc3b93276b9764081d37aa1de8ea96aebf9
Gerrit-PatchSet: 44
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: Paladox <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: Brian Wolff <[email protected]>
Gerrit-Reviewer: Brion VIBBER <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Matanya <[email protected]>
Gerrit-Reviewer: Paladox <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: TheDJ <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to