Any audio editing program will record 'what u hear' for recording an audio, of course in real time.
As for saving Youtube videos you can just locate the cache folder your browser uses, save the file and change the extension to .avi
Also in youtube add &fn8 to the end of the URL to play the original audio stream, this can sometimes be better if the player is compressing the stream.
As for legalities I doubt many people could be arsed to save stuff anymore. You can pretty much play anything off the net quicker than getting a CD out.
Once all media devices are 4g or better and storage is in the cloud we'll no longer feel the need to own physical media or files. We'll just pay an extra monthly media subscription, add Apps/Movies on demand/Music on demand/Radio stations to that TV/Phone/Broadband package.......
Any movie, tune, show etc wherever and whenever you like, why own anything?