You are not logged in.

#1 2006-08-25 06:20:05

crouse
Arch Linux f@h Team Member
From: Iowa - USA
Registered: 2006-08-19
Posts: 907
Website

Bash: youtube ripper

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

#2 2006-08-25 07:13:24

noriko
Member
From: In My Mind
Registered: 2006-06-09
Posts: 535
Website

Re: Bash: youtube ripper

: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

#3 2006-08-25 07:59:23

ise
Developer
From: Karlsruhe / Germany
Registered: 2005-10-06
Posts: 404
Website

Re: Bash: youtube ripper

Hi,
nice work.....But there is already such a tool: http://aur.archlinux.org/packages.php?d … s=0&SeB=nd

Daniel

Offline

#4 2006-08-25 12:16:03

alexpnx
Member
From: Nicosia, Cyprus
Registered: 2006-06-10
Posts: 47

Re: Bash: youtube ripper

you can use http://keepvid.com/lite/ to download those flv files (not only for youtube)

Offline

#5 2006-08-25 12:55:33

postlogic
Member
Registered: 2005-02-24
Posts: 410
Website

Re: Bash: youtube ripper

youtube-dl is probably better, cause it has error handling and such.

Nice to have it converted, though.

Offline

#6 2006-08-25 14:05:46

nachete
Member
From: Pontevedra, Galicia, Spain
Registered: 2006-06-26
Posts: 12

Re: Bash: youtube ripper

alexpnx wrote:

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

#7 2006-08-25 17:34:14

detto
Member
Registered: 2006-01-23
Posts: 510

Re: Bash: youtube ripper

postlogic wrote:

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! big_smile
but indeed its nice to have it conerted to an mpg, so also thanks to u crouse smile

cheers,
detto

Offline

#8 2006-08-25 20:57:42

crouse
Arch Linux f@h Team Member
From: Iowa - USA
Registered: 2006-08-19
Posts: 907
Website

Re: Bash: youtube ripper

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 smile

Offline

Board footer

Powered by FluxBB