jenkins-bot has submitted this change and it was merged.
Change subject: Support low quality videos in webm and mp4
......................................................................
Support low quality videos in webm and mp4
Support 240p videos in vp8. (webm)
Support 160p and 240p in vp9 and mp4 videos.
Enable these by default except from vp9 and mp4 which are disabled by
default.
Change-Id: I413a72be915748e5d78a4eeddbdf4b9020ecf2c2
---
M TimedMediaHandler.php
M WebVideoTranscode/WebVideoTranscode.php
M i18n/en.json
M i18n/qqq.json
4 files changed, 99 insertions(+), 3 deletions(-)
Approvals:
Brion VIBBER: Looks good to me, approved
jenkins-bot: Verified
diff --git a/TimedMediaHandler.php b/TimedMediaHandler.php
index 4364f1d..6281dfd 100644
--- a/TimedMediaHandler.php
+++ b/TimedMediaHandler.php
@@ -133,6 +133,12 @@
// primary free/open video format
// supported by Chrome/Firefox/Opera but not Safari/IE/Edge
+ // Very low-bitrate web streamable WebM video
+ WebVideoTranscode::ENC_WEBM_160P,
+
+ // Low-bitrate web streamable WebM video
+ WebVideoTranscode::ENC_WEBM_240P,
+
// Medium-bitrate web streamable WebM video
WebVideoTranscode::ENC_WEBM_360P,
@@ -174,6 +180,12 @@
// Check patent licensing issues in your country before use!
// Similar to WebM in quality/bitrate
+ // Very low
+ WebVideoTranscode::ENC_H264_160P,
+
+ // Low
+ WebVideoTranscode::ENC_H264_240P,
+
// A least common denominator h.264 stream; first gen iPhone, iPods,
early android etc.
WebVideoTranscode::ENC_H264_320P,
diff --git a/WebVideoTranscode/WebVideoTranscode.php
b/WebVideoTranscode/WebVideoTranscode.php
index 498f367..fa30774 100644
--- a/WebVideoTranscode/WebVideoTranscode.php
+++ b/WebVideoTranscode/WebVideoTranscode.php
@@ -35,6 +35,7 @@
// WebM VP8/Vorbis profiles:
const ENC_WEBM_160P = '160p.webm';
+ const ENC_WEBM_240P = '240p.webm';
const ENC_WEBM_360P = '360p.webm';
const ENC_WEBM_480P = '480p.webm';
const ENC_WEBM_720P = '720p.webm';
@@ -42,6 +43,8 @@
const ENC_WEBM_2160P = '2160p.webm';
// WebM VP9/Opus profiles:
+ const ENC_VP9_160P = '160p.vp9.webm';
+ const ENC_VP9_240P = '240p.vp9.webm';
const ENC_VP9_360P = '360p.vp9.webm';
const ENC_VP9_480P = '480p.vp9.webm';
const ENC_VP9_720P = '720p.vp9.webm';
@@ -49,6 +52,8 @@
const ENC_VP9_2160P = '2160p.vp9.webm';
// mp4 profiles:
+ const ENC_H264_160P = '160p.mp4';
+ const ENC_H264_240P = '240p.mp4';
const ENC_H264_320P = '320p.mp4';
const ENC_H264_480P = '480p.mp4';
const ENC_H264_720P = '720p.mp4';
@@ -164,6 +169,20 @@
WebVideoTranscode::ENC_WEBM_160P =>
array(
'maxSize' => '288x160',
+ 'videoBitrate' => '128',
+ 'audioQuality' => '-1',
+ 'samplerate' => '44100',
+ 'channels' => '2',
+ 'noUpscaling' => 'true',
+ 'twopass' => 'true',
+ 'keyframeInterval' => '128',
+ 'bufDelay' => '256',
+ 'videoCodec' => 'vp8',
+ 'type' => 'video/webm;
codecs="vp8, vorbis"',
+ ),
+ WebVideoTranscode::ENC_WEBM_240P =>
+ array(
+ 'maxSize' => '426x240',
'videoBitrate' => '256',
'audioQuality' => '-1',
'samplerate' => '44100',
@@ -230,6 +249,32 @@
),
// WebM VP9 transcode:
+ WebVideoTranscode::ENC_VP9_160P =>
+ array(
+ 'maxSize' => '288x160',
+ 'videoBitrate' => '80',
+ 'samplerate' => '48000',
+ 'noUpscaling' => 'true',
+ 'twopass' => 'true',
+ 'keyframeInterval' => '128',
+ 'bufDelay' => '256',
+ 'videoCodec' => 'vp9',
+ 'audioCodec' => 'opus',
+ 'type' => 'video/webm;
codecs="vp9, opus"',
+ ),
+ WebVideoTranscode::ENC_VP9_240P =>
+ array(
+ 'maxSize' => '426x240',
+ 'videoBitrate' => '128',
+ 'samplerate' => '48000',
+ 'noUpscaling' => 'true',
+ 'twopass' => 'true',
+ 'keyframeInterval' => '128',
+ 'bufDelay' => '256',
+ 'videoCodec' => 'vp9',
+ 'audioCodec' => 'opus',
+ 'type' => 'video/webm;
codecs="vp9, opus"',
+ ),
WebVideoTranscode::ENC_VP9_360P =>
array(
'maxSize' => '640x360',
@@ -306,6 +351,28 @@
//
https://developer.apple.com/library/ios/#documentation/networkinginternet/conceptual/streamingmediaguide/UsingHTTPLiveStreaming/UsingHTTPLiveStreaming.html#//apple_ref/doc/uid/TP40008332-CH102-DontLinkElementID_24
// @codingStandardsIgnoreEnd
+ WebVideoTranscode::ENC_H264_160P =>
+ array(
+ 'maxSize' => '288x160',
+ 'videoCodec' => 'h264',
+ 'preset' => 'ipod320',
+ 'videoBitrate' => '160k',
+ 'audioCodec' => 'aac',
+ 'channels' => '2',
+ 'audioBitrate' => '40k',
+ 'type' => 'video/mp4; codecs="avc1.42E01E,
mp4a.40.2"',
+ ),
+ WebVideoTranscode::ENC_H264_240P =>
+ array(
+ 'maxSize' => '426x240',
+ 'videoCodec' => 'h264',
+ 'preset' => 'ipod320',
+ 'videoBitrate' => '256k',
+ 'audioCodec' => 'aac',
+ 'channels' => '2',
+ 'audioBitrate' => '40k',
+ 'type' => 'video/mp4; codecs="avc1.42E01E,
mp4a.40.2"',
+ ),
WebVideoTranscode::ENC_H264_320P =>
array(
'maxSize' => '480x320',
@@ -317,7 +384,6 @@
'audioBitrate' => '40k',
'type' => 'video/mp4; codecs="avc1.42E01E,
mp4a.40.2"',
),
-
WebVideoTranscode::ENC_H264_480P =>
array(
'maxSize' => '640x480',
@@ -329,7 +395,6 @@
'audioBitrate' => '64k',
'type' => 'video/mp4; codecs="avc1.42E01E,
mp4a.40.2"',
),
-
WebVideoTranscode::ENC_H264_720P =>
array(
'maxSize' => '1280x720',
@@ -341,7 +406,6 @@
'audioBitrate' => '128k',
'type' => 'video/mp4; codecs="avc1.42E01E,
mp4a.40.2"',
),
-
WebVideoTranscode::ENC_H264_1080P =>
array(
'maxSize' => '1920x1080',
diff --git a/i18n/en.json b/i18n/en.json
index 8916de3..92b28c4 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -79,6 +79,8 @@
"timedmedia-derivative-desc-1080p.ogv": "Full HD downloadable Ogg video
(1080P)",
"timedmedia-derivative-160p.webm": "WebM 160P",
"timedmedia-derivative-desc-160p.webm": "Web streamable WebM (160P)",
+ "timedmedia-derivative-240p.webm": "WebM 240P",
+ "timedmedia-derivative-desc-240p.webm": "Web streamable WebM (240P)",
"timedmedia-derivative-360p.webm": "WebM 360P",
"timedmedia-derivative-desc-360p.webm": "Web streamable WebM (360P)",
"timedmedia-derivative-480p.webm": "WebM 480P",
@@ -89,6 +91,10 @@
"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-160p.vp9.webm": "VP9 160P",
+ "timedmedia-derivative-desc-160p.vp9.webm": "Web streamable WebM VP9
(160P)",
+ "timedmedia-derivative-240p.vp9.webm": "VP9 240P",
+ "timedmedia-derivative-desc-240p.vp9.webm": "Web streamable WebM VP9
(240P)",
"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",
@@ -99,6 +105,10 @@
"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-160p.mp4": "H264 160P",
+ "timedmedia-derivative-desc-160p.mp4": "Device-friendly MP4 (160P)",
+ "timedmedia-derivative-240p.mp4": "H264 240P",
+ "timedmedia-derivative-desc-240p.mp4": "Device-friendly MP4 (240P)",
"timedmedia-derivative-320p.mp4": "H264 320P",
"timedmedia-derivative-desc-320p.mp4": "Device-friendly MP4 (320P)",
"timedmedia-derivative-480p.mp4": "H264 480P",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index f5ac7f0..8d57ac8 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -97,6 +97,8 @@
"timedmedia-derivative-desc-1080p.ogv": "{{optional}} A type of media
format encoding",
"timedmedia-derivative-160p.webm": "{{optional}} A type of media format
encoding",
"timedmedia-derivative-desc-160p.webm": "{{optional}} A type of media
format encoding",
+ "timedmedia-derivative-240p.webm": "{{optional}} A type of media format
encoding",
+ "timedmedia-derivative-desc-240p.webm": "{{optional}} A type of media
format encoding",
"timedmedia-derivative-360p.webm": "{{optional}} A type of media format
encoding",
"timedmedia-derivative-desc-360p.webm": "{{optional}} A type of media
format encoding",
"timedmedia-derivative-480p.webm": "{{optional}} A type of media format
encoding",
@@ -107,6 +109,10 @@
"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-160p.vp9.webm": "{{optional}} A type of media
format encoding",
+ "timedmedia-derivative-desc-160p.vp9.webm": "{{optional}} A type of
media format encoding",
+ "timedmedia-derivative-240p.vp9.webm": "{{optional}} A type of media
format encoding",
+ "timedmedia-derivative-desc-240p.vp9.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",
@@ -117,6 +123,10 @@
"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-160p.mp4": "{{optional}} A type of media format
encoding",
+ "timedmedia-derivative-desc-160p.mp4": "{{optional}} A type of media
format encoding",
+ "timedmedia-derivative-240p.mp4": "{{optional}} A type of media format
encoding",
+ "timedmedia-derivative-desc-240p.mp4": "{{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",
--
To view, visit https://gerrit.wikimedia.org/r/234912
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I413a72be915748e5d78a4eeddbdf4b9020ecf2c2
Gerrit-PatchSet: 18
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: Paladox <[email protected]>
Gerrit-Reviewer: Brion VIBBER <[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