Skip to content

Instantly share code, notes, and snippets.

@zlargon
Last active April 15, 2020 00:43
Show Gist options
  • Save zlargon/2a115e918bc17c05f4abb2f07976b4fe to your computer and use it in GitHub Desktop.
Save zlargon/2a115e918bc17c05f4abb2f07976b4fe to your computer and use it in GitHub Desktop.
Speed up mp3 file by FFmpeg on Mac

Speed up mp3 by FFmpeg on Mac

http://ffmpeg.org/

Install FFmpeg

$ brew install ffmpeg

Install latest FFmpeg with libmp3lame

$ git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
$ cd ffmpeg
$ ./configure --enable-libmp3lame
$ make
$ make install
$ ffmpeg -version

ffmpeg version N-83262-gb9f2f93 Copyright (c) 2000-2017 the FFmpeg developers
built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
configuration: --enable-libmp3lame
libavutil      55. 45.100 / 55. 45.100
libavcodec     57. 75.100 / 57. 75.100
libavformat    57. 65.100 / 57. 65.100
libavdevice    57.  2.100 / 57.  2.100
libavfilter     6. 71.100 /  6. 71.100
libswscale      4.  3.101 /  4.  3.101
libswresample   2.  4.100 /  2.  4.100

Use FFmpeg command line to speed up MP3

$ ffmpeg -i input.mp3 -codec:a libmp3lame -filter:a "atempo=1.5" -vn output.mp3

Trouble Shooting

ERROR: libmp3lame >= 3.98.3 not found

http://stackoverflow.com/questions/35937403/error-libmp3lame-3-98-3-not-found

$ tar -zxvf lame-3.99.5.tar.gz 
$ cd lame-3.99.5
$ ./configure
$ make
$ make install

Unknown encoder 'libmp3lame'

http://superuser.com/questions/656313/ffmpeg-says-unknown-encoder-mp3

$ cd ffmpeg
$ ./configure --enable-libmp3lame
$ make
$ make install

yasm/nasm not found or too old. Use --disable-yasm for a crippled build.

$ brew install yasm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment