Skip to content

Instantly share code, notes, and snippets.

@yannickwurm
Created April 5, 2014 07:44
Show Gist options
  • Save yannickwurm/9988636 to your computer and use it in GitHub Desktop.
Save yannickwurm/9988636 to your computer and use it in GitHub Desktop.
Create iPhone ringtones from directory of mp3s
mkdir converted
find . -regex .*mp3 | ruby -pe 'gsub(".mp3", "")' | xargs -I __ ffmpeg -i __.mp3 -ss 0 -t 30 -ac 1 -ab 256000 -f mp4 -acodec libfaac -y __.m4r
#important: limit to 30 seconds otherwise iTunes won't transfer it to iphone.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment