Jump to content

TTML Subtitle support


Luke

Recommended Posts

This has been added. 

 

@@7illusions you should be able to take advantage of this in your windows 8.1 app to further avoid transcoding. Any text-based sub format can be converted to ttml.

 

The next dev build and nuget package will have this. You'll also need to update the device profile with the one from the core. StreamBuilder will handle it for you. StreamInfo has a new GetExternalSubtitles method which you should call for every video.

 

It is a list but for now only contains the selected subtitle stream (if any). We can expand it later to include them all. So basically you call GetExternalSubtitles, and if the list has an entry, take that url and feed it into the player.

 

The subtitle param will then not be a part of the video params, which will help avoid transcoding.

  • Like 2
Link to comment
Share on other sites

7illusions

In the current beta I use the webVTT format which works solid. I've been removing the subtitle index from streambuilder if the sub is streamable and used the webvtt stream instead.

This way I can use ALL subtitles and if the sub is internal it will be passed as a parameter to streambuilder.

 

Is there any pros for switching to this new method instead of my current implementation?

Link to comment
Share on other sites

yea i think you should because who knows what additional features will be added to it.

Link to comment
Share on other sites

actually yes - the reason you should switch is because StreamBuilder knows what input formats can be converted to vtt, and it's probably best for you to not duplicate that locally.

Link to comment
Share on other sites

7illusions

Isn't MediaStream.IsTextSubtitleStream deciding if it can be converted or not?

Link to comment
Share on other sites

SikSlayer

This way I can use ALL subtitles and if the sub is internal it will be passed as a parameter to streambuilder.

 

Even PGS from a Blu Ray?

Edited by SikSlayer
Link to comment
Share on other sites

7illusions

well... if the sub that the user selects isn't streamable I ask the server to burn it in. If the server can do it, then yes. ;)

Link to comment
Share on other sites

Tim Hobbs

@@SikSlayer - I cannot speak for what exactly 7 is doing, but PGS is bitmaps. Assuming that the app is using the html tracks tag, then no, this would not work with PGS.

 

However, burning in the subs may work, but that isn't necessarily any different than what was happening before. The whole benefit is that the tracks tag allows the use of a sub file without any transcoding. Anything triggering transcodes means no real benefit.

Link to comment
Share on other sites

7illusions

I use the vtt format, but if the api says that the sub can't be streamed separatly (Internal subs, maybe even PGS?) I tell the server the burn it in.

 

Just beacuse we can stream external subs doesn't mean that we have to remove the support for burning in internal subs even though it's not as good as external ones.

 

Basically I just provide support for both.. :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...