Repository navigation
Description
Version
Media3 1.11.1
More version details
readEsInfo on main reads the same descriptors.
Devices that reproduce the issue
TCL Smart TV Pro (G10), Android TV 12 (demo app)
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Yes
Reproduction steps
- Play the attached
supplementary-audio.tsin the demo app (noDecoderExtensionsdebug build of 1.11.1). It has two German MP2 tracks: PID 0x101 is mono and normal, PID 0x102 is stereo and marked as audio description by a DVB supplementary audio descriptor (7f 05 06 87 64 65 75). - Look at which track plays, and at the tracks in the EventLogger output.
Expected result
The second track has C.ROLE_FLAG_DESCRIBES_VIDEO and the first track plays. That is what happens with audio-type-control.ts, where the ISO 639 language descriptor marks the same track (audio_type 3):
[X] Track:0, id=1/257, mimeType=audio/mpeg-L2, channels=1, sample_rate=48000, language=de
[ ] Track:0, id=1/258, mimeType=audio/mpeg-L2, channels=2, sample_rate=48000, language=de, roleFlags=[describes-video]
ffprobe shows the second track of both files as (visual impaired) (descriptions).
Actual result
The audio description has no role flags and plays by default:
[ ] Track:0, id=1/257, mimeType=audio/mpeg-L2, channels=1, sample_rate=48000, language=de
[X] Track:0, id=1/258, mimeType=audio/mpeg-L2, channels=2, sample_rate=48000, language=de
TsExtractor.readEsInfo takes audioType only from the ISO 639 language descriptor (0x0A). It handles the extension descriptor (0x7F) for AC-4, DTS-HD and DTS-UHD, but not extension tag 0x06, supplementary_audio_descriptor (ETSI EN 300 468). Its editorial_classification says whether the track is audio description (1), clean audio for the hearing impaired (2) or spoken subtitles (3).
ORF in Austria marks audio description only this way: the track's ISO 639 descriptor is deu with audio_type 0. Its clean audio track has ISO 639 language qks, and the real language, deu, is only in the supplementary descriptor.
Suggestion
In readEsInfo, set audioType from editorial_classification (1 and 3: visual impaired commentary, 2: hearing impaired), and use the descriptor's language when it has one. Tvheadend does this in psi_desc_supplementary_audio (src/input/mpegts/dvb_psi_pmt.c).
As a workaround I wrap DefaultTsPayloadReaderFactory and rebuild EsInfo from its descriptorBytes. That means constructing TsExtractor myself, because DefaultExtractorsFactory does not accept a payload reader factory.
Media
Attached: supplementary-audio.zip with both clips, 10 s of ffmpeg test sources each. For supplementary-audio.ts I added the descriptor to the PMT with a script. The control clip adds -disposition:a:1 visual_impaired instead.
ffmpeg -f lavfi -i testsrc2=size=640x360:rate=25 -f lavfi -i sine=frequency=440:sample_rate=48000 \
-f lavfi -i sine=frequency=880:sample_rate=48000 -t 10 -map 0:v -map 1:a -map 2:a \
-c:v libx264 -preset veryfast -b:v 400k -g 25 -c:a mp2 -b:a 128k -ac:a:1 2 \
-metadata:s:a language=deu -f mpegts plain.tsBug Report
- You will email the zip file produced by
adb bugreportto android-media-github@google.com after filing this issue.
Activity
JooaoGui commentedon Nov 22, 2026
Hi! I'd like to work on this. The plan is to read the supplementary_audio_descriptor (extension tag 0x06) in
TsExtractor.readEsInfo, set the audio type fromeditorial_classification, and use the descriptor's language when it has one. I'll add a test with a sample TS file. Would a PR for this be welcome?