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

[FEATURE] Gapless playback not working #96

Open
bbsixzz opened this issue Feb 1, 2022 · 19 comments
Open

[FEATURE] Gapless playback not working #96

bbsixzz opened this issue Feb 1, 2022 · 19 comments
Labels
enhancement New feature or request

Comments

@bbsixzz
Copy link

bbsixzz commented Feb 1, 2022

iPhone SE 2016 running iOS 15.2.1, Amperfy 1.0.8 (4)

Gapless playback isn't working, there is a clear cut between tracks.

I'm guessing this is a bug and not a missing feature.

@BLeeEZ
Copy link
Owner

BLeeEZ commented Feb 1, 2022

This is a missing feature 😀

@BLeeEZ
Copy link
Owner

BLeeEZ commented Feb 12, 2022

I did some reading about gap play playback.
For this feature I need to add a new third party library and the whole player needs a refactoring.
I don't know when I will tackle this feature.

@bbsixzz
Copy link
Author

bbsixzz commented Feb 12, 2022

Alright I understand.

It's definitely an important feature and a dealbreaker for many albums (Pink Floyd).

Do you have any donate option? I'm sure people would chip in for your efforts.

@stefan1983
Copy link

+1

Any update here yet? Thanks!

@BLeeEZ
Copy link
Owner

BLeeEZ commented Mar 26, 2022

No update yet.
This feature will not come before v1.1.1.

@BLeeEZ
Copy link
Owner

BLeeEZ commented May 4, 2022

I did some investigation on this topic. I used this package: https://github.com/dimitris-c/AudioStreaming
The investigation is pushed in this feature branch: https://github.com/BLeeEZ/amperfy/tree/gapless

During my investigation I noticed that there is still a small but noticeable gap. I opened an issue regarding this issue: dimitris-c/AudioStreaming#38

@stefan1983
Copy link

Nice, good luck with that. Hope it can be resolved ;)

@bbsixzz
Copy link
Author

bbsixzz commented May 4, 2022

Very nice, this is the last puzzle piece to reach important feature parity with other apps.

If the above package doesn't work you can check out https://github.com/einsteinx2/iSubMusicStreamer

The gapless playback works flawlessly there so maybe you can use the same framework.

@BLeeEZ
Copy link
Owner

BLeeEZ commented May 5, 2022

@bbsixzz Thank you for the tip. To be honest iSub was the first repository I looked for the gapless implementation. He wrote his own implementation and it is interconnected with other player functionality. For that reason it is not usable for Amperfy.

@BLeeEZ
Copy link
Owner

BLeeEZ commented May 11, 2022

I have talked with the developer of AudioStreaming. He mentioned that while playing mp3 a small gap can still occur/is unavoidable. Other file types shouldn’t be problem. You can read the conversation here: dimitris-c/AudioStreaming#38
What do you think. Should we go this route? Is this a limitation that is bothering us? Notice: I will only use a third party package for this feature. I am not going to implement a gapless player solution by myself (I am open for pull requests). Or is there an alternative I am not aware of?

@bbsixzz
Copy link
Author

bbsixzz commented May 11, 2022

I think not having (true) gapless playback is a serious limitation.

People coming from Apple Music, Spotify etc. will be put off instantly upon discovering the lack of it.

There is just too much music out there that requires it, we need a different solution.

@bbsixzz
Copy link
Author

bbsixzz commented May 11, 2022

dimitris-c:

iSub uses BASS player by unseen https://www.un4seen.com under the hood - so it's quite different than AudioStreaming approach, which uses AudioFileStream from Core Audio to play audio content.

@BLeeEZ BLeeEZ changed the title [BUG] Gapless playback not working [FEATURE] Gapless playback not working May 25, 2022
@dweymouth
Copy link

He mentioned that while playing mp3 a small gap can still occur/is unavoidable. Other file types shouldn’t be problem.

I don't think this is an issue. mp3 is generally not a format compatible with gapless playback since it doesn't provide metadata to ensure the length of the decoded audio is sample-accurate to the original. I think it's worth continuing to evaluate the AudioStreaming package and if it can playback FLAC and Opus gaplessly than it's good to go.

@stefan1983
Copy link

No update yet.
This feature will not come before v1.1.1.

We are at 1.1.3 now, any idea when gapless playback will be finally supported? :)

Thanks

@bbsixzz
Copy link
Author

bbsixzz commented May 9, 2023

Not the right answer but I'm using https://github.com/dweymouth/supersonic now on desktop which has an mpv backend and plays gapless.

@pjadeslandes
Copy link

Hi there @BLeeEZ . Hope you're well. I recently adopted your player - I think it's the best Navidrome client on iOS by a long way - by far my favourite UX, and the fully integrated, one-click library download / offline mode is really important to me. If you could release your gapless playback fix, this would honestly make it the perfect iOS player for me. I don't need mp3 support - I haven't used that format for years, and I'd have thought the average Navidrome / Subsonic user would be interested in superior formats. Any chance you think you might be able to release it? I fully appreciate you do not want to make it yourself, and your 3rd party option seems great to me.

@S-n-d
Copy link

S-n-d commented Jun 25, 2024

Hey @BLeeEZ thanks for your hard work! With the addition of transcoding in the 1.2.1 release this is almost the perfect iOS player for listening to my library on the go! I listen to a lot of mixed DJ compilations, so as you might imagine the lack of gapless support really is a vibe killer 😉 Would it be possible to share your thoughts on this? Maybe let us know why this hasn't been implemented yet or what is blocking it?

@BLeeEZ
Copy link
Owner

BLeeEZ commented Jun 26, 2024

Hi,
I tested in the past different audio engines:

None of them worked perfectly. I encountered in all engines some scenarios where a small gape was noticeable. Some performed in 90% of cases good (without a noticeable gap).

I will only switch the audio engine if it works in 100% of cases. I learned from the past that I will be flooded with bug tickets about these 10% of failing cases.

I will not write my own audio engine, this would go beyond the purpose of this app. I will not implement any additional audio engines because testing all the engines mentioned above already took way too much of my time.

I will test audio engine implementation provided as Pull Request.

@S-n-d
Copy link

S-n-d commented Jun 26, 2024

Hi, thanks for your answer.

I fully understand your opinion on having a 100% working solution and appreciate all of your time and work evaluating different audio engines. It should not be your task to re-invent the wheel. Unfortunately mp3 was not designed with gapless support in mind so I guess that it will always remain a problem. People still using mp3 should be aware that their codec has inherent flaws.

As stated above in this thread, the average Navidrome user is probably not interested in a legacy codec like mp3. AAC and/or OPUS have become a standard now. Keep in mind that the target audience for Amperfy is proobably more tech savvy than your average music listener.

I think it's worth continuing to evaluate the AudioStreaming package. Gapless support really is the one killer feature that is missing to make this the number 1 music-on-the-go iOS app. Just my 2 cents 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants