[vox-tech] [fwd] YouTube downloading

2011-05-19 Thread Bill Kendrick

Since this topic has come up, and Rick's is a very thorough post on the
topic...  From CABAL mailing list, via SF-LUG mailing list.

-bill!

- Forwarded message from Rick Moen r...@linuxmafia.com -

Date: Wed, 18 May 2011 02:42:14 -0700
From: Rick Moen r...@linuxmafia.com
Subject: [sf-lug] YouTube downloading
To: sf-...@linuxmafia.com

(Copying over a conversation from CABAL's mailing list:)


Date: Tue, 17 May 2011 19:49:43 -0700
From: Rick Moen r...@linuxmafia.com
To: consp...@linuxmafia.com
Subject: Re: [conspire] get back to me first
Organization: If you lived here, you'd be $HOME already.

Quoting Bruce Coston (jane_ik...@yahoo.com):

 I need to get a distro on one of my many small-ish laptop partitions
 that will play back YouTube videos I suck at the library after I
 suspend to disk and go home during our many summer Internet outages.
 My elive install suffers real problems with this, after I take it off
 disk suspend, back home.

Bruce --

I'm going to make a longer post on this subject that aims to be more
comprehensive, but here's the short version:

You're relying on local cache state of the Adobe Flash interpreter being
useful and complete after suspend to disk. Bad strategy. Instead,
install scripts or browser extensions to download the clips to local
disk.

Slight elaboration: I'm assuming Flash (Sorenson H.263 encoding in FLV
container) for the sake of discussion, though Google's YouTube service
also offers video in MPEG Licensing Authority's patent-problematic H.264
encoding in either FLV or MP4 (MPEG-4 Part 14) containers (often
inaccurately called 'HTML5' video), in Google's (ex-On2) VP8 encoding in
WebM containers (which along with Vorbis encoding in a Matroshka
container is part of the HTML5 draft), and in MPEG-4 Visual encoding in
3GP containers (a format primarily intended for mobile 'phones). It's
pretty much the same problem regardless.

Why a problem? Your media player plugin (Adobe Flash, for the sake of
discussion) is streaming-in the inbound A/V bitstream and dumping it
into ~/.mozilla/firefox/[hash]/Cache on an ongoing basis, but that
cached copy isn't guaranteed complete and useful at any given moment.
Also, it's not the least bit surprising to hear that Adobe Flash acts
stunned and stupid if it suddenly wakes up after being suspended to
disk. So, no, you're actually lucky if that ever works, because you can
be sure that the buggy spaghetti code in question isn't designed to do
it.

So, let's say you look at the page HTML on a YouTube page to try to find
the .flv direct link so you can pull a copy down using wget or curl.
Surprise, you can't find it. Why not? Because you are not Google's
customer; you are their product -- and they are far, far more eager to
make Our Lords in Hollywood happy than they are you. So, they cause
YouTube to wrap the .flv link in inscrutable JavaScript, in order to
make it difficult to puzzle out. Moreover, they gratuitously change that
JavaScript obfuscation occasionally, to screw people up who've
de-obscured the latest version and are letting others know how.

(They do that because Our Lords in Hollywood don't want users to have
local copies that cannot be retroactively withdrawn from availability.)

Nonetheless, there are folks who gamely keep up with the changes, and
you can  should benefit from their work:

clive (Perl script)
cclive (newer C++ rewrite of clive)
youtube-dl (Python script)
Flash Video Downloader (Firefox extension)
Easy YouTube Downloader (Firefox extension)
Get 'em all.

There are distro packages for clive, cclive, youtube-dl (judging by
Debian). You may find the distro packages' frequency of update adequate
to keep up with JavaScript mischief at YouTube, Photobucket,
Dailymotion, Metacafe, Facebook, Yahoo, depositfiles.com, etc. -- or
not. If not, you might need to have them as locally installed and
updated software.

ALSO:

There's a persistent misconception, spread about by the ill-informed,
that the open source Flash interpreters (Gnash, Swfdec, and GPLFlash)
are inadequate to handle the Flash served by YouTube. No, wrong. It's
really just the obfuscatory JavaScript.[1] Which, if you use a
downloader such as those listed above, and it works, suddenly becomes a
non-problem. So, in addition to the recommendations above, please
consider losing the Adobe Flash proprietary garbage, or at least using
Gnash in preference. (For one thing, the Gnash developers don't spy on
users, about which please see http://lwn.net/Articles/129729/.)


[1] Adobe consistently withheld Flash's technical specifications from
the open source community, making selected details available only under
restrictive agreements. Starting June 2009, in the face of mounting
competition from alternatives (H.264 in MP4, VP8 in WebM, Vorbis in
Matroshka, and especially Microsoft Silverlight), they finally coughed
up the SWF file format specification without restriction, but omitted
anything about the key Real Time Messaging Protocol (RTMP) and Sorenson

Re: [vox-tech] [fwd] YouTube downloading

2011-05-19 Thread Rick Moen
Quoting Bill Kendrick (n...@sonic.net):

 Since this topic has come up, and Rick's is a very thorough post on the
 topic...  From CABAL mailing list, via SF-LUG mailing list.

Hi, Bill.  I am truly flattered.

Sometimes, I post something like that after hours of careful research 
and write-up, hear nothing but silence in response, and wonder if anyone
noticed, so it's really nice to get feedback.

FWIW, I wrote that in part in order to FAQ the subject on the Web,
which I've done as an addition to the Linuxmafia.com Knowledgebase,
here:

'YouTube Downloading' on http://linuxmafia.com/kb/Web/

Thanks again.

___
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech