After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 649474 - Gapless playback is not gapless for Flac files
Gapless playback is not gapless for Flac files
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
unspecified
Other Linux
: Normal major
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on: 661202 661215
Blocks:
 
 
Reported: 2011-05-05 16:42 UTC by Laurent Moussault
Modified: 2012-02-01 21:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Output of `banshee --debug` (8.66 KB, text/plain)
2011-05-07 11:01 UTC, Laurent Moussault
Details
Output of `banshee --debug --debug-sql` (504.97 KB, text/plain)
2011-05-07 11:03 UTC, Laurent Moussault
Details
Output of `GST_DEBUG=1 banshee --debug` (11.82 KB, text/plain)
2011-05-07 11:06 UTC, Laurent Moussault
Details
Banshee debug log (133 bytes, text/plain)
2011-05-14 17:32 UTC, Nathan Thomas
Details
Banshee gstreamer debug log (133 bytes, text/plain)
2011-05-14 17:32 UTC, Nathan Thomas
Details

Description Laurent Moussault 2011-05-05 16:42:25 UTC
The gapless mode does not work with Flac encoded files: there is gaps between each song in the playback.

Step to reproduce:
- enable gapless mode in preferences
- play two or more Flac files (with no recorded silence at the end)

Actual result: there is a small gap between each songs

Note:
- the files tested play correctly in both Aqualung and Rhythmbox (with gapless mode enabled)
- the same source encoded in Ogg or in MP3 plays correctly in Banshee
- the problem is still there with all extensions disabled
- the problem is there whether the files are played from the PlayQueue, the music library or a playlist
- Banshee --debug does not seem to display any particular hint at the problem (the "gapless track-change message" is correctly displayed between songs)

This is on Ubuntu Natty, with the official package.
Comment 1 David Nielsen 2011-05-06 18:45:33 UTC
Can you please obtain a Debug log showing this behavior.

https://live.gnome.org/Banshee/CommonQuestions/Logs

Separately it might be useful to have a GStreamer debug log.

GST_DEBUG=1 banshee --debug 2>&1 | tee banshee-debug-gst3-log.txt

Gapless is handled by Gstreamer's playbin2 element, reassigning to GStreamer component.
Comment 2 Laurent Moussault 2011-05-07 11:01:40 UTC
Created attachment 187419 [details]
Output of `banshee --debug`
Comment 3 Laurent Moussault 2011-05-07 11:03:02 UTC
Created attachment 187421 [details]
Output of `banshee --debug --debug-sql`
Comment 4 Laurent Moussault 2011-05-07 11:06:49 UTC
Created attachment 187422 [details]
Output of `GST_DEBUG=1 banshee --debug`

I think I'm missing something here, as I don't see more info in this log than in the one without GST_DEBUG.

I've installed all the gstreamer-*-dbg packages, do I need something else to obtain useful output?
Comment 5 Nathan Thomas 2011-05-14 17:31:45 UTC
I am also experiencing this bug on Fedora 15 Beta, gstreamer 0.10.33. The bug occurs in both Banshee and Decibel, which use playbin2 for their gapless playback.

I was really happy when we got proper gapless playback support in gstreamer, would love to get it back without having to re-encode half my music collection!

Please see attached debug logs.
Comment 6 Nathan Thomas 2011-05-14 17:32:22 UTC
Created attachment 187823 [details]
Banshee debug log
Comment 7 Nathan Thomas 2011-05-14 17:32:48 UTC
Created attachment 187824 [details]
Banshee gstreamer debug log
Comment 8 David Nielsen 2011-05-14 21:02:40 UTC
Since the problem occurs in Decibel as well, this sounds like a GStreamer issue.
Comment 9 Laurent Moussault 2011-05-17 10:52:41 UTC
The strange thing is that the same files play correctly in Rhythmbox (no gaps), when gapless mode is enabled (i.e. crossfading activated in the preferences, and set to 0 ms).

So it is possible to have gapless playback of flac files with this release of gstreamer (0.10.32 on Ubuntu Natty), but maybe Rhythmbox uses a workaround.
Comment 10 Sebastian Dröge (slomo) 2011-05-17 10:57:41 UTC
Rhythmbox doesn't use playbin2's gapless feature but implements it manually and less efficient. The gaps are probably caused by incorrect segments or timestamps/durations used by flacdec.
Comment 11 Pothárn Imre 2011-07-14 09:52:07 UTC
I encountered this problem using Clementine. I found, however, that the problem is in plugins-good, at least it is triggered when latest plugins-good is installed. I use OpenSUSE 11.4, gstreamer packages from Packman. I have  plugins-good 0.11.22 (from OpenSUSE 11.3), and with it even FLAC files are gapless. If I, however, install the latest plugins-good 0.11.30, gapless is broken for FLAC files, while OGG, APE, WAVPACK, WAV are gapless using Clementine.
Comment 12 Vincent Penquerc'h 2011-08-17 09:39:12 UTC
Might be fixed by the patches from https://bugzilla.gnome.org/show_bug.cgi?id=650960.
Comment 13 Vincent Penquerc'h 2011-10-08 10:56:17 UTC
The following is assuming the decodebin2 "drained" system is used. From comments above, it's not clear whether none of some of the reports use this method (eg, I've no idea if Clementine uses that drained system.

I just fixed a timestamp bug in flacparse that would cause loops implemented via setting URI when receiving the drained signal to not loop properly with FLAC files. With that patch in, I get nice sounding looped FLAC files. Not quite sure it's gapless as they start end with silence/ramp, but it's definitely needed - at least when using that method. If anyone can attach two FLAC files which make gaps obvious (as in, a recording of a single sound split in two FLAC files), I can look into it more. For now though, it works well enough for me.

Also, the drained signal had been mistakenly removed in july, so you'll need to apply 661202 as well for it to work. This isn't the original issue since it predates the drained bug.

So marking both as dependency. Please test with those two patches, and either supply test files if it still doesn't work for a player which does not do its own thing, and move back to Banshee if it only does not work with it.
Comment 14 johnbrier 2011-10-30 21:38:14 UTC
Hi, I'm on Fedora 15 using rhythmbox-2.90.1-11.git20110502.fc15.x86_64 and I noticed that gapless playback stopped working with FLAC files recently.

I found this bug and tried downgrading gstreamer-plugins-good:

$ sudo yum downgrade gstreamer-plugins-good

  Installing : gstreamer-plugins-good-0.10.27-4.fc15.x86_64                                       1/2 
  Cleanup    : gstreamer-plugins-good-0.10.29-1.fc15.x86_64  

This resolved the problem for me. I can't easily test your patch from 661202 right now but I can share two FLAC files I am testing with.

http://cupcakecarnival.net/sites/default/files/01 - Bedrock , Emerald (Charlie May Unreleased Dub).flac

http://cupcakecarnival.net/sites/default/files/02 - Tom Mangan , Chutney (Tom Mangan 2008 Remix).flac
Comment 15 johnbrier 2011-10-30 21:52:37 UTC
fwiw I opend a bug in Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=750094
Comment 16 Tobias Mueller 2012-02-01 21:53:00 UTC
Closing as OBSOLETE based on comment #13. Please reopen if you can provide the necessary test cases.