Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

WebVTT

From Wikipedia, the free encyclopedia
File format
WebVTT
Filename extension
.vtt
Internet media type
text/vtt
Developed byWorld Wide Web Consortium (W3C)
Initial release10 August 2010; 15 years ago (2010-08-10)[1]
Latest release
4 April 2019; 6 years ago (2019-04-04)
Type of formatTimed text
Extended fromSRT
StandardW3C WebVTT
Open format?Yes
Free format?Yes

WebVTT (Web Video Text Tracks) is aWorld Wide Web Consortium (W3C) standard for displayingtimed text in connection with theHTML5<track> element.

The early drafts of its specification were written by theWHATWG in 2010 after discussions about what caption format should be supported by HTML5—the main options being the relatively mature,XML-basedTimed Text Markup Language (TTML) or an entirely new but more lightweight standard based on the widely usedSubRip format. The final decision was for the new standard, initially called WebSRT (Web Subtitle Resource Tracks).[2] It shared the.srt file extension and was broadly based on the SubRip format, though not fully compatible with it.[3]The prospective format was later renamed WebVTT.[4][5] In the January 13, 2011, version of the HTML5 Draft Report, the<track> element was introduced and the specification was updated to document WebVTT cue text rendering rules.[6] The WebVTT specification is a W3C Candidate Recommendation, and the basic features are supported by all major browsers.

Main differences from SubRip

[edit]
  • WebVTT's first line starts withWEBVTT after the optionalUTF-8byte order mark
  • There is space for optional header data between the first line and the first cue
  • Timecode fractional values are separated by afull stop instead of acomma
  • Timecode hours are optional
  • The frame numbering/identification preceding the timecode is optional
  • Comments identified by the wordNOTE can be added
  • Metadata information can be added in aJSON-style format
  • Chapter information can be optionally specified
  • Only supports extended characters as UTF-8
  • CSS in a separate file defined in the companion HTML document for C tags is used instead of the FONT element
  • Cue settings allow the customization of cue positioning on the video[7]

Compatibility

[edit]
Browser Support[8][9]
BrowserCue Text TagsCue PositioningCSS Styling
Chrome35+
Android stock browser5.0+
Opera22+
Safari7+ (iOS: 8+)
Firefox31+ (Android: 32+)N/a
Microsoft Edge12+N/a
Internet Explorer10+N/a

Firefox implemented WebVTT in its nightly builds (Firefox 24), but initially it was not enabled by default. The feature had to be enabled in Firefox by going to the "about:config" page and setting the value of "media.webvtt.enabled" to true.[10] YouTube began supporting WebVTT in April, 2013.[11] As of July 24, 2014, Mozilla has enabled WebVTT on Firefox by default.[12]

Subtitles in a .vtt file show online, but not when stored on a local drive.

Example of WebVTT format

[edit]

A sample file from the W3C captioningRoger Bingham interviewingNeil deGrasse Tyson ([1]):[13]

WEBVTT00:11.000 --> 00:13.000<v Roger Bingham>We are in New York City00:13.000 --> 00:16.000<v Roger Bingham>We're actually at the Lucern Hotel, just down the street00:16.000 --> 00:18.000<v Roger Bingham>from the American Museum of Natural History00:18.000 --> 00:20.000<v Roger Bingham>And with me is Neil deGrasse Tyson00:20.000 --> 00:22.000<v Roger Bingham>Astrophysicist, Director of the Hayden Planetarium00:22.000 --> 00:24.000<v Roger Bingham>at the AMNH.00:24.000 --> 00:26.000<v Roger Bingham>Thank you for walking down here.00:27.000 --> 00:30.000<v Roger Bingham>And I want to do a follow-up on the last conversation we did.00:30.000 --> 00:31.500 align:right size:50%<v Roger Bingham>When we e-mailed—00:30.500 --> 00:32.500 align:left size:50%<v Neil deGrasse Tyson>Didn't we talk about enough in that conversation?00:32.000 --> 00:35.500 align:right size:50%<v Roger Bingham>No! No no no no; 'cos 'cos obviously 'cos00:32.500 --> 00:33.500 align:left size:50%<v Neil deGrasse Tyson><i>Laughs</i>00:35.500 --> 00:38.000<v Roger Bingham>You know I'm so excited my glasses are falling off here.

Other features

[edit]

In June 2013, an example was added to the specification that included a new "region" setting.[14] This feature is supported since Firefox 59 and Safari 14.1 (14.5 on iOS) but not in any other browser.[15]

References

[edit]
  1. ^"WebSRT". Archived fromthe original on 2010-08-16. Retrieved2015-02-12.
  2. ^"WebVTT versus TTML: XML considered harmful for web captions?". Retrieved16 February 2015.
  3. ^WebSRT, from the WHATWG HTML draft specification, retrieved 2010-10-14
  4. ^Kennedy, Antony; de Leon, Inayaili (2011).Pro CSS for High Traffic Websites.Apress.ISBN 978-1-4302-3288-9.
  5. ^Pfeiffer, Silvia (June 27, 2011)."Recent developments around WebVTT".
  6. ^"HTML5".
  7. ^"WebVTT cue settings". W3C. Archived fromthe original on 6 October 2015. Retrieved11 February 2015.
  8. ^"WebVTT support in browser". W3C. 23 August 2012. Retrieved6 February 2017.
  9. ^"WebVTT Styling". JWPlayer. Archived fromthe original on 20 April 2016. Retrieved6 February 2017.
  10. ^"Implement the track element".
  11. ^"Caption File - YouTube Help".
  12. ^"Firefox 31 Release Notes".
  13. ^"WebVtt: The Web Video Text Tracks Format".w3.org. The World Wide Web Consortium. 4 April 2019. Retrieved23 February 2023.
  14. ^"Added region example to Introduction section under "Other features" – GitHub commit details".GitHub.
  15. ^"VTTCue.region - Web APIs | MDN".MDN Web Docs. 20 July 2025.

External links

[edit]
Products,
standards
Recommendations
Notes
Working drafts
Guidelines
Initiative
Deprecated
Obsoleted
Groups,
organizations
Elected
Working
Community, business
Closed
Software
Browsers
Conferences
Retrieved from "https://en.wikipedia.org/w/index.php?title=WebVTT&oldid=1317785301"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp