Download YouTube via command line
How to download a Youtube video from command line? Mac OS X and/or Ubuntu Linux. Optionally, i'd like to save it in .avi or .mkv format.
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
youtube-dl works on OS X, Linux and Windows, and can download videos in any format YouTube provides. You can use other tools like mencoder to change the codec or container format afterwards.