6/12/09

Youtuber

I always hated flash, from the beginning, when it was just in some random adds.


But lately my computer has been kinda slow cause of a lot of programs that are now always open (nicotine+, transmisison, jdownloader) since I bought myself a Seagate 1TB hard disk, and when watching youtube form firefox it got reeeaaaallyyyyy slow, so I started to use ffplay from bash to play the flvs firefox downloads from youtube and places in /tmp/Flash*, but firefox alone used a lot of CPU and RAM.


So today I invented this:


wget -O - "$(youtube-dl -g $@)" | ffplay -


This simple looking commands uses youtube-dl script from Ubuntu repos to get the real URL of the youtube video, pass it to wget who downloads it and streams the flv to ffplay, who plays the video taking almost no CPU or RAM and even not writing the hard disk.


I putted it in a bash script (I know a function would have worked too) and now just typing a single command I get a youtube video in a small window with mplayer-alike control bindings.