GNOME Bugzilla – Bug 602286
playbin3: crossfading support
Last modified: 2018-11-03 11:15:55 UTC
A needed features by a lot of player is to add cross fading support in playbin2. Playbin2 ever support gapless. So this is the only one features missing to have a full features pipeline for audio player. Currently, it can be done by building a dedicaced pipeline with an adder pad to mix stream. But we can not mix 2 plabin2 in an adder. So maybe an easier solution is to allow to link n playbin2 in adder.
Adding this to playbin2 would be something completely different to the current gapless support. Which interface would you like to have for crossfading in playbin2?
I started looking at doing a cross-fading API, so let me just share some notes here. * If you try to do cross-fades on a sink with large buffer-time (which is desirable for music players when you're using pulsesink, to save power), your fades will be delayed by buffer-time, which is really not acceptable. * I don't know how you'd fix this in the general case, but in the long term, our plan is to expose a way to do crossfades in PulseAudio, and proxy that with pulsesink somehow. So whatever API is decided, we could design it so that there is an option to let downstream elements handle the implementation. In this case, potentially we could implement this interface with the volume element and plug it in if the sink doesn't support the interface. * For the OP: if you're in a hurry to get this done and are willing to ignore the buffer-time problem I stated (as Rhythmbox does), you can actually just use multiple playbin2 elements (which would use multiple pulsesinks - so this does introduce a dependency on PulseAudio (or at least on your sink being able to support multiple instances)), and then use a volume element in the resulting pipeline to do the fade.
(In reply to comment #0) > A needed features by a lot of player is to add cross fading support in > playbin2. > Playbin2 ever support gapless. So this is the only one features missing to have > a full features pipeline for audio player. > Currently, it can be done by building a dedicaced pipeline with an adder pad to > mix stream. But we can not mix 2 plabin2 in an adder. So maybe an easier > solution is to allow to link n playbin2 in adder. I'm venturing into a subject I don't really know about, but Clementine does cross fading very well. Banshee doesn't. Don't they both use gstreamer? Whats the difference? IMHO this is a very important basic feature for a music player. Thanks, Boyd
Moving this to playbin3 The current version of playbin3 could rather easily support crossfading providing someone writes a "crossfadebin" element which: * behaves like 'concat' (i.e blocks streams and only let's one through) * does the crossfading over a specified duration on EOS And then we could use it where 'concat' is used is playbin3.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/26.