Audacity, the open-source audio editing software, has the ability to record any sound passing through your computer's sound card. That means it can also capture streaming audio from the Internet, including audio from YouTube videos. This gives you the capability of saving YouTube audios as MP3 files. You can also edit and remix the audios, and apply various effects to improve their sound quality.
Open Audacity. In the centre of the upper toolbar, there's a drop-down menu that lets you select the audio source for your recording. Select "Stereo Mix" or "Mono Mix," depending on the quality of the YouTube video you'll be recording.
Open your Web browser and navigate to the YouTube video you'd like to record. Stop the video when it starts playing and drag the slider at the bottom of the video all the way to the left. Wait until the video has completely loaded. You'll know this has occurred when you see the faded red bar at the bottom of the video moves all the way to the right.
Click the "Record" button in Audacity, which is the button with the red circle in it. You'll begin to see an audio track waveform move across the editing window, although at this point it will be flat because there's no sound.
Click the "Play" button for the video on YouTube. In Audacity, you'll see a blue waveform being drawn which represents the audio you're recording. When the audio on the YouTube video ends, click the "Stop" button -- the one with the gold square in the centre -- in Audacity to stop the recording.
Click the "Skip to Start" button in Audacity to move to the beginning of the sound file you've recorded. You'll see the flat line in the waveform that corresponds to the few seconds of silence between the time you started recording and the time the YouTube video started. Select the flat portion of the line by clicking on one side of the line and dragging the cursor to the other side. Drop down the "Edit" menu and select "Cut." The silent portion is now trimmed away.
After you record and trim the audio, you can save it in one of Audacity's supported sound formats by selecting "Save Project As" from the "Edit" menu. You can also export the file as a WAV, Ogg Vorbis or MP3 file by selecting those options from the "Edit" menu.
If the waveform of your recording is flattening out at the top and bottom of the track display, it means your recording volume is too loud, and your file will sound distorted. Adjust the volume slider -- the one next to the microphone icon -- so that the waveform peaks without exceeding the boundaries of the track display. Recording and distributing any material that has a copyright is a violation of federal law.