How to record sound from YouTube videos
To download or capture the audio of a YouTube video, you have a few options. You can use a third-party online service to download the audio and convert it to mp3, or capture the audio with software on your Windows or Mac computer.
The steps below are for saving the audio portion of a video only. To download video, see: How to download or save a YouTube video to my computer.
Use an online service
Below are steps on how to record sound in a YouTube video using an online YouTube to MP3 conversion service.
We have found the steps below to work best using the Chrome or Firefox browser. If you are using Microsoft Edge or Internet Explorer and have trouble downloading the MP3 file, try Chrome or Firefox instead.
- Go to the YouTube video page and copy the URL (uniform resource locator) of the video you want to save as an MP3 audio file.
- Once the URL is copied, access the YouTubetoMP3 Converter site.
The YouTubetoMP3 Converter service is free to use. The site may display ads to pay for their service, but you are not required to pay any money to use it.
- Paste the copied YouTube video URL into the text box near the top of the page.
- Click the red Go button next to the text box.
- A preview of the YouTube video is displayed. To the right of the preview, click the drop-down menu and select the MP3 quality you want to set for the conversion.
- Click the red Convert button to begin the YouTube video to MP3 audio conversion.
- When the conversion is complete, click the Download button below the MP3 quality drop-down menu.
Capture audio with Audacity
To manually record the audio, or only need a segment of the video's sound, you can use the free software Audacity to capture the audio. To proceed, follow the steps below.
If your computer has an integrated sound card, you'll not be able to download streaming audio. Therefore, the steps in this section will not work for you. It's best to use an online service, as discussed above, to download audio from a YouTube video.
- Download Audacity from the Audacity official website.
- Once the download is complete, run the setup program and follow the steps to install Audacity on your computer.
- Open Audacity using the shortcut on your desktop, or run it from your Start menu.
- In the menu bar at the top of the Audacity window, click Edit, then Preferences.
- In the Preferences window, in the Devices section, locate the Recording section.
- In the Device drop-down list, select the Stereo Mix option. If Stereo Mix is not available, it is likely disabled. To enable it:
- Open the Control Panel on your computer and click Hardware and sound, then the Sound icon in the Control Panel window.
- In the Sound window, click the Recording tab, right-click in a blank space in that tab, and select Show Disabled Devices from the drop-down menu.
- The Stereo Mix device should now be visible. Right-click that device and select Enable.
If the Stereo Mix option is still not available, it is likely because your computer has an integrated sound card. Stereo Mix is not available with many integrated sound cards and you cannot download streaming audio from a YouTube video. We recommended trying the online service or YouTube-dl solution instead.
- Click OK to save the sound settings change.
- If Audacity was open when you enabled Stereo Mix, close and re-open the program. Stereo Mix should now be available in the Recording Device list.
You can select the settings in steps four and five in the main Audacity program window as well. There are four drop-down lists located above the middle of the program window. The second drop-down list from the left is for the Recording Device (next to microphone icon). Select Stereo Mix in this drop-down list.
- While still in Preferences, select 2 (Stereo) in the Channels drop-down list to enable stereo sound.
- Click OK when you are satisfied with your settings.
- Access the YouTube video you want to record. Unless you have a fast connection, we suggest getting the video fully loaded (allow it to complete the buffering process) before recording.
- Once your video is loaded on the YouTube website, click the record button (red circle) in Audacity, then switch back to the YouTube video and click play. As the video is playing, you'll see action in the sound wave section in Audacity. When done recording, click the stop button (black square to the left of the record button) in Audacity.
Doing it this way causes a section at the beginning of the sound file to be blank. To remove this section of blank audio, highlight it by clicking and dragging your mouse, and press Delete on the keyboard. You can also enable the Sound-based Recording option in Audacity to eliminate the blank section of audio.
- When you have completed your recording, click File, select Export, then select Export as MP3. Make sure MP3 Files in selected in the Save as type drop-down list. Choose a location to save the MP3 file, enter a file name, and click Save.
Getting MP3 support for Audacity
- To save the file in MP3 format, you need to get LAME for Audacity from the LAME download site. LAME is available for both the Windows and macOS.
- Once downloaded, install LAME on the computer.
- When you have completed your recording, click File and choose Export. Select MP3 Files in the Save as type drop-down list. Enter a File name and click Save.
- After selecting the MP3 Files type, you may be prompted for the location of the LAME file. Point to the lame_enc.dll file, located at C:\Program Files\Lame for Audacity if you used the default install location. If you extracted from a compressed file, it's in the extracted folder.
Download audio with YouTube-dl
For example, you can download the audio in m4a format with the command:
youtube-dl -f 140 url
Where url is a web address in the form: https://www.youtube.com/watch?v=ID.
Convert to mp3 with FFmpeg
To convert the m4a file to an mp3 file, you can use the open-source program FFmpeg. For example, this command:
ffmpeg -i "Input file.m4a" "Output file.mp3"
Would convert the file named Input file.m4a to a new mp3 file called Output file.mp3. In the command above, the file names are enclosed in double-quotes because they contain spaces.
Running these commands looks similar to the following picture. In this screenshot, we use the dir command to verify the mp3 file was created.
For more information, see: How to download online videos and audio from over 700 sites.