clementine-player / Clementine

:tangerine: Clementine Music Player
https://www.clementine-player.org/
GNU General Public License v3.0
3.72k stars 671 forks source link

Silent or stuttering playback after seeking within playing track #7128

Closed adatum closed 1 year ago

adatum commented 2 years ago

Before posting

Please follow the steps below and check the boxes with [x] once you did the step.

System information

Please provide information about your system and the version of Clementine used.

Expected behaviour / actual behaviour

Seeking through a track, whether with the mouse or keyboard shortcuts, sometimes causes the playback to go silent or stutter. Other times it plays as normal. It seems unpredictable, but the problem occurs frequently.

Steps to reproduce the problem (only for bugs)

  1. Play a track
  2. Seek forward or backwards within the track, with mouse or keyboard shortcuts
  3. Repeat step 2 if problem is not observed immediately

Bugzilla report: https://bugzilla.redhat.com/show_bug.cgi?id=2027016

Seeking was tried on different audio files and it is not isolated to a specific file or type. Also, seeking was tried with other media players such as VLC and SMPlayer which do not exhibit the problem to rule out a system-wide audio issue.

oMoMa commented 2 years ago

Same problem using latest build on Archlinux

deswatson commented 2 years ago

This may well not be a clementine bug. This behaviour started with the introduction of wireplumber in Fedora 35. It was briefly mended with a wireplumber update, but the latest update has broken it again. For more details see this.

adatum commented 2 years ago

This may well not be a clementine bug. This behaviour started with the introduction of wireplumber in Fedora 35. It was briefly mended with a wireplumber update, but the latest update has broken it again. For more details see this.

Is there a bug report for this against wireplumber?

deswatson commented 2 years ago

There are some weirdnesses here. My Fedora 35 system has now started behaving again, playing without stuttering after repeated seeking - and I haven't made any updates or indeed rebooted it. Haven't had time to investigate further, but it's on the list, despite the fact that I have little idea for a sensible next step in the investigation...!

pranaypratyush commented 2 years ago

Very weird that when this bug does its thing and I open up the volume control on KDE I can hear the music but its stuttering. When I close it it's back to silent. Maybe there's some debugging clue here that I am not smart enough to dissect.

pranaypratyush commented 2 years ago

Another weird thing is that I moved to pipewire-media-session and restarted the services and clementine and the bug was gone but I restarted things again without changing anything and it's back. Doesn't make any sense at so many levels.

pranaypratyush commented 2 years ago

I fixed this issue by adding /etc/pipewire/media-session.d/alsa-monitor.conf :

rules = [
  {
    matches = [
      {
        device.name = "alsa_card.usb-FiiO_DigiHug_USB_Audio-01"
      }
    ]
    actions = {
      update-props = {
        device.nick = "Fiio"
        audio.format = "S24_3LE"
        audio.rate = 48000
        # Following value should be doubled until audio doesn't cut out or other issues stop occurring
        api.alsa.period-size = 4096
      }
    }
  }
]

Could be device-specific but other players don't face this issue even without this file.
I am using wireplumber btw.

adatum commented 2 years ago

I can confirm this issue with Rhythmbox too, so this is not specific to Clementine.

Is there a bug report for the broader issue?

Keelhauled commented 2 years ago

Looks like this is fixed now by some recent update. Probably this https://gitlab.freedesktop.org/pipewire/pipewire/-/releases/0.3.41

mozai commented 1 year ago

Seeing (or not-hearing) this in version 1.4rc2 on Manjaro Linux, pipewire 0.3.63 . Output device "choose automatically" No problems with VLC, mocp, mpv nor mplayer.

adatum commented 1 year ago

This issue was fixed a long time ago. It was due to a dependency, and not specific to clementine.

ValdikSS commented 1 year ago

Anyone has this bug again, on Fedora 37 (wireplumber 0.4.14, pipewire 0.3.70)? Changing to ALSA backend fixes the issue.

https://github.com/clementine-player/Clementine/assets/3054729/30797bfb-9bd3-44bc-8be8-b5914909a958

adatum commented 1 year ago

@ValdikSS No issues here with Fedora 37, wireplumber 0.4.14, pipewire 0.3.70, and clementine version 1.4.0 release 2.rc1.20220107git0be3143.fc36. I didn't realize I haven't upgraded clementine in so long. Maybe check your clementine version. In any case, the root cause of this issue originally seemed to be due to Gstreamer.

adatum commented 1 year ago

Actually, I have started encountering this issue again (Fedora 37, wireplumber 0.4.14, pipewire 0.3.71, gstreamer1 1.20.5) though less frequently than before. Not sure where the source of the issue is, though last time it wasn't with clementine.

hxorasani commented 1 year ago

I stilll have this prob on 1.4rc2 on ubuntu 23.04, switched to audacious.