spotube icon indicating copy to clipboard operation
spotube copied to clipboard

Duration of song doubled on MacOS

Open ahshum opened this issue 1 year ago • 7 comments

Describe the bug Duration of song doubled in MacOS

To Reproduce Steps to reproduce the behavior:

  1. Open Spotube
  2. Play any song
  3. The duration is doubled
  4. 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: image

While it is playing, it shows 7:07 and is still playing after 3:23 image

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

ahshum avatar Jul 15 '22 09:07 ahshum

Looks like a lot of people are having this issue

KRTirtho avatar Aug 11 '22 03:08 KRTirtho

Came here to report the same! MacOS

In the playlist durations are correct but doubled when playing and remainder is just silent.

cocoonkid avatar Aug 11 '22 12:08 cocoonkid

Same here

karniv00l avatar Aug 12 '22 09:08 karniv00l

@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

KRTirtho avatar Aug 24 '22 13:08 KRTirtho

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?

karniv00l avatar Aug 24 '22 21:08 karniv00l

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 avatar Aug 25 '22 03:08 KRTirtho

@KRTirtho @karniv00l .

Thanks for looking into this. It's really an annoying bug in the core :-)

cocoonkid avatar Sep 18 '22 19:09 cocoonkid

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

maxired avatar Dec 04 '22 19:12 maxired

This isn't solved @RaptaG

karniv00l avatar Mar 10 '23 16:03 karniv00l

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 avatar May 06 '23 04:05 KRTirtho

@KRTirtho I confirm the nightly build has correct song duration on macos Monterey

maxired avatar Jun 19 '23 09:06 maxired