Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can HTML5 track element be used for *live* subtitles?

I am planning to build a system to broadcast public events (trials, meetings, conferences).

A key request will be the insertion of live subtitles to the A/V stream.

The subtitles will be "live" since they will be produced by an operator while the event will happen.

I suppose the HTML5 "track" element is not yet implemented by any of the major browsers, but: can I expect to eventually use it for live subtitles? Will I be able to inject the subtitle to the page while the stream is playing?

like image 404
MarcoS Avatar asked Sep 15 '25 14:09

MarcoS


2 Answers

Please Look at the following links. Looking at the link i am having to believe it should be possible as they are using Js to show subtitles

http://www.storiesinflight.com/js_videosub/

http://cuepoint.org/

You may also consider http://mozillapopcorn.org/ which is to show content on timing of the video. So technically u can use this with ajax to show/stream subtitles

like image 61
aWebDeveloper Avatar answered Sep 17 '25 18:09

aWebDeveloper


There are HTML5 video JS libs that support subtitles (eg: VideoJS supports the .srt format, there are several easily Google-able others), however to the best of my knowledge none of them support streaming subtitles.

I think you may have to build your own solution for this. If I were to do it, I'd probably try doing something with Socket.IO's broadcast functionality that can push data out to all connected clients at once, and have your client-side JS listen for new subtitle events and render them on screen as they come in. You can use plain ol' CSS to overlay the text over the HTML5 video.

like image 44
Thomas Graft Avatar answered Sep 17 '25 20:09

Thomas Graft