Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions media/vp9-codec-string.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
feature_name: New VP9 codec string and Profile 2 support
chrome_version: 60
feature_id: 6230726177456128
check_min_version: true
---

<h3>Background</h3>
<p>
VP9 is an open and royalty-free video codec that has been supported in Chromium
since 2013. An update adds <a href="https://www.webmproject.org/vp9/mp4/">a new
string format</a> for describing the encoding properties, such as the profile,
level, etc. Such properties are common in video codecs but are not exposed in
the current VP9 string format.
<p>
</p>
In addition, this update includes a new format to advertise support for VP9
Profile 2. This profile is needed to enable higher bit-depth video and the new
binding allows higher granularity in the query for specific features of the VP9
bitstream. The string format is accepted by media-related APIs such as
<code>MediaSource.isTypeSupported()</code>, <code>HTMLMediaElement.canPlayType()</code>, and
<code>navigator.requestMediaKeySystemAccess()</code>.
</p>

{% include output_helper.html %}

<script>
log = ChromeSamples.log;
log('Your browser supports:');
</script>

{% include js_snippet.html filename='vp9-codec-string.js' %}

28 changes: 28 additions & 0 deletions media/vp9-codec-string.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
if (MediaSource.isTypeSupported('video/webm; codecs="vp9"')) {
log('> Some VP9 profile');
}

if (MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')) {
log('> VP9, Profile 0, level 1, bit depth 8 (later fields defaulted)');
}

if (MediaSource.isTypeSupported('video/webm; codecs="vp09.01.20.08.01"')) {
log('> VP9, Profile 1, level 2, bit depth 8, ' +
'4:2:0 chroma subsampling colocated with (0,0) luma, ' +
'(later fields defaulted)');
}

if (MediaSource.isTypeSupported('video/webm; codecs="vp09.01.20.08.01.01.01.01.00"')) {
log('> VP9, Profile 1, level 2, bit depth 8, ' +
'4:2:0 chroma subsampling colocated with (0,0) luma, ' +
'REC709 color/transfer/matrix, ' +
'luma/chroma encoded in the "legal" range.');
}

if (MediaSource.isTypeSupported('video/webm; codecs="vp09.02.10.10.01.09.16.09.01"')) {
log('> VP9, Profile 2, level 1, 10-bit YUV content, ' +
'4:2:0 colocated with luma (0,0) chroma subsampling, ' +
'ITU-R BT.2020 primaries, ' +
'ST 2084 EOTF, ITU-R BT.2020 non-constant luminance color matrix, ' +
'full-range chroma/luma encoding.');
}