Alternative:
https://github.com/nficano/pytubepytube is a lightweight library written in Python. It has no third party dependencies and aims to be highly reliable.
pytube makes zero assumptions, meaning there is no built-in method to get say the "best" quality video, pytube simply exposes all the available formats and resolutions, giving you the developer the power to define what "best" is.
pytube also makes pipelining easy, allowing you to specify callback functions for different download events, such as on progress or on complete.
Install:
pip install pytube
Command-line usage
You can download a video by simply passing the -e (or --extension=) switch and setting it to the desired filetype:
pytube -e mp4 http://www.youtube.com/watch?v=Ik-RsDGPI5Y
Same thing for specifying a resolution:
pytube -r 720p http://www.youtube.com/watch?v=Ik-RsDGPI5Y
You can also specify a download file path (-p or --path=):
pytube -e mp4 -p ~/Downloads/ http://www.youtube.com/watch?v=Ik-RsDGPI5Y
and/or optionally choose the filename (-f or --filename=):
pytube -e mp4 -f Dancing Scene from Pulp Fiction http://www.youtube.com/watch?v=Ik-RsDGPI5Y
I mostly grab albums or discographies from torrents as I notice youtube songs are noticeably poorer quality. I cannot say whether this way of cli downloading youtube songs/videos is better than youtube-dl but its always good to have an alternative.