Closed sarge closed 1 year ago
As you mentioned this seems to go against what HLS spec defines DEFAULT as.
This attribute is OPTIONAL. Its absence
indicates an implicit value of NO.
Curious if you opened an issue or brought it up on shaka-player or other player forums ?
Even if we had to do this, would probably bring it up with Shaka Packager maintainers if this is the safest backwards compatible way to do this or for users who explicitly want this feature should be made into like an optional stream descriptor tag. ? 🤷🏽
Perhaps what you need is a combination of DEFAULT an AUTOSELECT values https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis#section-4.4.6.1
AUTOSELECT The value is an enumerated-string; valid strings are YES and NO. This attribute is OPTIONAL. Its absence indicates an implicit value of NO. If the value is YES, then the client MAY choose to play this Rendition in the absence of explicit user preference because it matches the current playback environment, such as chosen system language. If the AUTOSELECT attribute is present, its value MUST be YES if the value of the DEFAULT attribute is YES.
System info
Operating System:OSX Shaka Packager Version: v1.6.1
Issue and steps to reproduce the problem
Despite the HLS Specification clearly stating that setting DEFAULT=NO is the default. We notice that when setting a
--default_language
HLS players will still select non default languages - iPhone 16.1I am proposing that we explicitly set the DEFAULT=NO in all cases. This seems to be what other multiple audio examples do.
https://bitmovin.com/demos/multi-audio-tracks https://cdn.bitmovin.com/content/assets/sintel/hls/playlist.m3u8
https://www.radiantmediaplayer.com/docs/latest/gist/multi-audio/ https://5b44cf20b0388.streamlock.net:8443/vod/smil:hls-maudios-prod.smil/playlist.m3u8
Packager Command:
Extra steps to reproduce the problem? (1) (2)
What is the expected result?
EXTM3U
Generated with https://github.com/shaka-project/shaka-packager version 10c6e80226-release
EXT-X-INDEPENDENT-SEGMENTS
EXT-X-MEDIA:TYPE=AUDIO,URI="stream_3.m3u8",GROUP-ID="audio_aac",LANGUAGE="es",NAME="Español",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2"
EXT-X-MEDIA:TYPE=AUDIO,URI="stream_2.m3u8",GROUP-ID="audio_aac",LANGUAGE="en",NAME="English",DEFAULT=YES,AUTOSELECT=YES,CHANNELS="2"
EXT-X-MEDIA:TYPE=AUDIO,URI="stream_1.m3u8",GROUP-ID="audio_ac3",LANGUAGE="en",NAME="English",DEFAULT=YES,AUTOSELECT=YES,CHANNELS="6"
EXT-X-STREAM-INF:BANDWIDTH=376307,AVERAGE-BANDWIDTH=280615,CODECS="avc1.4d4016,mp4a.40.2",RESOLUTION=640x480,FRAME-RATE=8.000,AUDIO="audio_aac",CLOSED-CAPTIONS=NONE
432_main_730_video.m3u8
EXT-X-STREAM-INF:BANDWIDTH=619298,AVERAGE-BANDWIDTH=564627,CODECS="avc1.4d4016,ac-3",RESOLUTION=640x480,FRAME-RATE=8.000,AUDIO="audio_ac3",CLOSED-CAPTIONS=NONE
432_main_730_video.m3u8
EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=59227,AVERAGE-BANDWIDTH=40119,CODECS="avc1.4d4016",RESOLUTION=640x480,CLOSED-CAPTIONS=NONE,URI="432_main_730_video_iframes.m3u8"
The default audio is played on native Apple Controls.
What happens instead?
Non default Audio is played.