To do this you need the following applications installed on your linux-box: # sudo apt-get install youtube-dl ffmpeg sox To download the video do this: # youtube-dl url-to-youtube-video To extract audio from video file, do: # ffmpeg -i videofile -q:a 0 -map a audio.wav To extract part of audio from wav, do: # sox audio.wav new_audio.wav trim 00:10 04:25 (00:10 is starting position and 04:45 is the end position. This way you can trim away unwanted audio.) To convert the wav-file to mp3, do: # ffmpeg -i new_audio.wav -acodec libmp3lame audio.mp3
"A lie told often enough becomes the truth" – Lenin