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

Missing duration while using FLAG_ENABLE_INDEX_SEEKING flag on some files #7949

Closed
ghost opened this issue Sep 20, 2020 · 7 comments
Closed
Assignees

Comments

@ghost
Copy link

ghost commented Sep 20, 2020

[REQUIRED] Issue description

For some of my MP3 files when using the new FLAG_ENABLE_INDEX_SEEKING flag I see no duration and seeking is not possible at all (greyed out seekbar). A few of my files are affected while the rest work with the flag without issues.

[REQUIRED] Reproduction steps

Perform the following

DefaultExtractorsFactory extractorsFactory = new DefaultExtractorsFactory();
extractorsFactory.setMp3ExtractorFlags(Mp3Extractor.FLAG_ENABLE_INDEX_SEEKING);

If I skip the second line all files display the duration and allow seek.

[REQUIRED] Link to test content

Here is a link to one of the files with issues:
https://ufile.io/1usbf4c1

[REQUIRED] A full bug report captured from the device

No issues reported on logs.

[REQUIRED] Version of ExoPlayer being used

2.12.0

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

Device: Moto G 1st Gen OS: 5.1 (Lollipop). I do not have other devices.

Edit: Added mirrors to the post below.

@kim-vde
Copy link
Contributor

kim-vde commented Sep 21, 2020

I get an error "ufile.io refused to connect" when trying to open the link you provided. Can you check the link or send the content directly by email to [email protected] using subject "Issue #7949"? Please also update this issue to indicate you’ve done this.

@ghost
Copy link
Author

ghost commented Sep 22, 2020

@kim-vde Thanks for checking my issue out. The link works fine at my end. Though, here are three mirrors:

https://www36.zippyshare.com/v/SjSJHnha/file.html
http://ge.tt/2oRtMM73
http://www.filedropper.com/test_20504

Use either of the links. They are all the same file.

Regards.

@kim-vde
Copy link
Contributor

kim-vde commented Sep 22, 2020

The index seeker (enabled by FLAG_ENABLE_INDEX_SEEKING) updates the duration if it is incorrect or unset once the whole file has been parsed. You can see that, if you play the file and wait until you are close to the end, the duration will have appeared.

Before that, the duration is generally retrieved from the metadata provided in a Xing header, VBRI header or ID3 MLLT frame. As the file you provided does not contain any of these, the MP3 extractor can only compute the duration by parsing the whole file.

Your file contains a TLEN ID3 tag (indicating the duration) though. I'll update the Mp3Extractor so that it retrieves this duration.

@ghost
Copy link
Author

ghost commented Sep 22, 2020

Thanks in advance for the update. Though, I do not get it. Would FLAG_ENABLE_INDEX_SEEKING allow me to provide an exact seek on the user moving the thumb on seekbar or do I have to wait for the file to be fully played before the user is enabled to do so?

@kim-vde
Copy link
Contributor

kim-vde commented Sep 23, 2020

The user will be able to seek before the file is completely parsed.

@ghost
Copy link
Author

ghost commented Sep 23, 2020

The user will be able to seek before the file is completely parsed.

Sorry for iterating but will it be an exact seek or normal seek, in this case (my test file).

@kim-vde
Copy link
Contributor

kim-vde commented Sep 23, 2020

What do you mean by "normal seek"? Seeking will use the index seeker, which means that seeking will be precise. Indeed, the index will store all the samples that are at least 0.1 second apart.

kim-vde added a commit that referenced this issue Sep 25, 2020
Issue: #7949
PiperOrigin-RevId: 333733615
@kim-vde kim-vde closed this as completed Sep 25, 2020
ojw28 pushed a commit that referenced this issue Oct 21, 2020
Issue: #7949
PiperOrigin-RevId: 333733615
@google google locked and limited conversation to collaborators Nov 25, 2020
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

1 participant