google / ExoPlayer

This project is deprecated and stale. The latest ExoPlayer code is available in https://github.com/androidx/media
https://developer.android.com/media/media3/exoplayer
Apache License 2.0
21.75k stars 6.03k forks source link

Problem with HLS and Chromecast. #7891

Open luiscurini opened 4 years ago

luiscurini commented 4 years ago

Issue description

Some HLS streams cannot be loaded by chromecast enabled devices. The devices try to load the stream but stop abruptly and doesn't trigger any callbacks to know what is producing the error.

I looked for issues here: https://github.com/google/ExoPlayer https://issuetracker.google.com/issues?q=componentid:190205%2B%20%20

Reproduction steps

Clone https://github.com/google/ExoPlayer Choose demo-cast module In DemoUtils class replace the "Clean HLS: Angel One HLS" stream with the following:

 samples.add(
        new MediaItem.Builder()
            .setUri("https://arte-cmafhls.akamaized.net/am/cmaf/091000/091100/091152-135-A/200909054336/091152-135-A_VOF-STMF_XQ.m3u8")
            .setTitle("Test HLS")
            .setMimeType(MIME_TYPE_HLS)
            .build());

Run demo-cast Add the video "Test HLS" Click on cast button and choose your the chromecast device. Chromecast tries to play content, but fails and remains in the loading screen with the Video Title.

Please note that this also happens with the "Clean HLS: Angel One" in the demo.

A full bug report captured from the device

log2.txt

Version of ExoPlayer being used

Using Exoplayer 2.11.8

[REQUIRED] Device(s) and version(s) of Android being used

Galaxy Tab S6, Android 10 Google Pixel 2XL, Android 11

Receiver ADT-2 Android 9, Chromecast Version 1.47.216070 Google Nest Hub.

marcbaechinger commented 4 years ago

Receiver ADT-2 Android 9, Chromecast Version 1.47.216070

Can you repro this on other devices as well? Like on a recent retail Chromecast or ATV device?

I think the Angel One HLS exceed capabilities of Nest Hub.

luiscurini commented 4 years ago

Yes, we were able to reproduce this with the following devices:

Nvidia Shield, Android 9. Chromecast version 1.47.216070 Philips Android TV (43PUS7304/12). Chromecast version 1.47.216070 Xioami Mi Box S. Can provide version later Nexus Player. Can provide version later

marcbaechinger commented 4 years ago

Yeah, I can confirm none of my Chromecast devices are able to play that stream. That is Nvidia, Chromecast Ultra and a Hub.

The stream does not seem to be very demanding actually so I'm not sure what the actual problem is:

[eventTime=79.35, mediaPos=0.00, window=0, period=0, id=1, mimeType=null, bitrate=2425432, codecs=avc1.4d401f,mp4a.40.2, res=1280x720, fps=25.0]

I can't really help you in more detail I'm afraid as the stream does play well on ExoPlayer and I'm not enough of an expert for what's possible on different cast devices. Probably similar to you I was looking at that page but that would tell me that stream should work.

I think best would be to ask here: https://issuetracker.google.com/issues?q=componentid:190205%2B%20%20 That's the link you posted above.

luiscurini commented 4 years ago

I will post the issue in the tracker and see if they could help with it and keep this updated.

Thanks

AquilesCanta commented 4 years ago

If I remember correctly, angel one is not playable because of an issue in the default receiver. It's possible to play angel one using a third party receiver app (bitmovin). This is something that I have reported to the cast team [Internal ref: b/144421854], but I don't think there are any updates. Please feel free to report directly to the cast team as well.

luiscurini commented 4 years ago

I'm linking the issue here: https://issuetracker.google.com/issues/168413148

I tested the Angel One and our stream with bitmovin and it worked, but it'd be good to know why this is happening and if we could do something to our HLS streams so they work with the default receiver. Right now I can't see any errors that could help me to know this :(

AquilesCanta commented 4 years ago

I'm sorry I can't be of more help to you, I don't have control over the default receiver. Let's hope the cast team looks into this some time soon.

Allan-Nava commented 3 years ago

Same problem with the old chromecast devices!