{"id":1097,"date":"2007-12-28T16:00:00","date_gmt":"2007-12-28T16:00:00","guid":{"rendered":"http:\/\/scienceblogs.com\/gregladen\/2007\/12\/28\/capturing-the-elusive-streamin\/"},"modified":"2007-12-28T16:00:00","modified_gmt":"2007-12-28T16:00:00","slug":"capturing-the-elusive-streamin","status":"publish","type":"post","link":"https:\/\/gregladen.com\/blog\/2007\/12\/28\/capturing-the-elusive-streamin\/","title":{"rendered":"Capturing the Elusive Streaming Video"},"content":{"rendered":"<p>How to convert a YouTube or Google streaming video into a file that you can put in your pocket and carry around with you.<\/p>\n<p><strong>The Problem:  Streaming Video is not enough.<\/strong><\/p>\n<p>Do you need to save a Youtube or Google video into a file?  I&#8217;m not sure about the legality or practicality of doing this, so anything you read here could break your computer or get you arrested, that&#8217;s up to you.<\/p>\n<p>I know I do this some times for a very good reason.  My wife is a school teacher, and schools are run by reality-blind bureaucrats who come up with things like &#8220;zero tolerance&#8221; policies &#8230; so of course, most schools seem to have blocking of almost all useful Internet content, especially and including Google Videos and Youtube.  So, if Amanda wants to show some useful video to her students, she can&#8217;t.  The bureaucrats are happy, the students are uneducated.  Whatever.<\/p>\n<p><!--more--><\/p>\n<p><strong>Linux to the Rescue<\/strong><\/p>\n<p>If you have a problem like this one, an obvious solution is to make a file of the video, throw it on a CD or wherever, and sneak it past the guards at the school.<\/p>\n<p>If you have a Linux machine, this is easily done.<\/p>\n<p>You should be running Firefox, you should have FFMpeg installed, and you should chew your food 23 times before swallowing.  The first two are necessary for the present exercise, the third is just a good thing to do.<\/p>\n<p>If you don&#8217;t have FFMpeg and you are running, say, Ubuntu (or any Debian system, I believe) go to a command prompt and type &#8220;apt-get install ffmpeg&#8221; (you may need to be SUDO to do this) and ever tying will take care of itself.  Or you can use the GUI interface you normally use for installing stuff.<\/p>\n<p>If you do not have Firefox on your computer then you must have removed it because it came with the computer.  Install it.<\/p>\n<p><strong>Go get the video<\/strong><\/p>\n<p>Find the video you want to download.  <a href=\"http:\/\/scienceblogs.com\/gregladen\/2007\/12\/the_whoops_of_wii.php\">Perhaps this one.<\/a>  Play the movie.  Don&#8217;t be doing other stuff while this is happening.  Just keep your hands to yourself for once.<\/p>\n<p>Now, type in to a terminal the foll wing command exactly as you see it here:<\/p>\n<p>ffmpeg -i &#8220;$(find ~\/.mozilla -regex &#8216;.<em>Cache.<\/em>&#8216; -a -not -regex &#8216;.<em>_CACHE_.<\/em>&#8216; -printf &#8216;%T+ %pn&#8217; | sort -n | awk &#8216;{ print $2 }&#8217; | xargs file | grep -i &#8220;Video&#8221; | tail -1 | awk -F : &#8216;{ print $1 }&#8217;)&#8221; -vcodec msmpeg4v2 -b 200 -ab 64 -ar 22050 -s 320&#215;240 \/tmp\/saved_video.avi<\/p>\n<p>Just cut and past it.  Sit back and wait for a while for the command to finish, and then go to this location:<\/p>\n<p>\/tmp\/<\/p>\n<p>to find this file:<\/p>\n<p>saved_video.avi<\/p>\n<p>Enjoy the show!<\/p>\n<p>This Howto adapted from <a href=\"http:\/\/www.paganini.net\/index.cgi\/linux\/capturing_flv.html\">Paganini.net<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to convert a YouTube or Google streaming video into a file that you can put in your pocket and carry around with you. The Problem: Streaming Video is not enough. Do you need to save a Youtube or Google video into a file? I&#8217;m not sure about the legality or practicality of doing this, &hellip; <a href=\"https:\/\/gregladen.com\/blog\/2007\/12\/28\/capturing-the-elusive-streamin\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Capturing the Elusive Streaming Video<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"1","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[164,67,87],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p5fhV1-hH","jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/gregladen.com\/blog\/wp-json\/wp\/v2\/posts\/1097"}],"collection":[{"href":"https:\/\/gregladen.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gregladen.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gregladen.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gregladen.com\/blog\/wp-json\/wp\/v2\/comments?post=1097"}],"version-history":[{"count":0,"href":"https:\/\/gregladen.com\/blog\/wp-json\/wp\/v2\/posts\/1097\/revisions"}],"wp:attachment":[{"href":"https:\/\/gregladen.com\/blog\/wp-json\/wp\/v2\/media?parent=1097"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gregladen.com\/blog\/wp-json\/wp\/v2\/categories?post=1097"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gregladen.com\/blog\/wp-json\/wp\/v2\/tags?post=1097"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}