download youtube with bash

Who doesn’t know what is. You can found any favorites music clips and video there. More than that, you can use as your media to share your home-made video there. You can download that too, incase you want to watch your friend video and backup that to your own PC.

Here little bash script to show you how to that. You need ffmpeg if you want convert the video to mpeg format.

# Command: sh convert filename youtubeurl
# Note: don’t use space for filename


wget $url_asli -O /tmp/$nama_baru;
temporary_file=$url_baru`grep player2.swf /tmp/$nama_baru | cut -d? -f2 | cut -d\” -f1`;

wget “$temporary_file” -O /tmp/$nama_baru.flv

# Remove ‘#’ below if you want to convert it to mpg
# ffmpeg -i /tmp/$nama_baru.flv -y -sameq $nama_baru.mpg;
# rm /tmp/$nama_baru.flv;
# rm /tmp/$nama_baru;


Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:


You are commenting using your account. Logout /  Ubah )

Foto Google+

You are commenting using your Google+ account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )


Connecting to %s