0

Is it possible to save a WebVTT file (.vtt) from TextEdit? I was able to just change the extension but I'm not sure if it's actually converting it to a .vtt file. I've been trying to look online for a file converter but can't seem to find anything.

The code that I'm using is below:

 <video id="balloons" class="video-js vjs-default-skin" controls preload="none" width="640" height="264" data-setup="{}">
<source src="media/balloon.mp4" type='video/mp4' />
<source src="media/balloons.m4v" type='video/m4v' />
<source src="media/balloons.webmhd.webm" type='video/webm' />
<source src="media/balloons.oggtheora.ogv" type='video/ogg' />
**<track kind="captions" src="media/balloon-captions.vtt" srclang="en" label="English" />**

Jen
  • 156
  • 1
  • 3
  • 17

1 Answers1

2

According to the spec, VVT files are plaintext (UTF-8), so you shouldn't have any trouble saving such a file from TextEdit. However, the file should be served by your web server with a MIME-type of text/vtt. Might be worth checking.

You can validate the content of your file here: http://quuz.org/webvtt/

thefrontender
  • 1,844
  • 14
  • 22
  • Thanks, it's working now. The video player CC default wasn't set, which is why they weren't showing up. – Jen Apr 08 '13 at 02:31
  • What if you're serving from the file system? I created a simple, static HTML page with a video and a track tags. It works on Safari but not on Chrome or Firefox. I get CORS errors and if I add `crossorigin="anonymous"` I get `Received an invalid response [...] Resource interpreted as TextTrack but transferred with MIME type text/plain: "file:///Users/blabla/test.vtt"`. I've run `file --mime-type test.vtt` in the terminal and I got "text/plain". I couldn't find out how to edit this value. Any idea what I could do? Do I really have to configure a server to experiment with HTML5 videos/captions? – Ariel Dec 10 '14 at 13:47