Date: Tue, 17 May 2011 19:49:43 -0700
From: Rick Moen <email@example.com>
Subject: Re: [conspire] get back to me first
Organization: If you lived here, you'd be $HOME already.
Quoting Bruce Coston (firstname.lastname@example.org):
> 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.
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.
(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.
 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 Spark codec. Moreover, the open source community had already independently reverse-engineered everything Adobe did disclose.
Date: Tue, 17 May 2011 19:55:15 -0700
From: Rick Moen <rick @linuxmafia.com>
Subject: [conspire] YouTube downloading software (was: get back to me first)
Organization: If you lived here, you'd be $HOME already.
I should also acknowledge Micah Lee's really useful posting on this subject. Thanks, Micah!
This is my compendium of links relative to my suggestion to Bruce Coston, just posted (http://linuxmafia.com/pipermail/conspire/2011-May/006225.html) that he deal with his video streaming problem with YouTube and similar sites through use of downloaders, which in turn can also permit, if he wishes, losing that dreadful Adobe Flash plugin software and substituting open-source compatibles (Gnash, Swfdec, GPLFlash).
Here's the laundry list, which I hope will prove useful. Remember, you should usually favour distro packages where available, rather than going to upstream links (such as those cited). All codebases mentioned are genuine open source (except for Google's Chrome Web browser).
clive is a Flash video extraction tool in Perl for user-uploaded video hosts such as Youtube, Google Video, Dailymotion, Guba, and Metacafe. It can be chained with 3rd party tools for subsequent video re-encoding and playing and playing.
clive-utils is a collection of add-on tools to parse RSS feeds, parse
video pages, and manage login passwords related to video sites.
cclive is a rewrite of clive in C++ for lower system load.
abby is a Qt-based graphical front end in C++ for clive and cclive.
youtube-dl is a (command-line) Python script for downloading Flash or
WebM (vp8 + Vorbis) video clips for YouTube.com, Google Video,
Photobucket, Yahoo Video, Dailymotion, DepositFiles, and some other
sites. You provide the clip's URL, and youtube-dl saves the clip as a
local file with file extension .flv.
For maximum compatibility with even the more difficult (DRM-obscured)
YouTube clips, you should also install the rtmpdump program to decrypt
files served using Adobe's proprietary 'RTMP' protocol. See:
YouTube Downloader GUI is a Qt/kdelibs front-end for youtube-dl:
Qttube is a similar Qt front-end for youtube-dl:
Flash Video Downloader is a Firefox extension to download Flash video
clips from YouTube, Dailymotion, Break.com, and many other sites.
Easy YouTube Downloader is a Firefox (and Chromium / Chrome) extension
to download YouTube videos in FLV, 3GP, MP3, MP4 and 720p HD and 1080p
quvi is a command-line tool in C for parsing Flash video links out of
YouTube and similar sites.
PyTube is a Python app that searches and downloads YouTube video clips
and encodes them using FFMpeg:
(gone from: http://bashterritory.com, http://www.getdeb.net/app/PyTube, http://www.marcosrodriguez.me/pytube/)
pytube (different codebase) is a Python script for YouTube and
MetaCafe that de-obscures the video clip's URL from its obscuring
Note: There was for a long time a Python / gtk+2 graphical application also called Pytube, but unfortunately everyone relied on someone else to host it, and it it appears to have vanished from the Internet.
Utube Ripper (formerly Youtube Downloader for Linux) is an application
written in Gambas that works exclusively on Linux. It's useful to
download and convert Youtube videos in a simple and efficient way.
(g)vdown is an application that can download videos from video sharing
websites like YouTube, Google Video, MyVideo and so on. It is written in
Python. It has a command-line interface (vdown) and a PyGTK interface
Get YouTube Video is a KDE service menu usable with Konqueror to
download YouTube Flash video clips.
gnetvideoplayer is a C program for GNOME that serves as a player and
downloader for YouTube and Stage6 videos, and depends on wget, MPlayer,
youshell is a Python script to search and download Flash video clips
from YouTube and load them into Mplayer.
Elltube is a graphical Python / Qt4 YouTube Flash downloader and
MP3 Rocket is a Java program to download YouTube and other clips