embedded subtitle labelling in mkv

I work in First Nations language learning (I work in Canada). We use subtitles as a learning tool. Being able to embed more than one subtitle track within a single video provides many learning opportunities. Video players like VLC allow one to select which subtitle is displayed.

Using the mkv format its possible to embed subtitle tracks (from the render option “embed subtitle instead of burning in” offered when using mkv). It is possible to place more than one subtitle track.

However the labeling of the subtitle track does not differentiate the tracks. As of version 25.12.2 (on linux) all the subtitle tracks are labeled “kdenlive”, obscuring the choice.

To make choosing an appropriate sub-title track a way of labeling the subtitles consistently is needed. Is there a way of labeling subtitle tracks that will be recognized by video players?

A language checkbox may not work well, as there are at least 70 indigenous languages in spoken in Canada. A fill-able text field may work well for each subtitle track.

There are language alignment tools that can produce subtitle files with appropriate timings that create alignments to sentences and single words

Thank you all

Gord

Many First Nations language use syllablics. Using syllabics depends on unicode

1 Like

Hi!

Your use case is exactly what subtitles are ideal for. I’ve got some work in progress on this which should do exactly what you need here - I’ve been stalled on completing that by a couple of other urgent things I need to get finished first, but I do hope to get back to that again soon…

Right now, the situation for this is pretty ugly. Each subtitle ‘track’ is a discrete ASS file, which is exactly what you need for this, but they are ‘named’ according to the ‘unique ID’ of the sequence they belong to, which isn’t very helpful for this use at all, or for you figuring out which is which quickly and easily, but in the current code that is very deeply entangled in the implementation mechanics and not easy to change.

In my new code, all of that is very different, and you can explicitly name the tracks, and by default they are named so that players will associate them with the rendered video (if you render it using the project name - and if you don’t you can name them in that manner yourself).

So this should improve Soon. But in the meantime, what you want will need a little hand hacking …

If you create your video, and either all of your subtitle tracks (or a single one that then gets translated multiple times separately in a normal text editor) - and render the video without burning the subtitles into it - you can then look at the .ass files that were saved with the project. They contain the subtitles.

So if your rendered video is “foo.mkv”, you can then copy the .ass file and name it “foo.ass”. If you have more than one subtitle file (or translated copies as above), you can name them something like “foo.en.ass”, “foo.fr.ass”, and so on for all of the languages you wish to include.

You can then either provide them all as separate files (if vlc sees the .ass files in the same directory with the same root name as the .mkv it should off them for use) - or you can use a simple script to embed them all in the mkv itself if one file suits your use better.

If you use external ass files, you can render in other formats than mkv, but mkv is the only one that supports embedding them well, even if not all platforms like to play them by default (I’m looking at you apple).

The files are just standard ASS (to the extent that there is any actual standard for that), so it should be possible to edit or create them in other subtitle editing tools too - it’s really only the default name in the current implementation that makes this more awkward than it ought to be for this sort of use.

I was doing this with aegisub before kdenlive gained subtitle support and back when it only supported SRT, but I am keen to have full featured support for this sort of use directly in kdenlive - so if you have any other wishlist things, please don’t hesitate to add them to the thread I started for that here 24.12.0 subtitle editing