Skip to content
This repository was archived by the owner on Apr 5, 2025. It is now read-only.
This repository was archived by the owner on Apr 5, 2025. It is now read-only.

The selected audio track should default to the audio track marked as "default" #2151

@rockerest

Description

@rockerest

This request respects the following points:

  • This request is not already on GitHub (I've searched it).
  • I agree to follow Jellyfin's Code of Conduct.

Problem Description

The selected audio track when starting a movie or TV episode is always the first track.

However, the first track may not be the track marked as the default, which results in a confusing experience where the "default" track (shown in the UI) is not the track that plays... by default.

Additionally, this results in significant annoyance when actually watching TV shows (for example), because you can't simply play the next episode. You have to back out to the menu, choose the correct track (the one marked as the default), and then play the episode. Every time!

Proposed Solution

I have taken a small amount of time and snooped around in the source code, and - while I am not versed in BrightScript at all - it seems clear to me that the VideoPlayer is being initialized with an audio_stream_idx that defaults to 1. This is broadly correct, but should be the fallback default. The first choice should be what the user explicitly selects (in my reading of the source, this is already the case), then it should default to the first track marked as default (this is missing), and then it should default to index 1.

My main concern is that I have not been able to find any source code that would easily identify which track is marked as default. As noted, I don't really know BrightScript or the structure of this project, so it's very likely that I missed a place where an Episode/Movie Item is defined, but I am concerned there simply is not a way to easily fetch the correct track like .getDefaultAudioTrackIndex().

As a counterpoint, the UI clearly shows which track is the default, so it must be possible!

Alternatives Considered

I'm not sure there are any alternatives that I'd consider; an audio track marked as default is a very objective signal as to which track should be selected by default.

One possible option is to remux every piece of media in the Jellyfin server so that the tracks are re-organized such that the default track is always also the first track. However, this has major problems:

  1. What - then - is the point of a default track? The Jellyfin client shows which track is the default, it should also be able to select it automatically!
  2. Remuxing hundreds - or thousands - of pieces of media (for a single server!) seems outrageous.
  3. Technically, re-arranging the track orders would be "incorrect" if you care about pure byte-for-byte digital preservation, but I admit that this is also a problem with choosing a track other than the first as the default, so that's not a huge concern.

Additional Information

An example where this is particularly annoying and really can't be solved another way:

In the M*A*S*H box sets, every episode has both the original audio as broadcast (with a laugh track) and the audio the producers/showrunners preferred, without a laugh track.

In digitizing these episodes (250+!), I chose to mark the second track (without the laugh track) as the default. It's closer to the spirit the show creators originally wanted. But now, since the Roku client always selects the first audio track to play, if I ever want to watch these episodes "correctly" (arguably 😉 ) I have to manually select the track that should have been selected by default - every time!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions