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

Cannot get duration or seek from an SSAI live content #10764

Closed
1 task
247az opened this issue Nov 10, 2022 · 11 comments
Closed
1 task

Cannot get duration or seek from an SSAI live content #10764

247az opened this issue Nov 10, 2022 · 11 comments
Assignees
Labels

Comments

@247az
Copy link

247az commented Nov 10, 2022

ExoPlayer Version

2.17.1

Devices that reproduce the issue

Any devices

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Yes

Reproduction steps

  1. Open the demo app
  2. Open the SSAI content below (HLS format)
    Screenshot_20221109_165515
  3. Cannot get duration of the content, seekbar do not show progress, and you cannot seek on the seekbar.
    Screenshot_20221109_165536

Expected result

It is possible to get the duration of the SSAI content and display it.

Actual result

Cannot get duration of the content, seekbar do not show progress, and you cannot seek on the seekbar.

Media

You can reproduce and see the situation on the Demo app

Bug Report

@tonihei
Copy link
Collaborator

tonihei commented Nov 10, 2022

As the title of the stream indicates, this is a live stream and ExoPlayer's SSAI media source currently removes the duration for live streams. I'm not entirely sure, but this may have been accidental and I can look into adding it back.

@donny9095
Copy link

I have the same problem

@247az
Copy link
Author

247az commented Nov 11, 2022

@tonihei
Thank you, Tonihei.
I hope you can look into it and fix it soon !

microkatz pushed a commit that referenced this issue Nov 16, 2022
We currently skip this calculation entirely, but it can be added by
calculating the window duration using the wrapped window's duration
and the provided AdPlaybackState.

Issue: #10764
PiperOrigin-RevId: 488614767
microkatz pushed a commit to androidx/media that referenced this issue Nov 16, 2022
We currently skip this calculation entirely, but it can be added by
calculating the window duration using the wrapped window's duration
and the provided AdPlaybackState.

Issue: google/ExoPlayer#10764
PiperOrigin-RevId: 488614767
@donny9095
Copy link

@tonihei
Sorry to bother you, but do you have any new information on this issue ? Can you fix and release it to the next version ?

microkatz pushed a commit to androidx/media that referenced this issue Nov 22, 2022
We currently skip this calculation entirely, but it can be added by
calculating the window duration using the wrapped window's duration
and the provided AdPlaybackState.

Issue: google/ExoPlayer#10764
PiperOrigin-RevId: 488614767
(cherry picked from commit 7a7d083)
microkatz pushed a commit that referenced this issue Nov 22, 2022
We currently skip this calculation entirely, but it can be added by
calculating the window duration using the wrapped window's duration
and the provided AdPlaybackState.

Issue: #10764
PiperOrigin-RevId: 488614767
(cherry picked from commit 20151b9)
@247az
Copy link
Author

247az commented Nov 29, 2022

@tonihei
I have rechecked this issue on the latest version. But there seems to be another problem going on.
The version can be seen on the image I attached, duration is showing a negative value.
I'm not sure exactly how to reproduce it, but I think you can reproduce this error by following the steps below:

  1. Open the content HLS Live: Big Buck Bunny (mid) 3 ads [10/10/10s]
  2. After the Ad is finished playing, you seek it back to position 0. (Or seek it to the end position, then seek it to position 0 again).
  3. You can see duration is showing negative value.

You can also see the problem in the video I attached.

Screenshot:
Screenshot_20221129_125435

Video:
https://user-images.githubusercontent.com/114720380/204438689-638f45b5-e6ad-4361-8dbc-e6e049c42309.mp4

Can you please check this problem ? Thank you.

@tonihei
Copy link
Collaborator

tonihei commented Nov 29, 2022

What you circled in the screenshot is the current position, not the duration. The duration is the 01:10 next to it. The position may become negative in a live stream if you seek back or pause and then fall out of the live window. This may mean that future loads may fail, but playback is likely to continue initially with the data that has already been buffered.

@247az
Copy link
Author

247az commented Nov 30, 2022

@tonihei
Thank you for your reply.

What you circled in the screenshot is the current position, not the duration. The duration is the 01:10 next to it.

Oh, sorry, my bad, I mean the current position, not the duration.

The position may become negative in a live stream if you seek back or pause and then fall out of the live window. This may mean that future loads may fail, but playback is likely to continue initially with the data that has already been buffered.

Sorry, but this problem can be fixed ?

@tonihei
Copy link
Collaborator

tonihei commented Nov 30, 2022

