In this step by step tutorial you will learn to:
- Download individual and playlists of movies and audio from movie websites including YouTube, Vimeo, Daily Motion, etc. and convert the files into numerous audio and video formats using youtube-dl.
- Edit audio file clips, adjust volume, and save in different formats, including .m4a needed for iPhone ringtones and songs using Audacity.
- Send audio files to your iPhone using email, save them, import them into GarageBand, and process them into usable ringtones for your iPhone
(and even delete them when you are done with them).
All off this is done with free software and without iTunes, or connecting your iPhone to the computer!
These PC instructions are for Windows, but all the tools, youtube-dl, Audacity, and FFmpeg are also available for Linux and OS X.
Capturing sound file from YouTube
You will need:
- youtube-dl An awesome tool to download and convert videos and playlists from YouTube and other sites.
- Find a video you like on YouTube
- Copy the URL
- Navigate in Explorer (file browser, not internet browser) to the folder you would like to download the sound file to.
- Type cmd into the address bar to launch a command prompt
- Enter youtube-dl –extract-audio –audio-format mp3 -o “%%(title)s-%%(id)s.%%(ext)s” your_url_here
youtube-dl –extract-audio –audio-format mp3 -o “%%(title)s-%%(id)s.%%(ext)s” https://www.youtube.com/watch?v=B7MIJP90biM
* See footnotes for additional options
- You may omit -o “%%(title)s-%%(id)s.%%(ext)s” or replace it with your own filename format string
- If the video is under 30 seconds long and you want to use it without editing, you can save it directly as an .m4a like this:
youtube-dl –extract-audio –audio-format m4a -o “%%(title)s-%%(id)s.%%(ext)s” your_url_here
- You can download entire playlists as audio with numbered tracks as .mp3 files like this:
youtube-dl –extract-audio –audio-format mp3 -o “%%(playlist_index)s – %%(title)s-%%(id)s.%%(ext)s” https://www.youtube.com/playlist?list=PL3KyodHSvyYL2qAyXGli1CCd5IS0ENfBh
- You can download and convert video files from many sites for watching like this:
youtube-dl -o “D. Scott Williamson, Expert.%%(ext)s” https://www.youtube.com/watch?v=B7MIJP90biM
Editing your sound file
You will need:
- Audacity sound editor
- FFmpeg extension for Audacity needed to save .m4a files (Use their download even if you already have FFmpeg)
The sound file must be 30 seconds long or less.
Remember, it will loop; some files benefit from some silence at the end or a long decay.
Audacity is too large a tool to describe in depth here, here are some basic commands that will allow you to select the section of the audio file interesting to you, adjust the volume, and export as an .m4a file.
- Open the file by either dragging it onto Audacity, Selecting Open… ffrom the File menu, or pressing Ctrl-o.
When the file opens you will see a waveform display in the center of the Audacity window.
- Mute | Solo On the left side of your waveform display you will see Mute and Solo buttons. If you open multiple files, they will behave as multiple tracks in the same project.
- Mute will silence the track.
- Solo will mute all other tracks and unmute the current track.
- Selection Click and drag on the audio waveform display to select a subset of the sound file. You can carefully click and adjust the start and end of the selection which is useful to refine your selection.
- Zoom allows you to magnify or shrink the sound file to enable you to work carefully on the section that is important to you
- Zoom in, Zoom out Magnify or shrink the view of your sound
- Zoom Selection will zoom so the selection fills the display. I typically will select a slightly larger section than I want, Zoom Selection to make my selection fill the display, and refine the start and endpoint.
- Fit Project to width will zoom all the way out so that your (longest) sound file will be fit to the window width.
- Scroll When zoomed in, you can use the scroll bar at the bottom of your sound window to pan left and right.
- Play There are a couple ways to play your sound:
- Click the play button to play your selection, or the entire file if none is selected.
- Click anywhere in the timeline above the waveform to play from that position to the right edge of the window, useful for quickly locating key points in your sound file.
- Copy Use this to copy your selection either by clicking the copy button or pressing Ctrl-c. I find it easiest to copy the portion of the sound I like and paste it into a new Audacity project. Not only is it less likely to damage the original file, but I think it is fewer steps too.
- New Create a new sound file by selecting New from the File or pressing Ctrl-n
- Paste Click the paste button or press Ctrl-v to paste your previously copied selection into the new file.
- Volume There are a lot of effects you can apply to an audio clip in Audacity, perhaps the most common is adjusting the volume. Click on Amplitude in the Effects menu, you will see a dialog with the suggested amplification already filled in. The suggested value will make your sound fill the volume range. If you would like more amplitude than suggested, be sure to check Allow clipping. The volume can be reduced too.
- Undo you can undo any mistake with a click or by pressing Ctrl-z
- Export as .m4a by selecting Export from the File menu and selecting Export audio file… or by pressing Ctrl-Shift-e. Navigate to where you’d like to save the file, select save as type “M4A (ACC) Files (FFFmpeg)“, and save your file.
(The first time you do this, Audacity will ask you to locate avformat-55.dll, it will be where you unzipped ffmpeg-win-2.2.2.zip)
Creating a ringtone
You will need:
- GarageBand app on your phone (made by Apple)
- Access to email from your PC and iPhone
- One or more sound files that must be .m4a (or .m4r) format and 30 seconds long or less.
- Install GarageBand on your iPhone from the App Store
- Send your .m4a files to yourself as attachments to an email (be aware of email attachment size limits, you may need to send multiple emails).
- Open email on your phone and open your email
- Long press on each attachment to bring up the action menu
- Select Save To Files
- Save the file to GarageBand / GarageBand File Transfer
- Click GarageBand to expand it
- Click GarageBand File Transfer
- Click Add in the upper right corner
- Launch GarageBand
- Click Create Document
- Click Tracks at the top of the screen
- Swipe left or right until you get to the Audio Recorder and click the screen
- Click the Tracks icon (Third from the left at the top off the screen, looks like a brick wall)
- Click Loops icon (second from right at the top, looks like a loop, next to the wrench)
- Click Audio Files at the top center of the window
- You should now see your file(s) you saved from your email. Click them to hear them, drag one onto the workspace next to the microphone on the left.
- Click Save (Down arrow at upper left of the screen)
- Click My Songs
- Long click on your saved file to bring up menu
- Click Share
- Click Ringtone
- Type name
- Click Export in the upper right corner
Now look for your new ringtone in Settings Notifications or Sounds.
This process can also be used to create songs, just select Song instead of Ringtone.
To Delete a ringtone
- Launch GarageBand
- Long press in shared folder on any track
- Click Share
- Click Ringtone
- Click Your Ringtones
- Click Edit
- Select and delete files as needed
- Back out of menus or close the app
This was fun! I hope you were able to follow these directions to get interesting new free ringtones into your iPhone while discovering powerful open source tools along the way.
D. Scott Williamson
- Mustard etching?
- Glue gun mystery unstuck
- W88 at River Forest Maker-Fest
- Why Workshop 88 Rocks
- Winfield Library Build-A-Flute Workshop
- Prusa i3 MK2S 3D printer kit assembly time lapse videos
- Maker of CamBam supports Workshop 88 makerspace!
- Visit to Solid State Depot, Boulder Colorado
- 3D Printing PLA on a flexible metal build plate