<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d23884446\x26blogName\x3dJust+Another+Tech+Blog\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dSILVER\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttp://justanothertechblog.blogspot.com/search\x26blogLocale\x3den_US\x26v\x3d2\x26homepageUrl\x3dhttp://justanothertechblog.blogspot.com/\x26vt\x3d-8342903261382138056', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>

Just Another Tech Blog

Anything and everything having to do with technology, computers, science, and most of all... Linux! The documentation of my Linux endeavor.



Enhance your YouTube Viewing Pleasure

Tuesday, August 15, 2006

Publishing your own video on YouTube, or watching other people's videos, is all the rage these days. Why are we talking about YouTube, in a column about the CLI? Because this week we're writing about youtube-dl, a clever little CLI tool that's easy to install and use to fetch YouTube videos." Read more @ Linux.com.

Note form the Nerd: This really is a neat little python program. I have been playing around with it for a while, and I love it! Acually quite useful. I have also found a bash script alternative to this program (doesn't require python) written by Crouse from Bashscripts.org:

#!/bin/bash
# by Crouse
# Program name ytr = YouTube.com Ripper
baseurl="http://youtube.com/get_video.php?"
mkdir -p ~/YouTube ;
mkdir -p ~/YouTube/tmp ;
cd ~/YouTube/tmp ;
read -p "What is the youtube.com url you want to rip ? " urltorip ;
read -p "What would you like to name the video (no spaces in the name) ? " nameofvideo ;
wget ${urltorip} -O urlsource.txt ;
grep "player2.swf" urlsource.txt > url.info ;
cut -d? -f2 url.info > url;
cut -d\" -f1 url > videoid;
videourl=`cat videoid`
fullurl=${baseurl}${videourl}
echo ${fullurl}
rm *
wget ${fullurl}
mv * *.flv
echo "Now converting the file to mpeg ... this can take awhile, please be patient" ;
ffmpeg -i *.flv -ab 56 -ar 22050 -b 500 -s 320x240 ${nameofvideo}.mpg
mv *.mpg ../
rm -Rf ~/YouTube/tmp
exit
posted by linnerd40, Tuesday, August 15, 2006


0 Comments:

Add a comment