This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 26924 - [MSE] Default Track Language
Summary: [MSE] Default Track Language
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: Media Source Extensions (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: CR
Assignee: Aaron Colwell
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-29 09:12 UTC by Cyril Concolato
Modified: 2014-10-06 16:32 UTC (History)
5 users (show)

See Also:


Attachments

Description Cyril Concolato 2014-09-29 09:12:23 UTC
The spec says:
"If audio language equals an empty string then run the default track language algorithm with byteStreamTrackID set to audio byte stream track ID and type set to "audio" and assign the value returned by the algorithm to audio language."

The default track language information is used only if the language in the initialization segment is the empty string however BCP-47 allows the value 'und':

"The 'und' (Undetermined) primary language subtag identifies linguistic content whose language is not determined."

Change the text above to:
"If audio language equals an empty string or the 'und' BCP-47 value, then run the default track language algorithm with byteStreamTrackID set to audio byte stream track ID and type set to "audio" and assign the value returned by the algorithm to audio language."

The same is applicable for video or text tracks.

PS: Don't know what to do with other weird BCP-47 tags: 'mul', 'mis', 'zxx' ...
Comment 1 Aaron Colwell 2014-09-29 15:48:17 UTC
The default information was only intended to be used if no information is found in the init segment. If the init segment contains "und" then I don't believe the default track language algorithm should trigger since the intent is to just reflecting what is in the init segment if something is present. In your case, "und" is present.
Comment 2 Cyril Concolato 2014-09-29 16:09:43 UTC
(In reply to Aaron Colwell from comment #1)
> In your case, "und" is present.
The problem is that "und" is present as a default in many MP4 files, because people forgot or did not know how to tag their files with a proper language. If I make an application that uses this kind of content and I know it's in French but don't have the means to change the file because it's hosted somewhere else, I'll be stuck.
Comment 3 Aaron Colwell 2014-09-29 16:32:49 UTC
(In reply to Cyril Concolato from comment #2)
> (In reply to Aaron Colwell from comment #1)
> > In your case, "und" is present.
> The problem is that "und" is present as a default in many MP4 files, because
> people forgot or did not know how to tag their files with a proper language.
> If I make an application that uses this kind of content and I know it's in
> French but don't have the means to change the file because it's hosted
> somewhere else, I'll be stuck.

My concern is that we have a slippery slope here. We are going from just filling in info that isn't there to overriding info in the init segment. I can understand the desire to "correct" the language information in this case because you don't own the source files, but what if the files actually have completely bogus information in them. You wouldn't be able to correct for that with your proposed solution. 

It seems like we should either reflect what is in the init segment and only fallback to the defaults if nothing is present (like we do now) or allow a default to always override what is in the init segment. Special casing 'und' just doesn't feel right to me.
Comment 4 Silvia Pfeiffer 2014-09-30 03:53:24 UTC
(In reply to Cyril Concolato from comment #2)
> (In reply to Aaron Colwell from comment #1)
> > In your case, "und" is present.
> The problem is that "und" is present as a default in many MP4 files, because
> people forgot or did not know how to tag their files with a proper language.
> If I make an application that uses this kind of content and I know it's in
> French but don't have the means to change the file because it's hosted
> somewhere else, I'll be stuck.

Can't you just overwrite it in JavaScript?
Comment 5 Bob Lund 2014-09-30 16:03:34 UTC
(In reply to Silvia Pfeiffer from comment #4)
> (In reply to Cyril Concolato from comment #2)
> > (In reply to Aaron Colwell from comment #1)
> > > In your case, "und" is present.
> > The problem is that "und" is present as a default in many MP4 files, because
> > people forgot or did not know how to tag their files with a proper language.
> > If I make an application that uses this kind of content and I know it's in
> > French but don't have the means to change the file because it's hosted
> > somewhere else, I'll be stuck.
> 
> Can't you just overwrite it in JavaScript?

@kind, @language and @label are readonly. JS overwriting these attributes after the UA sets them indicates that the MPD and initialization segment data conflict, which is a problem, except in the 'und' case.

It seems better to make a special case that 'und' is the same as not set. Then the TrackDefault.language can provide the value.
Comment 6 Aaron Colwell 2014-10-06 16:32:48 UTC
Change committed.
https://dvcs.w3.org/hg/html-media/rev/f6f98eddb48d

The 'und' value now runs the default language algorithm for audio, video, and text tracks as requested.