Transcoding Ringtones with ffmpeg

Recently, my daughter wanted a ringtone for her new favorite song, “Soulmate” by Mac Miller. Here is what I used after poking around with ffmpeg.

ffmpeg -i Mac\ Miller\ \ Soulmate.mp4 -ss 139 -t 30 -vn -acodec aac -b:a 128k soulmate_ringtone_139s_30s.m4r

-i – input file
-ss – start time in seconds, can be other formats, i.e., 2:19
-t – length in seconds, ringtones have to be <= 30 seconds
-vn | -codec:v none | -vcodec none – no video processing
-acodec aac – output audio in aac format, needed for ringtones
-b:a | -b:audio | -audio_bitrate – output bitrate

Tagged with:
Posted in ffmpeg

Leave a comment