Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ffmpeg-full: add rubberband - fix: No such filter: 'rubberband' #59

Open
milahu opened this issue May 30, 2024 · 0 comments
Open

ffmpeg-full: add rubberband - fix: No such filter: 'rubberband' #59

milahu opened this issue May 30, 2024 · 0 comments

Comments

@milahu
Copy link
Owner

milahu commented May 30, 2024

fix

$ ffmpeg -i src.flac -filter:a "rubberband=pitch=0.9438743126816935,rubberband=tempo=1/0.9438743126816935" dst.flac
No such filter: 'rubberband'

needed for How to change pitch and tempo together, reliably with ffmpeg

workaround: use the rubberband executable
note: rubberband requires files, not pipes, because it runs in 2 passes

ffmpeg -i src.flac src.wav
rubberband --time 0.9438743126816935 --frequency 0.9438743126816935 src.wav dst.wav
ffmpeg -i dst.wav dst.flac

alternatives to rubberband

use other ffmpeg filters ...

atempo to change tempo

# change tempo from 25fps to 24000/1001fps
src=src.flac
ffmpeg -i "$src" \
  -af atempo="(24000/1001)/25" \
  dst.flac

asetrate and aresample to change tempo and pitch

# change tempo and pitch from 25fps to 24000/1001fps
src=src.flac
streams=a:0
src_sr=$(ffprobe -loglevel error -select_streams $streams -show_entries stream=sample_rate -of default=nw=1:nk=1 "$src")
dst_sr=48000
ffmpeg -i "$src" \
  -af asetrate="$src_sr*(24000/1001)/25,aresample=resampler=soxr:out_sample_rate=$dst_sr" \
  dst.flac
@milahu milahu changed the title ffmpeg-full: add rubberband ffmpeg-full: add rubberband - fix: No such filter: 'rubberband' May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant