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

Duration of song doubled on MacOS #148

Closed
ahshum opened this issue Jul 15, 2022 · 11 comments
Closed

Duration of song doubled on MacOS #148

ahshum opened this issue Jul 15, 2022 · 11 comments
Labels
bug Something isn't working deployed This issue has been fixed/implmented and has been released
Milestone

Comments

@ahshum
Copy link

ahshum commented Jul 15, 2022

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 ahshum added the bug Something isn't working label Jul 15, 2022
@KRTirtho
Copy link
Owner

Looks like a lot of people are having this issue

@cocoonkid
Copy link

Came here to report the same! MacOS

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

@karniv00l
Copy link
Contributor

Same here

@KRTirtho
Copy link
Owner

@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

final audioManifest = trackManifest.audioOnly.where((info) {
final isMp4a = info.codec.mimeType == "audio/mp4";
if (kIsLinux) {
return !isMp4a;
} else if (kIsMacOS || kIsIOS) {
return isMp4a;
} else {
return true;
}
});

@karniv00l
Copy link
Contributor

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?

@KRTirtho
Copy link
Owner

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?

@cocoonkid
Copy link

@KRTirtho @karniv00l .

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

@maxired
Copy link

maxired commented Dec 4, 2022

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

@RaptaG RaptaG closed this as completed Mar 10, 2023
@karniv00l
Copy link
Contributor

This isn't solved @RaptaG

@RaptaG RaptaG reopened this Mar 10, 2023
@KRTirtho
Copy link
Owner

KRTirtho commented May 6, 2023

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

@maxired
Copy link

maxired commented Jun 19, 2023

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

@KRTirtho KRTirtho moved this to Deployed in Spotube Board Aug 26, 2023
@KRTirtho KRTirtho added the deployed This issue has been fixed/implmented and has been released label Aug 26, 2023
@KRTirtho KRTirtho added this to the Version 3.0.0 milestone Aug 26, 2023
@github-project-automation github-project-automation bot moved this from Deployed to Done in Spotube Board Aug 26, 2023
@KRTirtho KRTirtho moved this from Done to Deployed in Spotube Board Aug 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working deployed This issue has been fixed/implmented and has been released
Projects
Status: Deployed
Development

No branches or pull requests

6 participants