How to play YouTube videos became a question to me because flash in Linux is all but abandoned and knowing of flash security concerns. Good news is that most videos now are being converted to WebM (Firefox HTML 5 video) but for some unknown reason I find most of them that the sound won’t play. I really enjoyed watching YouTube videos so since I’ve gone to using youtube-dl which is a great command line program (there is also youtube-viewer).
I wrote a wrapper script do that to be able to download a number of varying videos:
youdl youdl "youtube.com/url" # quotes necessary, not spaces
youtube-dl
I like youtube-dl quite a bit too but it takes more setting up. When using youtube-dl I put these in my ~/.bashrc to simplify the process:
utube-view () {
mplayer -cache 200 -really-quiet $(youtube-dl -g --max-quality mp4 "$@" )
}
youtube-viewer
youtube-viewer directly invokes mplayer:
youtube-viewer "http://youtube.com/video-url"
And it works great! The quotes are necessary to avoid bash interpretation of specialcharacters. youtube-viewer can also download the video too:
youtube-viewer -d "http://youtube.com/video-url"
MPlayer Keyboard Shortcuts
Got this from here:
