Open guraga opened 7 years ago
Perhaps related, I'd also love to see pitch control without affecting playback speed. I've fiddled with Pulseaudio plugins which are supposed to achieve this, but they were an incredible pain to get working and to change configuration (such as pitch).
But I fear this and your request are probably both out of MPD's scope.
Playback speed similar to youtube: 2x, 1.5x, 0.5x, etc would be amazing.
+1... mpv
has this feature.
This would be great!
+1, please add this feature, grand mpd developers!
+1
+1
Being able to toggle/cycle through speed/pitch settings would be wonderful, as well. Or enabling/disabling them by name.
Beside music, I use other mpd configs/instances for listening to podcasts and audiobooks. This feature would be a big big help for these things.
It is a must have for me. I still use mplayer so that I can do '[' or ']' to change the speed, useful for music. It can change the tempo (without pitch shift) too, useful for audio books.
please add this feature
I strongly desire the feature to be implemented. The playback speed configuration is essential for music players. With the feature, mpd
would be a lightweight but powerful alternative for all kinds of music player applications.
Maybe there is an inexpensive way to have better feature parity with mplayer?
+1 for this feature
I have implemented this feature as a set of configuration options. Specifically I used..:
filter
directive to lean on ffmpeg's libavfilter
...rubberband
filter...librubberband
high-quality time-stretching / pitch shifting library...output
directives that call the filter
directives configured to expose different playback speeds.That is, I now have these five filter directives in my mpd.conf
:
# Filters #####################################################################
filter {
plugin "ffmpeg"
name "speed 125%"
graph "rubberband=tempo=1.25"
}
filter {
plugin "ffmpeg"
name "speed 150%"
graph "rubberband=tempo=1.5"
}
filter {
plugin "ffmpeg"
name "speed 200%"
graph "rubberband=tempo=2"
}
filter {
plugin "ffmpeg"
name "speed 250%"
graph "rubberband=tempo=2.5"
}
filter {
plugin "ffmpeg"
name "speed 300%"
graph "rubberband=tempo=3"
}
###############################################################################
...plus these six output
directives:
audio_output {
type "osx"
name "My OS X Device"
# device "Built-in Output" # optional
# channel_map "-1,-1,0,1" # optional
}
audio_output {
type "osx"
name "My OS X Device (125% speed)"
filters "speed 125%"
}
audio_output {
type "osx"
name "My OS X Device (150% speed)"
filters "speed 150%"
}
audio_output {
type "osx"
name "My OS X Device (200% speed)"
filters "speed 200%"
}
audio_output {
type "osx"
name "My OS X Device (250% speed)"
filters "speed 250%"
}
audio_output {
type "osx"
name "My OS X Device (300% speed)"
filters "speed 300%"
}
It is admittedly a bit clunky to abuse the output selection mechanism like this - by default all the outputs are enabled simultaneously so after each mpd
daemon restart I have to run mpc enable only 1
; toggling between different output speeds stops audio playback and I have to manually resume it; and in one room I use multiple outputs to control a multi-room configuration, and this solution would conflict with that setup - but by jove it works. The playback percentage counter even keeps up correctly.
@gnomon- 's solution does not seem to work for the shout
output plugin, presumably because it just streams and doesn't go through ffmpeg
at all. Any thoughts?
I discovered Liquidsoap recently, which I've read should be able to handle some interesting streaming problems, but I currently cannot build it on ArchLinux. However, it seems that due to the nature of this feature, it would require the shout
output plugin to support it directly.
@gnomon-'s solution worked really well for me, though I switch from the rubberband=tempo=<tempo>
to atempo=1.75
filter, which seems to yield better audio quality for me.
Also audio_output
has a field called enabled
, which can be set whether the audio_output is enabled by default.
+1 🙏🏻
+1
Please, implement playback speed control.