>On Tue, 18 Jun 2013 17:51:28 -0500
>Bruce Dubbs <[email protected]> wrote:
>
> Aleksandar Kuktin wrote:
> >> On Tue, 18 Jun 2013 16:53:29 -0500
> >> Bruce Dubbs <[email protected]> wrote:
> >
> >> Well that didn't work.  It gets to a point where is is linking
> >> libxul.so and dies because it can't find the entries
> >> 'vorbis_block_init' and similar links.  The build log is 42K lines
> >> when it dies and libxul.so seems to include about 3000 object
> >> files. In any case is does *not* have -lvorbis where the
> >> references are located.
> >
> > Did you try manually adding -lvorbis to the command? Assuming
> > vorbis_block_init is defined in libvorbis.so.
> 
> It was a really long command and had:
> 
> /tmp/firefox-21.0/firefox-build-dir/toolkit/library/tmpPriw67.list
> 
> in it.  The log showed several thousand .o commands, but when I
> looked for the list, it was gone.  I could look for the Makefile and
> add it to that.

Ow. Well, I guess you could go the Makefile route. If you want to.

> > For the record, I also don't have audio in my Firefox when viewing
> > HTML5 videos on YouTube, but I run my browser as a separate user and
> > that user is not added to group "audio" in /etc/group (I use ALSA).
> > Since I wrote a special script to download the video files from
> > YouTube so I can view them later with Mplayer, I never cared about
> > this.
> 
> In my case, I am in the audio group.
> 
> It would be interesting to see if my mplayer can play html5 files.
> Can you share your script?
> 
>    -- Bruce

Script is attached.

A short manual: the script uses wget to do all the heavy lifting. The
script takes a (theoretically infinite) list of video IDs. If you view a
YouTube URL, for example http://www.youtube.com/watch?v=o4NaBrFkiDo,
then you see that it has the 'v' argument, in this case "o4NaBrFkiDo".
That is what I call YouTube URL and the script needs those. These can
be passed naked, but the script will also detect them within constructs
such as a complete YouTube link (like the one above) and a bunch of
others. See lines 118-120 for details.

Other than that, you can pass arguments to it. --user-agent is passed
to wget. --limit-rate is also passed to wget. The remaining arguments
have to do with video quality (the itag parameter). They set the
maximum allowable quality setting, and the actual video quality is
selected as the largest available from a decending list, whose top just
got defined. The order of these flags is (highest to lowest) --uhq,
--vhq, --hq, (no argument), --lq, --vlq, --ulq, --slq. The parameter
--music is special in that it generates a quality list which is
optimized for music download, that is: as small as possible, while not
compromising on sound quality. The option -e terminates the options
list and -h and --help display the help, as is customary.

I should point out that this script is VERY old - at the very least
it's older than HTML5. And because of that, the script homes in on all
itag quality values that correspond to FLV and MP4 files while
ignoring the rest. Therefore, it will not download WebM files, except
by mistake (which only happens when there is a change with the YouTube
page).

As far as network activity, the script does a bit of browser
impersionation: it spoofs the "User-Agent" field to an old version of
Google Chrome by default and does a nice little job of keeping tabs on
all cookies (deleted at script exit). The script downloads the HTML of
the video page, digests it, and downloads the video stream file,
provided it found one. The default bandwith limitation (--limit-rate
argument) is 200k.

-- 
You don't need an AI for a robot uprising.
Humans will do just fine.
                     --Skynet

Attachment: get_from_youtube.sh
Description: application/shellscript

-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to