-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A default text track in language X is preferred over a forced text track in language Y when audio language Y is selected #9797
Comments
The MPD provided over email uses relative URLs, so I can't use it to play back the content (since I don't know where the content is hosted). Can you please provide a link to a hosted MPD file that will allow me to play back the content so that I can reproduce the issue? |
Sure will share some public stream after reproducing this scenario, and notify here. |
I was able to get multiple English subtitle texts with this stream https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8 |
I've played with the bipbop stream and the
Yes, this is the expectation of ExoPlayer's internal track selection logic (ignoring Aside: I notice in the MPD provided over email you're using the Does that answer your questions? If not, please describe in more detail what you expect to see and what you actually see. |
Yes, I saw that fix for #9727 was made in the dev-v2 branch so I used that branch for testing the .mpd file shared over mail. I was able to see multiple entries in the text selection dialog since that fix worked.
It turns out, when I start the playback without specifically selecting any text track, no subtitle is being displayed but I was expecting that |
From what you've described that sounds unexpected. Please provide media I can use to reproduce this behaviour. |
Sure I will try and get the same stream for reproduction of this Issue and notify here again. And one more question which might help me in understanding this better, how do we make sure that no text track is selected while playing a content so that forced subtitle for that particular audio language takes over? since If I select |
Using an
In the demo app you should be able to achieve this by starting playback and not interacting with either of the subtitle selection controls. |
The Auto option doesn't render the forced subtitle for me even in the bipbop stream that I shared above. When I select none in the bottom Similarly, I am not able to get any forced subtitle in the MPD stream as well( which did not define any such default text track) when I selected |
I just played around some more, and I think my second bullet was incorrect - I've removed it now. The best way to get 'automatic' behaviour is just to start playback from scratch. The two track selectors in the demo app interact in quite a confusing way. I observe:
I think these are all UI problems resulting from having two different text track selectors in the demo app - with one intended to be a 'real' track selector that you might show to end users, while the other is a deliberately 'advanced' one that shows all available tracks, even if an end-user should never specifically select them. I don't think any of this indicates a problem with the underlying track selection logic (which of course is mostly unrelated to the UI components: https://exoplayer.dev/track-selection.html). |
True once I uninstall the application and then start the .mpd stream again without fiddling with the controls, forced English subtitles to start playing since I started the playback with English audio,
I am trying to get the mpd uri available for testing meanwhile if possible is there any open-source dash sample with forced subtitle with which I can try to simulate this scenario? I tried almost all the uri's in the demo application did not find any with forced subtitle |
I hacked the demo app to 'manually' add some subtitle tracks with various languages and selection flags to a playback using ExoPlayer/demos/main/src/main/java/com/google/android/exoplayer2/demo/PlayerActivity.java Line 255 in 46ab94b
The result is that whatever sample you pick from the first screen of the demo app it will always play the above media. When I play this I observe that the TTML English text track is selected (this is expected, because it's marked FORCED and its language matches the selected audio language of the media). (I couldn't simply add a JSON snippet because we don't have any JSON syntax for the selection flags)
I didn't find a sample in the demo app with multiple audio tracks in different languages and no 'default' subtitle tracks, so I wasn't able to easily test this part - but if the Hindi track is also marked 'forced' then it should be selected when you switch to Hindi audio. |
Yes it should play the Hindi track I think its because of the UI Issues, The forced text track is not getting changed Thanks for all the help, will try to fiddle with the |
I added a comment to #9432 about whether the UI should expose that a forced track is selected at all. While looking into this issue I also spotted what I think is a bug in
Current behaviour:
I have a pending change which changes this behaviour to:
I'm going to re-open this issue and use it to track making this change. |
Inspired by my investigation of Issue: #9797 #minor-release PiperOrigin-RevId: 417609076
I'm pretty sure this is expected, because the track has the "default" flag specified. I'd expect this track to be a superset of what's in the forced track of the same language. As a concrete example, suppose you're providing a Star Trek streaming service to a primarily non-English speaking region (without dubbed audio). You might provide two text tracks:
The idea is that you default to (1) because you think most of your users will want the full subtitles. If the user turns it off because they understand english, they then get the forced track so they can still understand the Klingon.
I'm not sure about this. The content has specified a default track. It doesn't seem unreasonable that the user should have to change the text track explicitly if they want something else. So this still feels working as intended to me. |
Yes this reasoning makes sense - the commit I've sent to you for review retains this behaviour (when audioLanguage=X then a default text track in language X is preferred over a forced track in language X) - I changed it after writing the comment above (and added a test case to confirm the behaviour).
Hmmm, maybe you're right. I started writing this example as a counter-argument, but it's not quite as clear cut as I thought at first. I'll post it anyway so the reasoning is clear. To expand your Star Trek analogy slightly, let's assume we're streaming it to a mainly german-speaking region but we do provide alternate language audio tracks. Concretely, the following audio and text tracks are available:
If an english-speaker (who doesn't speak german) is visiting this german-speaking region and they start watching this content, assuming the streaming service is unaware of the user's language preferences, it will default to audio=1,text=1. The user will quickly realise they don't understand the german audio - they will open the audio-track switcher and select the english audio track (2). Under the current logic: The german subtitles will remain visible - the user will open the text-track switcher and select 'none', which should (ignoring #9432 for now) result in the forced english subtitles (track 4) being selected (because they match the audio language). Under my proposal: When the user selects the english audio track the german subtitles will immediately/automatically disappear, because the forced english text track (4) is selected. I suspect which is most 'expected' depends on whether a klingon or human is speaking when the user switches from the german to english audio tracks. If a klingon is speaking and the subtitles don't change language then it will be impossible to tell that the audio language change was successful until a human character speaks. The 'fix' of disabling subtitles may not be obvious in this case! A user might end up selecting track 3 just to understand the klingon (because track 4 is hidden from the text-track selector) - and then be 'stuck' with unwanted english subtitles on the english human dialogue. If a human character is speaking then it's immediately obvious that the audio language has changed but the text track hasn't, so it's more obvious that the 'fix' is to disable the german subtitles. Same content, different viewer [this assumes the content was originally filmed with an english dialogue track] A german-speaking viewer starts watching. They can understand both the audio and text, but they don't like the german dub - they want to listen to the original english audio but with german subtitles. They do the same operation as our english-speaking viewer: open the audio-track selector and select the english audio (2). They probably would be miffed if the german subtitles immediately disappeared (my proposal)! So yeah, on balance I think the existing behaviour is probably less surprising. CC @tonihei because we were discussing this over chat yesterday. |
After further discussion we've agreed that my example star trek content above is slightly 'broken' - because if the content provider is going to mark the german text track (1) as default, then they should also be marking the equivalent english track as default (3) too. And in that case the user experience is less surprising with the existing code: when the user switches to the english audio (2) then the default english text track (3) will be selected too. I'm going to mark this issue back as a 'question' and close it. |
Inspired by my investigation of Issue: google/ExoPlayer#9797 #minor-release PiperOrigin-RevId: 417609076
Issue: #9797 PiperOrigin-RevId: 420707176
Issue: google/ExoPlayer#9797 PiperOrigin-RevId: 420707176
When filing a question:
forced-subtitle
text tracks in exo-player, if no text track is selected then is it expected that theforced-subtitle
track, appropriate for that particular audio track will be selected?None
doesn't select the appropriateforced-subtitle
track but it disables the renderer altogether?I have shared a sample .mpd file in the mail.
cc @vinodkputta @LuGO0
The text was updated successfully, but these errors were encountered: