MediaPlayer, MP4, and subtitles
David DeHaven
david.dehaven at oracle.com
Thu May 10 07:55:21 PDT 2012
> Is there a way to play subtitled files using MediaPlayer?
Subtitles are not supported at this time. It is on the list for 3.0 though.
> I'm loading a local MP4 (x264, AAC) video using the default Media/MediaPlayer/MediaView combo. Works OK.
> When loading the same file with a subtitle track added, the subtitle track is not recognized and the file is not played at all (no exceptions thrown).
It should still play the audio and video tracks, ignoring the subtitles. You should file a bug in JIRA and attach a *small* sample clip that reproduces the problem.
> The way I see it, there should exist a SubtitleTrack class (same way there's an AudioTrack and VideoTrack) that, even if it doesn't render the subtitles on top of the video, should provide a way to access the contents so the user could add it as an overlay programatically.
>
> What would be the best way to approach this problem?
The only way right now would be to manually parse the subtitles, add markers to the Media and use those to trigger rendering the text.
Please file a feature request in JIRA, it will help give the issue priority.
-DrD-
More information about the openjfx-dev
mailing list