How to use a Close Caption file with my Movie

I load (only mp4) movie file and display it in a preview area.

Now I want to display the close caption file with it, but I dound nothing in the documentation about that.

Just in case it works like VLC, I creted a folder where I copied a .mp4 file and its .srt Close Caption Text file. I loaded that movie file and no Close Caption appears on screen.

Isn’t this built-in Xojo ?

i not see something about in documentation.

but maybe you could use a timer and read the movie Position to display the
text outside with a label?

but then i would simplify the text file that empty text clear/override the sub title.

0.0 Text 
0.5
1.5 Text 
2.5 
3.0 Text

Fortunately, VLC does not do that and use src file(s)…

I don’t think it’s built into Xojo. If you’re on Windows the underlying Windows Media Player component does support SRT but it doesn’t seem to be implemented in Xojo. You may be able to add it as an Active-X control and use it that way.

On MacOS I’m not sure.

In either case, you may be better off using the VLC components in MBS.

Xojo’s MoviePlayer automatically plays closed captions if they’re embedded in the video file, and closed captions are turned on in the system settings.

You’d have to write your own closed caption display if you’re using a separate caption file.

However - Subler lets you embed srt caption files into videos. When you save, it embeds the captions without resaving the entire video file (It’s not recompressing the audio or video). It also lets you add chapter data, if you know how to format it.

Subler

2 Likes

Thank you.

I am starting to understand why I left that idea (like many others) years ago… when I followed that path the first time.

That is VLC:

And here’s where I am:

Work in progress…