Recording voice without internal audio
I need to record an audio file with Mac while playing a YouTube video, using earphones. The problem is that both my voice and the video audio get recorded, but I need to record ONLY my voice from the microphone. So the question is: how can I only record my voice from the microphone, without the video sound? Thank you.
MacBook Air 13″, OS X 10.11