[MPlayer-users] A script/wrapper to play Youtube etc videos?

Nicolas George nicolas.george at normalesup.org
Thu Nov 6 19:40:45 CET 2008


Le sextidi 16 brumaire, an CCXVII, Richard Hartmann a écrit :
> So, is anyone aware of a, preferably MPlayer-based,
> program/wrapper/script which will I pass the URL of a video to
> which will then spawn a new window with the video in it? I am
> aware of the download tools, but they just don't work the way
> I want (i.e. no waiting time).

The download tools are able to print the URL of the FLV file (see option -g
to youtube-dl for exemple). The rest is trivial:

mplayer `youtube-dl -g $URL`

should do the trick (provided you use a sane shell that does not repare
expanded variables and backquotes).

As for me, I like to use a Greasemonkey script that adds to the youtube page
a link to the video itself. I added this interesting feature: there is a
second link to a synthetic file (using the data: URL scheme) with MIME type
application/x-youtube-url and the actual URL as content. I associated a
simple shell script to this MIME type, this allows me to start mplayer by
just clicking on the link. The Greasemonkey script is too long for me to
post here out of the blue, though. But there is nothing smart in it.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-users/attachments/20081106/9eed1e6f/attachment.pgp>


More information about the MPlayer-users mailing list