Sorry, but this problem can be fixed ?

There is nothing to fix, this is working as intended. If your playback position falls behind the live window, then you play at a negative position relative to the start of the live window.

@tonihei tonihei closed this as completed Nov 30, 2022
@247az
Copy link
Author

247az commented Dec 7, 2022

Hi @tonihei
Sorry for reopening this issue.

But I've tested the fixing on the HLS DAI stream which encrypted by AES-128. But it doesn't seem to work.
I tested on version 2.17.1 again, no problem. But after updating ExoPlayer to version 2.18.0 or above, then playback cannot start. And the request to the license server is also absent.

We use requestHeaders for the request to the license server.

httpDataSourceFactory.setDefaultRequestProperties(requestHeaders)

Note that, there are no problems on 2.17.1 version

On 2.17.1
Has request to the license server: https://qaplg02east.keydelivery.japaneast.media.azure.net/?kid=d54fb5c8-513e-4340-a936-a45f818997de

On 2.18.0 or above
No request to the license server: https://qaplg02east.keydelivery.japaneast.media.azure.net/?kid=d54fb5c8-513e-4340-a936-a45f818997de
--> So the video or audio fragment can not be downloaded.

There aren't any errors thrown from the ExoPlayer side, but if you look at the event log it looks a bit strange. With a period [?].

Event log:

EventLogger: timeline [eventTime=156.27, mediaPos=8778.77, window=0, period=0, periodCount=1, windowCount=1, reason=SOURCE_UPDATE
EventLogger:   period [?]
EventLogger:   window [8932.92, seekable=true, dynamic=true]
EventLogger: ]

I've checked on another HLS stream (not HLS DAI stream), it seems OK. And only happens on SSAI contents.

Can you please check this issue on HLS DAI stream which encrypted by AES-128 ? I think this is a big problem.

#EXTM3U
#EXT-X-VERSION:4
#EXT-X-TARGETDURATION:3
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-DISCONTINUITY-SEQUENCE:0
#EXT-X-I-FRAMES-ONLY

#EXT-X-KEY:METHOD=AES-128,URI="https://qaplg02east.keydelivery.japaneast.media.azure.net/?kid=d54fb5c8-513e-4340-a936-a45f818997de",IV=0X79D4C126D68BB73240DF2B5292ED2EC0
#EXT-X-PROGRAM-DATE-TIME:2022-12-07T05:31:07Z
#EXTINF:2.002000,no-desc
https://qartvnplg-hls02-east.akamaized.net/09bad558-a9ca-44d0-9350-f0655eedd77b/4f9e1815-629d-4797-912d-d08909eb25e6.ism/QualityLevels(200000)/KeyFrames(video=20020000,format=m3u8-aapl,encryption=cbc)
#EXTINF:2.002000,no-desc
https://qartvnplg-hls02-east.akamaized.net/09bad558-a9ca-44d0-9350-f0655eedd77b/4f9e1815-629d-4797-912d-d08909eb25e6.ism/QualityLevels(200000)/KeyFrames(video=40040000,format=m3u8-aapl,encryption=cbc)
#EXTINF:2.002000,no-desc
https://qartvnplg-hls02-east.akamaized.net/09bad558-a9ca-44d0-9350-f0655eedd77b/4f9e1815-629d-4797-912d-d08909eb25e6.ism/QualityLevels(200000)/KeyFrames(video=60060000,format=m3u8-aapl,encryption=cbc)
#EXTINF:2.002000,no-desc
https://qartvnplg-hls02-east.akamaized.net/09bad558-a9ca-44d0-9350-f0655eedd77b/4f9e1815-629d-4797-912d-d08909eb25e6.ism/QualityLevels(200000)/KeyFrames(video=80080000,format=m3u8-aapl,encryption=cbc)
#EXTINF:2.002000,no-desc
....

@tonihei
Copy link
Collaborator

tonihei commented Dec 7, 2022

This is unrelated to the previous issue. Could you open a new one for this? If you do so, please also provide more detailed information about how you set up the player.

@247az
Copy link
Author

247az commented Dec 7, 2022

@tonihei
I've confirmed this again.
From version 2.18.0, this error will occur.
Can you tell me from version 2.18.0, what has changed when playing HLS stream which encrypted by AES-128 ?
Because I have checked in version 2.17.1, there is no problem. So I think this is not a data problem on our side, but something wrong with ExoPlayer.

@google google locked and limited conversation to collaborators Jan 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants