Subtitle tracks attribute loss

First, my platform is android and my version of bitmovin is 3.37.1

I try to set subtitle tracks from api data ,like

  this.sourceItem.subtitleTracks = response.subtitles.map {
                            val subtitleTrack =
                                SubtitleTrack(
                                    url = it.subtitleUrl,
                                    label = it.label,
                                    language = it.srcLang
                                )

                            subtitleTrack
                        }

but when I try to get availableSubtitleTracks from player source then attribute in subtitle track was loss

player.source?.availableSubtitleTracks

there is the data difference for subtitle tracks

截圖 2023-07-18 下午2.40.10

any idea for helping me get subtitle same as set

Hi @edward.lee,
thanks for reaching out! The “loss” of the label is a known behaviour. We already track this internally and can update you here once we release a fix.

As a workaround, in the mean time, I would suggest you to try using a SubtitleLabeler, which is part of the LabelingConfig in the SourceConfig. (SourceConfig.labelingConfig.subtitleLabeler)
The SubtitleLabeler allows you to relabel all the subtitles of your Source.

1 Like

Hi @matamegger ,

thanks for your response. I learn label setting can replace with labelingConfig

but except label attribute, I prob need other attributes like isDefault、language … etc

so it seems not provider other attributes settings currently?

In general the provided SubtitleTrack should be considered as a configuration. We try to apply the properties as possible, but there are other factors that might influence the resulting SubtitleTrack.

You are right, there is no further way to change the other properties directly.

I will take your findings to the ticket, so that we can have closer look.
Could you provide me some more information on your setup please. Are there already subtitle included in the base stream (SourceConfig.url) and what type of stream is it.
Ideally, you could share the stream URLs with us here or via support@bitmovin.com

Yeah, we already set subtitle included in the base stream before.

The reason of we need attribute related settings because of our new develop function

which allow user upload subtitle files extra for video-stream support muti-language dynamic.

although I want to provide our stream urls but our service not support global country.

But currently we use other way to resolve problem temporary.

hope those info is useful. thanks u are help.

Thanks! We will come back once we have updates.

Hey @edward.lee ,

The behavior you observed was fixed with 3.52.0

1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.