Hardcode subtitles/captions (.vtt/.ass/.ssa)
Videos start muted.
Having "hard-coded" subtitles - I think is a must nowadays.
Ideally, ziggeo to embed not only dumping text on cue time, but also to respect the cue position/font/color etc - features that the formats mentioned above deal with brilliantly.
Here's an extreme example that I bumped into:
Videojs ASS/SSA subtitles (sunnyli.github.io)
-
Hi George, I think that there are 2 features in what you mentioned.
1st - to have subtitles or captions hard coded into video. The Hard coded would be putting the subtitles into the video itself so regardless of what you do, the subtitles are there.
This is interesting however as per above, there would be no way to turn off the subtitles once they are hardcoded into the video.
2nd - to add support for .vtt .ass and .ssa subtitle formats. The good thing about this is that we actually do support the .vtt subtitles format. This format itself allows you to specify the styles within the subtitles.vtt file as global style and also per each segment of the subtitle (mark).
I am going to confirm with my colleague if there are any points from vtt file that might not work, however since we have native support for the .vtt file it should work just fine as is.
The way you would use the .vtt files with your player would look something like this:
<div id="video_placeholder"></div>
<script>
ziggeoApp.on("ready", function() {
var player = new ZiggeoApi.V2.Player({ element: document.getElementById("video_placeholder"), attrs: { width: 640, height: 480, theme: "modern", themecolor: "red", video: "YOUR_TOKEN",
tracktagsstyled: false,
tracktags: [{
"lang": "en",
"kind": "subtitles",
"label": "English",
"src": "your.web/subtitle-en.vtt"
}] } }); player.activate();
});
</script>* Parameters can be found here: https://ziggeo.com/docs/sdks/javascript/browser-integration/parameters
We set the tracktagsstyled to disable our own styling (turned on by default).
tracktags on the other hand are used for the entire setup. You would set up the language with language label (label) and also with the ISO code (lang) for the language. The label can be anything you want, however the lang has to be 2 letter ISO representation for each language.
Currently the kind is always the same (subtitle) and the most important part is the src. This is where you would add a link to your own vtt file.
As soon as you do, things should work just like in the video you have mentioned :)
Of course, we do not support .ass nor .ssa subtitle file formats.
Hope this helps.
0 -
Hard codes subs are "compulsory" for various social networks (and not only) where own embedded players will not display the subs.
Point being - there are many many situations in which you don't want captions turned off :)
0 -
Good point George, talking with my colleagues on this. I think we already did talk about it being one of the options however that we wanted to add it into the video editor. I might be wrong on this, so I am going to follow up with more details on this :)
In terms of the subtitles, my colleague confirms the same as I mentioned earlier. The .vtt file can have its own styles and have the text placed as you mentioned (anywhere on the video) :)
I do have an update about it and that is that the kind can be "subtitles" or it can be "chapters" so if you wanted to add chapters to your video that is how you could do it.
* Chapters and subtitles are configured in the same way, it is just that the kind parameter is changed.
Hope this helps :)
0
Please sign in to leave a comment.
Comments
3 comments