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

Obtaining video duration is abnormal #8491

Closed
MrLizhiguang opened this issue Jan 22, 2021 · 8 comments
Closed

Obtaining video duration is abnormal #8491

MrLizhiguang opened this issue Jan 22, 2021 · 8 comments
Assignees

Comments

@MrLizhiguang
Copy link

Personal guess is that the decoder reads the video duration (milliseconds) and decimals
Test address:https://ops-aiops.oss-cn-hongkong.aliyuncs.com/vod/311_620_Venom20184K_play.ts

@MrLizhiguang
Copy link
Author

If the length is not available, all return -9223372036854775807

@ojw28
Copy link
Contributor

ojw28 commented Jan 22, 2021

Yes. This is clearly documented in the Javadoc:

Returns the duration of the current content window or ad in milliseconds, or C.TIME_UNSET if the duration is not known.

@ojw28 ojw28 self-assigned this Jan 22, 2021
@MrLizhiguang
Copy link
Author

Yes, I see that this suspicion is caused by this reason. Is there a way to solve this? Mediaplay is normal

@ojw28
Copy link
Contributor

ojw28 commented Jan 22, 2021

#5097 is tracking an improvement that would make ExoPlayer better at inferring the duration of MPEG-TS streams, so this issue is effectively a duplicate of that one.

That aside, if you have any control over the media itself, the best solution is to use a modern container format such as MP4 or MKV, which are better designed to support efficiently determining the duration and performing seek operations.

Closing as a duplicate of #5097.

@ojw28 ojw28 closed this as completed Jan 22, 2021
@ojw28 ojw28 added duplicate and removed question labels Jan 22, 2021
@MrLizhiguang
Copy link
Author

It is difficult to replace the container because the video is 4K, which is not conducive to network transmission

@ojw28
Copy link
Contributor

ojw28 commented Jan 22, 2021

I do not understand what this means. The higher the resolution, the worse MPEG-TS is as a choice of container (and the better MP4/MKV are, relative to MPEG-TS).

@MrLizhiguang
Copy link
Author

Video needs to be sliced

@ojw28
Copy link
Contributor

ojw28 commented Jan 22, 2021

Sorry, I do not understand what that means. MP4 and MKV are well suited to streaming of 4K content.

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

No branches or pull requests

2 participants