This directly violates the Youtube API terms of service.
https://developers.google.com/youtube/terms
Under Prohibitions: "8. separate, isolate, or modify the audio or video components of any YouTube audiovisual content made available through the YouTube API;
9. promote separately the audio or video components of any YouTube audiovisual content made available through the YouTube API;
10. access any portion of any YouTube audiovisual content by any means other than use of a YouTube player or other video player expressly authorized by YouTube;
11. store copies of YouTube audiovisual content;"