FFmpeg Cookbook
JA

Ringtone Maker

Cut the part you want from an audio or video file and save it as a ringtone file: M4R for iPhone or MP3 for Android. Everything runs in your browser.

Your file is not uploaded
Drag & drop an audio or video file, or tap to select
MP3 / M4A / WAV / MP4 / MOV and more, up to 200 MB
—
—
iPhone ringtones can be up to 30 seconds long (per Apple). You can set up to 30 seconds for M4R and 60 seconds for MP3. A short fade (up to 0.5 seconds) is added at the start and end so the sound does not begin or stop abruptly.
Making ringtone… 0%
Download ringtone
Setting it on iPhone: a browser cannot put a ringtone on an iPhone directly. The method Apple describes uses the GarageBand app on the iPhone: save the file in the Files app, import it into GarageBand and export it as a ringtone from the Share button, then set it as your standard ringtone or elsewhere (GarageBand shortens anything over 30 seconds). If GarageBand does not import the file, make an MP3 instead. On Android, pick the downloaded MP3 under Ringtone in the Settings app (menu names vary by phone).

Equivalent FFmpeg command

CLI command for your current settings. Updates live as you change controls.

ffmpeg -ss 0 -t 30 -i input.mp3 -vn -af "afade=t=in:st=0:d=0.50,afade=t=out:st=29.50:d=0.50" -c:a aac -b:a 192k output.m4a

How to use

  1. Drop a fileChoose an audio or video file that contains the sound you want.
  2. Set start and lengthEnter where to start and how many seconds to cut. iPhone ringtones can be up to 30 seconds (per Apple).
  3. Choose the outputM4R for iPhone, MP3 for Android.
  4. Make it and downloadPress Make ringtone, play the result, then download the file.

When it goes wrong

The .m4r file will not set as a ringtone on iPhone

Cause: A browser cannot put a ringtone on an iPhone directly.

Fix: The method Apple describes uses the GarageBand app on the iPhone: save the file in the Files app, import it into GarageBand and export it as a ringtone. GarageBand imports AIFF, WAV, AAC and MP3 files, so if the file does not import, make an MP3 instead.

GarageBand says the ringtone is too long

Cause: iPhone ringtones can be up to 30 seconds. For a longer one, GarageBand offers to shorten it automatically or to go back and shorten it yourself (per Apple).

Fix: Make iPhone ringtones 30 seconds or shorter.

The cut starts or ends abruptly

Cause: The cut lands in the middle of a loud passage.

Fix: Move the start time slightly to a quieter spot (a fade of up to 0.5 seconds is added at each end automatically).

Questions

Can this set the ringtone on my iPhone automatically?

No. A browser cannot set an iPhone ringtone. The method Apple describes is to import an audio file into the GarageBand app on the iPhone and export it as a ringtone. After exporting, you can set it as your standard ringtone and more.

What is an M4R file?

AAC audio in an MP4 file with the .m4r extension.

How long can an iPhone ringtone be?

Up to 30 seconds (per Apple's GarageBand guide). M4R files made here are also limited to 30 seconds.

How do I set the ringtone on Android?

Google's help describes playing the MP3 in the Files by Google app and choosing More, then Set as ringtone. You can also copy the MP3 into the Ringtones folder over USB from a computer and pick it in Settings under Sound & vibration, then Ringtone. Menu names vary by phone.

Is my file uploaded?

No. Everything runs in your browser with ffmpeg.wasm, and the file is not sent anywhere.

More detail (settings, limits, FFmpeg commands)

What each setting means

Start (seconds)
Where to start cutting in the source file. 0 starts from the beginning.
Length (seconds)
How many seconds to cut. The default is 30. Longer values are cut to 30 seconds for M4R and 60 seconds for MP3.
Output
M4R is AAC audio (192 kbps) in an MP4 file with the .m4r extension. MP3 is written at 192 kbps.

Browsers and limits

  • A browser cannot put a ringtone on an iPhone. On the iPhone, import the file into GarageBand and export it as a ringtone.
  • Source files up to 200 MB.

The same job with the FFmpeg command line

Cut a 30s M4R for iPhone (from 12s)
ffmpeg -ss 12 -t 30 -i input.mp3 -vn -c:a aac -b:a 192k -f mp4 ringtone.m4r
FFmpeg cannot pick a format from the .m4r extension, so -f mp4 sets it. This tool writes an .m4a file and renames it to .m4r.
Cut a 30s MP3 for Android
ffmpeg -ss 12 -t 30 -i input.mp3 -vn -c:a libmp3lame -b:a 192k ringtone.mp3
Add fade in/out
ffmpeg -ss 12 -t 30 -i input.mp3 -vn -af "afade=t=in:st=0:d=0.5,afade=t=out:st=29.5:d=0.5" -c:a aac -f mp4 ringtone.m4r