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

Support seeking for FLAC streams without SEEKTABLE. #1808

Closed
nezen opened this issue Sep 8, 2016 · 11 comments
Closed

Support seeking for FLAC streams without SEEKTABLE. #1808

nezen opened this issue Sep 8, 2016 · 11 comments
Assignees
Labels

Comments

@nezen
Copy link

nezen commented Sep 8, 2016

I want to know is flac seekable or not? Each time I seek it from the demo-ext, the progress returns to zero immediately.

here is the sample I tried:

sampleAdapter.add(new Header("FALC"));
    sampleAdapter.add(new Sample("a flac sample",
            "http://www.zaishuxia.com/music/files/pingfanzhilu.flac",
            Util.TYPE_OTHER));

@ojw28
Copy link
Contributor

ojw28 commented Sep 8, 2016

@erdemguven - Please take a look. Thanks!

@erdemguven
Copy link
Contributor

Hi nezen, currently flac files are seekable only if they include a SEEKTABLE metadata block. In this case your flac doesn't have one.
You can check flac files to see if they have a seektable:
metaflac --list sample.flac | grep SEEKTABLE
To add 100 seek points to a file
flac -S 100x sample.flac -o new_sample.flac
Please see flac documentation for other options.

@nezen
Copy link
Author

nezen commented Sep 27, 2016

erdemguven, thanks! I checked the flac with metaflac and there is no SEEKTABLE. But when I try to seek it with MediaPlayer.seekTo() , it worked. So what's going on?

@erdemguven
Copy link
Contributor

MediaPlayer uses libflac for seeking which just do a search in flac file for the correct position if there isn't any seektable. Currently ExoPlayer doesn't do that for flac files.

@burix
Copy link

burix commented Jan 13, 2017

Hi, is such a feature on the roadmap for the exoplayer?

@erdemguven
Copy link
Contributor

@burix, sorry, it isn't.

@PaulWoitaschek
Copy link

And why not? I receive a lot of user complaints about media the user cannot seek.

@ojw28
Copy link
Contributor

ojw28 commented May 4, 2017

As above, seeking in FLAC already works if there's a SEEKTABLE metadata block. We may support seeking (by searching) in other FLAC files at some point, but it's a long way down our list of priorities right now. If you're able to contribute a pull request that adds support, please feel free to do so.

@PaulWoitaschek
Copy link

Okay it sounded as if the feature was not wanted for some reason. I barely understand all this audio stuff but would really welcome if someone tackles this :)

@google google locked and limited conversation to collaborators Jun 28, 2017
@botaydotcom
Copy link
Contributor

This is finished and will be pushed to the dev branch within the next few days.

@botaydotcom botaydotcom changed the title Is flac seekable? Support seeking for FLAC streams without SEEKTABLE. May 16, 2018
@andrewlewis
Copy link
Collaborator

Fixed in 972304f.

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

7 participants