Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SampleQueueMappingException when loading HLS video #1675

Closed
1 task
JonWatson opened this issue Aug 30, 2024 · 1 comment
Closed
1 task

SampleQueueMappingException when loading HLS video #1675

JonWatson opened this issue Aug 30, 2024 · 1 comment
Assignees
Labels

Comments

@JonWatson
Copy link

JonWatson commented Aug 30, 2024

Version

Media3 main branch

More version details

Issue occurs on all recent versions(1.3.0 and up were tested)

Devices that reproduce the issue

Pixel 7 (14)
Nvidia Shield (11)

Devices that do not reproduce the issue

None

Reproducible in the demo app?

Different error in Demo App

Reproduction steps

In the Demo app, I get an UnrecognizedInputFormatException for this HLS manifest. In my implementation, I get the SampleQueueMappingException. In both apps, other m3u8's play correctly.

I have no doubt there is something that Media3 doesn't like about the manifest. However, AVPlayer(iOS) plays it without error and it's my job to figure out exactly what the problem is with the manifest and how we can get it working on Android/ExoPlayer

Manifest: https://shorturl.at/Yq1kr

Demo app can be reproduced by adding this to the media.exolist.json

"samples": [
  {
    "name": "HLS Test Stream SampleQueueMappingException",
    "uri": "https://shorturl.at/Yq1kr"
  },

Can you please help us figure out what exactly the problem is with this manifest and why ExoPlayer doesn't like it? We have the ability to ask the Video Encoding team to help fix the manifests, if we just knew what the problem is. This is a DRM-protected asset, but I believe the problem can be debugged without the need for DRM keys.

Also please note that the URL that I'm providing is only good for about 72 hours. I will immediately reply to updates here with a new Manifest URL if someone can take a look and the manifest is no longer available.

Expected result

Successful HLS playback

Actual result

My (HlsMediaSource.Factory) implementation:

androidx.media3.exoplayer.hls.SampleQueueMappingException: Unable to bind a sample queue to TrackGroup with MIME type video/avc.

Demo app: UnrecognizedInputFormatException

Media

https://shorturl.at/Yq1kr

Bug Report

@tianyif
Copy link
Contributor

tianyif commented Sep 3, 2024

Hi @JonWatson,

Looking at your manifest, I saw EXT-X-KEY:METHOD=SAMPLE-AES, however this is not currently supported. Please refer to https://developer.android.com/media/media3/exoplayer/supported-formats#hls ("Content protection" section). As a result for that, the DefaultTsPlayloadReaderFactory will not recognize the "streamType" of 0xDB (ITU-T Rec. H.264 and ISO/IEC 14496-10 with AES-128-CBC slice encryption in a packetized stream) nor 0xCF (ITU-T Rec. H.264 and ISO/IEC 14496-10 with AES-128-CBC slice encryption in a packetized stream) and create payload readers for those streams, thus no sample queues can be created.

In terms of the UnrecognizedInputFormatException in demo app, I think it is just due to the usage of the shortened url. We are using DefaultMediaSourceFactory, where the content type was inferred from the uri. The shortened uri doesn't content .m3u8 extension, then it won't be treated as an HLS stream.

Hope the above helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants