I’m trying to use ffmpeg with rubberband filter as shown here, but fail to set it up. It’s not enough to just install both separately:
$ paru ffmpeg
1 extra/ffmpeg 2:6.0-8 [0B 37.44MiB] [Installed]
$ paru rubberband
1 extra/rubberband 3.2.1-1 [0B 1.26MiB] [Installed]
$ ffmpeg -i 'slow.mp3' -filter:a "rubberband=pitch=0.9438743126816935, rubberband=tempo=4" fast.mp3
ffmpeg version n6.0 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 13.1.1 (GCC) 20230429
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libjxl --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librav1e --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-version3 --enable-vulkan
libavutil 58. 2.100 / 58. 2.100
libavcodec 60. 3.100 / 60. 3.100
libavformat 60. 3.100 / 60. 3.100
libavdevice 60. 1.100 / 60. 1.100
libavfilter 9. 3.100 / 9. 3.100
libswscale 7. 1.100 / 7. 1.100
libswresample 4. 10.100 / 4. 10.100
libpostproc 57. 1.100 / 57. 1.100
Input #0, mp3, from 'slow.mp3':
Metadata:
encoder : Lavf60.3.100
Duration: 00:03:32.30, start: 0.023021, bitrate: 128 kb/s
Stream #0:0: Audio: mp3, 48000 Hz, stereo, fltp, 128 kb/s
Metadata:
encoder : Lavc60.3.
File 'fast.mp3' already exists. Overwrite? [y/N] y
Stream mapping:
Stream #0:0 -> #0:0 (mp3 (mp3float) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
[AVFilterGraph @ 0x55a75ebe29c0] No such filter: 'rubberband'
Error reinitializing filters!
Failed to inject frame into filter network: Filter not found
Error while processing the decoded data for stream #0:0
Unable to uninstall ffmpeg:
$ paru -R ffmpeg
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing ffmpeg breaks dependency 'libavcodec.so=60-64' required by chromaprint
:: removing ffmpeg breaks dependency 'libavformat.so=60-64' required by chromaprint
:: removing ffmpeg breaks dependency 'libavutil.so=58-64' required by chromaprint
:: removing ffmpeg breaks dependency 'libswresample.so=4-64' required by chromaprint
:: removing ffmpeg breaks dependency 'ffmpeg' required by chromium
:: removing ffmpeg breaks dependency 'ffmpeg' required by ffmpegthumbnailer
:: removing ffmpeg breaks dependency 'ffmpeg' required by firefox
:: removing ffmpeg breaks dependency 'ffmpeg' required by gst-libav
:: removing ffmpeg breaks dependency 'ffmpeg' required by qt6-webengine
https://bbs.archlinux.org/viewtopic.php?id=284082
Rubberband is one of the most useful filters to change the pitch and tempo and with substantial quality. FFmpeg does not provide its own native or other means of pitch-shifting than to rely on other tools, such as sox or rubberband (cli tool, not library). If I recall correctly, rubberband support was included in previous versions of FFmpeg, then why remove it?
http://ffmpeg.org/ffmpeg-filters.html#rubberband
Apply time-stretching and pitch-shifting with librubberband.
To enable compilation of this filter, you need to configure FFmpeg with
--enable-librubberband
.