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

Add support for gapless audio playback #497

Closed
th3hamm0r opened this issue May 26, 2015 · 6 comments
Closed

Add support for gapless audio playback #497

th3hamm0r opened this issue May 26, 2015 · 6 comments
Assignees

Comments

@th3hamm0r
Copy link

Hi,
I have to implement a music player which plays media sequentially without gaps. I've implemented a prototype that uses multiple (at least two) ExoPlayer instances, which starts the next ExoPlayer instance for the following audio file only milliseconds before the currently playing instance finishes, just to avoid the gap. But of course this is far from perfect!

Is there a cleaner and more reliable solution for this with ExoPlayer?
I think of MediaPlayer's setNextMediaPlayer() (http://developer.android.com/about/versions/android-4.1.html#Gapless).

I want to use the ExoPlayer even for simple audio playback because of its extensibility (caching, streaming bytes from any source,...) and to avoid hacking around with local proxies just to allow playing from custom byte streams for example.

@andrewlewis
Copy link
Collaborator

We don't currently have support for gapless playback. I'll use this issue as a tracking bug for the enhancement. Thanks!

@andrewlewis andrewlewis changed the title Howto achieve gapless (audio) playback? Add support for gapless audio playback Jan 13, 2016
ojw28 pushed a commit that referenced this issue Jan 22, 2016
Based on AOSP's MP3Extractor.cpp and ID3.cpp.

Issue: #497
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112685664
ojw28 pushed a commit that referenced this issue Feb 11, 2016
@andrewlewis
Copy link
Collaborator

We now extract gapless playback metadata, so the remaining work for this is tracked by #1270 (playlist support).

ojw28 added a commit that referenced this issue Jun 15, 2016
@boywithk9
Copy link

Is ogg now gapless also? You only mentioned mp3/mp4.

@andrewlewis
Copy link
Collaborator

@boywithk9 It looks like the decoding process for Ogg Vorbis trims padding, so it should work already.

@th3hamm0r
Copy link
Author

@boywithk9 @andrewlewis fyi: I'm already using the ExoPlayer for gapless playback of ogg and mp3 files. For mp3 of course, you have to add the correct metadata for gapless playback (something like: ffmpeg -i input.ogg -f wav - | lame -V 2 --noreplaygain - output.mp3)

@boywithk9
Copy link

OGG is not gapless with Mediaplyaer.

@google google locked and limited conversation to collaborators Jun 28, 2017
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

3 participants