Author Topic: gapless playback  (Read 6247 times)

SchotenAndi

  • Newbie
  • *
  • Posts: 5
    • View Profile
gapless playback
« on: January 29, 2010, 21:53:45 »
Hi!

First of all, many thanks for this great program!
It has the potential to become the best music-player in the world ;D

But the most important thing for me is not only the organisation of my music.
Gapless playback is a must have feature of a music-player in my opinion.

I tried the advanced option "gapless playback" with gstreamer and alsa/esd/oss
on a Unbuntu 9.10 system with 1GHz CPU.

Unfortunately the playback is not really gapless. It is much better as without
the option "gapless playback" but there are short gaps between tracks.

Is it possibly a problem with my system or with gstreamer?
Is there a way to implement a kind of queue like mpd (Music Player Daemon).
Gapless playback is working perfectly with mpd for a long time.

Sincerely,

Andi

Quentin Sculo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1082
    • View Profile
Re: gapless playback
« Reply #1 on: January 30, 2010, 03:38:53 »
The gapless option in gmb v1.1.x (which by the way, causes some crashes currently :() use gstreamer's gapless feature from its playbin2. I haven't made many tests, but I couldn't hear a gap with my Pink Floyd's Dark Side of the Moon album.
Anyway, I won't try harder than that, gmb's idea is to leave the actual playing to libraries or external programs.
Though I do want to implement support (don't ask me when) for playing albums saved as a single file with a cue sheet, which should make them absolutely gapless.

If anyone wants to test playbin2's gapless, I've made a quick small script (http://gmusicbrowser.org/files/gstreamer_test_gapless.pl), just run it with 2 files as arguments, it will skip to 5s before the end of the first file. Use ctrl-c to quit.

SchotenAndi

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re:gapless playback
« Reply #2 on: January 30, 2010, 18:25:12 »
Ok, I tried a bit harder and these are the results:

1. Ripping to OGG and FLAC will cause absolutely gapless playback with gmb and your skript!
2. Ripping to MP3 will cause short gaps on my system :(

It seem MP3-files have in general short silence at the beginning and the end.
So other gapless player like foobar2000 and iTunes for example have to "trim" them during playback.
I recognized this, as I tried to concatenate two MP3-files with mp3wrap/audacity.
There is always a small silence between the tracks and I could not avoid this,
as the silence would be inserted again when saving/encoding.
That could be the reason why gapless playback is harder to implement.?.

I don't know, if there is a chance of trimming MP3-tracks before sending them to gstreamer.
Otherwise I will use OGG as default ;)

Kind regards,
  Andi

SchotenAndi

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re:gapless playback
« Reply #3 on: January 30, 2010, 20:49:31 »
# ADDITION

Here I found some interesting informations:

http://en.wikipedia.org/wiki/Gapless_playback#Precise_gapless_playback
http://www.blogcadre.com/node/2892   (see "fixed frame size")

By the way... gmusicbrowser works quite slow on my system. It's a powerpc with 1GHz CPU and 1GB RAM.
Particularly scrolling in songtree-window and navigation in the browser-widget ist delayed.
"top" tells me that the processes Xorg and gmusicbrowser cause high cpu-usage.
I tried many other lightweight window-managers but it's the same issue :-\
I found it strange because gmb is developed on a slow machine. May be it's a powerpc problem?
Do somebody have an idea to improve speedness of gmb (e.g. Xorg preferences)?
Or do I have to buy a new PC? :o

Thanks in advance!

Quentin Sculo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1082
    • View Profile
Re: gapless playback
« Reply #4 on: January 31, 2010, 19:14:14 »
thanks for testing this.
Yes I've heard about this problem with mp3 files, but I'll let gstreamer handle it (or not).

By the way... gmusicbrowser works quite slow on my system. It's a powerpc with 1GHz CPU and 1GB RAM.
Particularly scrolling in songtree-window and navigation in the browser-widget ist delayed.
"top" tells me that the processes Xorg and gmusicbrowser cause high cpu-usage.
The duron800 bit on the homepage is getting a bit old btw, it died a few years ago, but must of what is gmb v1.0 (except the SongTree) was developed on it. I'll change it when I do a stable release of v1.1.x.
I now use a core2duo 1.86 Ghz with ~22,000 songs.
I recently bought a really big screen (1920x1200) :) and it's true that a full-screen SongTree or SongList can be a little slow, but I don't think there is much I can do as only part of it is due to my code.
So you must either use a smaller SongList/SongTree or upgrade your cpu :(

SchotenAndi

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: gapless playback
« Reply #5 on: February 01, 2010, 06:51:22 »
Thanks for your answer Quentin!

Yes I've heard about this problem with mp3 files, but I'll let gstreamer handle it (or not).
Yes I can can understand your decision!
But I found a solution (workaround) for gapless playback on my system 8)
Setting the output to mpg321 over esd will eleminate mp3-gaps.
Now I have to find a solution to use dmix over esd. Otherwise I have to use a hardware-equalizer ;)
By the way...
1) a per-file-equalizer-setting (e.g. saved in file "tags")
2) equalizer-presets
3) the posibility (button) to reset the equalizer
...would be very nice features when using gstreamer with equalizer-support :)

Quote
I recently bought a really big screen (1920x1200)
Hey, me to ;D
I bought a Samsung Syncmaster with the same resolution and it's a fun to
present my music with all the customized layouts on it... but that's the reason
why I don't have any money for a new computer at the moment :-[

and it's true that a full-screen SongTree or SongList can be a little slow,
but I don't think there is much I can do as only part of it is due to my code.
So you must either use a smaller SongList/SongTree or upgrade your cpu :(
I downgradet my system to Ubuntu 9.04 and gmb is much faster now.
Seems to be a problem with the new GNOME-desktop and/or GTK-engine.?
However, SongTree is still very slow and I can't believe that there is no solution.
Even a webpage full of text, graphics and pictures is very fast to scroll with firefox.
But I can live with it, because gmb has so many great features :D

Sincerely,

Andi