You are not logged in.
Pages: 1
My son likes youtube videos, and wanted an easy way to download them.... So I wrote a bash script to do the honors.
This script will rip the .flv file from a youtube.com url, and convert it to a .mpg video file...
..............................................................................................................................
#!bin/bash
bu="http://youtube.com/get_video.php?";mkdir -p ~/YouTube;cd ~/YouTube;read -p "YouTube url? " ur;read -p "Name? " nv
wget ${ur} -O /tmp/y1;uf=${bu}`grep player2.swf /tmp/y1 | cut -d? -f2 | cut -d" -f1`;wget "${uf}" -O /tmp/y.flv
ffmpeg -i /tmp/y.flv -ab 56 -ar 22050 -b 500 -s 320x240 ${nv}.mpg;rm /tmp/y.flv; rm /tmp/y1;rm gmon.out; exit
Offline
:twisted: awsome dude...
now i can get all my fav~ Suicide ?Club clips without having to do the werk myself (yes i'm a lazy fk)
The.Revolution.Is.Coming - - To fight, To hunger, To Resist!
Offline
Hi,
nice work.....But there is already such a tool: http://aur.archlinux.org/packages.php?d … s=0&SeB=nd
Daniel
Offline
you can use http://keepvid.com/lite/ to download those flv files (not only for youtube)
Offline
youtube-dl is probably better, cause it has error handling and such.
Nice to have it converted, though.
Offline
you can use http://keepvid.com/lite/ to download those flv files (not only for youtube)
There's also a Firefox extension for downloading the flvs: https://addons.mozilla.org/firefox/2390/
Offline
youtube-dl is probably better, cause it has error handling and such.
Nice to have it converted, though.
also using youtube-dl now, never knew it thx!
but indeed its nice to have it conerted to an mpg, so also thanks to u crouse
cheers,
detto
Offline
Someone mentioned i should have used some error checking.... but I just put it together for quick use by my son, never put much more thought than that into it lol.
I didn't know about the firefox extention or the website that did the same thing either untill after i had written it. The website http://keepvid.com/lite/ does work very well. Again, i didn't realize that existed until about 2 hours after i had written the bash one. Ah well.... it was good practice
Offline
Pages: 1