spotube
spotube copied to clipboard
Duration of song doubled on MacOS
Describe the bug Duration of song doubled in MacOS
To Reproduce Steps to reproduce the behavior:
- Open Spotube
- Play any song
- The duration is doubled
- It is not display error. After the correct duration, the song will continue to play silently.
Expected behavior Display correct duration and play next song correctly.
Screenshots
The song is 3:23 long:
While it is playing, it shows 7:07 and is still playing after 3:23
Installation Source/Method
- download from Github release
Desktop (please complete the following information):
- OS: Mac
- Version: v2.3.0
Smartphone (please complete the following information):
Additional context
Looks like a lot of people are having this issue
Came here to report the same! MacOS
In the playlist durations are correct but doubled when playing and remainder is just silent.
Same here
@karniv00l Since you're already familiar with Spotube codebase and happens to have a Mac, can you try using different available YouTube codecs in MacOS and see if this happens in other codecs as well?
You can see the available codecs by adding print(trackManifest.audioOnly.map((info) => info.codec.mimeType));
before following Line-435
https://github.com/KRTirtho/spotube/blob/aba1ba932592923720a36395c057f78820dafecf/lib/provider/Playback.dart#L435-L444
I'm actually not familiar with the codebase at all 😅
Changing codec from audio/mp4
to audio/webm
results in error.
I've also inspected some variables in this class, and it seems like YT and Spotify tracks both reports correct length and correct song (with some exceptions). So I would say it may be some bug in elsewhere, like in the core of the player?
Yeah audio/webm
in Apple devices is not supported 'cause it's Apple
I've also inspected some variables in this class, and it seems like YT and Spotify tracks both reports correct length and correct song (with some exceptions). So I would say it may be some bug in elsewhere, like in the core of the player?
So it could be flutter audioplayers
plugin?
@KRTirtho @karniv00l .
Thanks for looking into this. It's really an annoying bug in the core :-)
Hi, As a macos user, I also experience this bug. after some investigation, this seems to be a rather low level bug. Downloading the audio/mp4 file played by spotube, then trying to open it with QuickTime, the display duration is also wrong. With VLC, the correct duration is visible.
After renaming the file, as suggested by https://apple.stackexchange.com/a/443882 , the correct duration is visible
This isn't solved @RaptaG
So I replaced audioplayers
for macos with just_audio
and it seems like this double duration issue is fixed. You can download the latest nightly to check if it's working for you
@KRTirtho I confirm the nightly build has correct song duration on macos Monterey