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

Question: How to improve HLS seek performance? #5127

Closed
Romantic-LiXuefeng opened this issue Nov 20, 2018 · 4 comments
Closed

Question: How to improve HLS seek performance? #5127

Romantic-LiXuefeng opened this issue Nov 20, 2018 · 4 comments
Assignees
Labels

Comments

@Romantic-LiXuefeng
Copy link

Romantic-LiXuefeng commented Nov 20, 2018

In the same network environment and the same HLS stream, I compared the time-consuming of using the Android MediaPlayer and ExoPlayer to perform the seek operation . The ExoPlayer always takes more time than MediaPlayer。But the ExoPlayer seek exactly than MediaPlayer.
Question:I hope you can explain the difference between the two players in performing the seek operation.
My current solution is as followed: I only feed the key frame into codec.

MediaCodecRenderer. feedInputBuffer()

image

I don't know whether there are other hidden dangers that I did not expect. Hope you give me some advices.

@tonihei tonihei self-assigned this Nov 20, 2018
@tonihei
Copy link
Collaborator

tonihei commented Nov 20, 2018

Have you tried setting the SeekParameters on the Player to SeekParameters.CLOSEST_SYNC or SeekParameters.LAST_SYNC to achieve the same behaviour as in MediaPlayer? The default is SeekParameters.EXACT which may take longer if you not seeking to a key frame.

@ojw28
Copy link
Contributor

ojw28 commented Nov 20, 2018

SeekParameters don't do anything for HLS. Supporting them is tracked by #2882. I'd suggest this is most likely a duplicate of that issue.

@Romantic-LiXuefeng
Copy link
Author

@ojw28 @tonihei Thanks. As @ojw28 said,the SeekParameters don't do anything for HLS. I just to know whether my changes cause problems that I can't think of? Hope you give some advices

@ojw28
Copy link
Contributor

ojw28 commented Nov 23, 2018

Closing as a duplicate of #2882. Regarding the modification to feedInputBuffer, that doesn't look right at all. I suspect it will break things, most likely including causing visual corruption of output buffers in some cases. I also don't think it will make seek performance any faster.

@ojw28 ojw28 closed this as completed Nov 23, 2018
@google google locked and limited conversation to collaborators May 16, 2019
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