If you want the best sound quality, you need to not convert the file, rather pull out the audio and keep it in that format (ogg or m4a). M4A is really widely supported these days, so it's not much to worry about.
You can use this Firefox extension to download the audio streams directly. I don't know of any other extensions for other browsers that do what this one does.
You can also download the videos and run them through ffmpeg.
ffmpeg -i in.mp4 -map a -c copy out.m4a
Tags : youtube to mp3