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

AC3 song files will automatically return to the beginning after seekTo #2041

Open
alan1024 opened this issue Jan 15, 2025 · 2 comments
Open

Comments

@alan1024
Copy link

Is there any way to SeekTo the corresponding location when playing AC3 song files, similar to the following settings

defaultExtractorsFactory.setAdtsExtractorFlags(AdtsExtractor.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING)

@rohitjoins
Copy link
Contributor

rohitjoins commented Jan 15, 2025

ExoPlayer does not natively support seeking in standalone AC3 files because AC3 lacks self-contained metadata, such as indexing or timestamps, to facilitate efficient random access.

However, seeking is supported when AC3 audio is encapsulated in container formats like MP4, MKV, or TS, which provide the necessary metadata for seeking.

For standalone AC3 files, possible workarounds include:

  • Wrap in a container: Use tools like ffmpeg to encapsulate the AC3 file in a format that supports seeking.
  • Custom seeking for CBR (constant bitrate) AC3 files: As suggested in the issue description, this could involve calculating offsets based on frame headers. However, standalone AC3 files are not commonly expected to support seeking, making this a niche use case. I'll mark this as enhancement and low priority.

Please let me know if this request is not for a standalone AC3 file.

Refer to #1862 for an explanation of why returning to the beginning after seekTo is the intended behavior.

@alan1024
Copy link
Author

alan1024 commented Jan 16, 2025

I am using a standalone AC3 files

My request is 《Custom seeking for CBR (constant bitrate) AC3 files》

I hope to optimize this feature as soon as possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants