MKV with SMPTE 240M OR Fcc primaries/matrix is detected with a BT.601 color space

Aperta
#3,510 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 5 giorni

@rohitjoins ci sta già lavorando.

Dal 5/11/2026.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
40/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
android, java
Ambito
mobile

Direzione di ricerca

The mapping that reports BT.601 for SMPTE 240M and FCC input is linked to libraries/common/src/main/java/androidx/media3/common/ColorInfo.java around lines 204-225, so start there. Reproduce with the two attached sample files and check which colour space ColorInfo.colorSpace reports for each. Done means SMPTE 240M and FCC get their own colour space values, with a test covering each sample. Adding a public constant is an API decision, so confirm the approach with maintainers first.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement needs triage
[REQUIRED] Use case description

I use Player.Listener.onTracksChanged() to detect the colorspace of the video.
To do that, I then use Tracks.Group.getTrackFormat.
Finally, I use the ColorInfo.colorSpace attribute.

With this video ycbcr-matrix-smpte240m-pc.zip, it says the colorspace is BT601 which isn't true. It is SMPTE 240M:

Image

I have the same problem with a video with FCC colorspace: ycbcr-matrix-fcc-pc.zip

I need to know what information to properly mangle the color of my subtitle (i use libass https://github.com/libass/libass/blob/5b44c4d690254a7bd8de2e048fa23820036b671b/libass/ass_types.h#L157-L262).

Proposed solution

I believe the problem is that SMPTE 240M is considered like BT_601 here: https://github.com/androidx/media/blob/8c6678b657ede1e7883fc164ef73ed483c7796c3/libraries/common/src/main/java/androidx/media3/common/ColorInfo.java#L204-L225

"Simply" add a new type for SMPTE 240M and FCC would probably fix my problem.

Alternatives considered

None.

Lingua principale
Java
Stelle
3.1k
Fork
1k
Merge medio
7g 12h
PR unite (30g)
5

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di androidx/media

Tutte le issue di androidx/media

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.