Tuesday, September 11, 2012

Yet Another Flash Alternative

[UPDATE: Youtube broke quvi. Waiting for an update... A new version (0.4.8-3) of libquvi-scripts has migrated to Wheezy which fixes the Youtube problem, so you can update your repositories and reinstall]

Since myself and others have written about the thousand or more flash alternatives out there, I thought I'd add one more to the mix. I've discovered a new tool for Linux called quvi. It works from the command line and streams Youtube videos to your player of choice. It basically works like this:

Install quvi, create the file ~/.quvirc and add:

exec = "yourplayer %u"
format = your preferred format

where yourplayer can be vlc or smplayer or whichever. I prefer to run mplayer from the command line with arguments, so my exec line is "mplayer -really-quiet -framedrop -cache 8192 -cache-min 10 %u". (EDIT: if mplayer's picture is lagging behind the sound, add the argument "-lavdopts skiploopfilter=all" and choose a WebM format instead of mp4 as those have less pixelation when skipping the loop filters)

For your preferred format, typical Youtube formats are fmt18_360p, fmt22_720p, and fmt37_1080p, which play mp4s in those resolutions (WebM videos are fmt43_360p, fmt44_480p, fmt45_720p, and fmt46_1080p, and flv videos are fmt5_240p, fmt34_360p, and fmt35_480p). My preferred format is fmt18_360p.

After saving the file, playing videos is as simple as copying the video URL from your browser (don't forget the http://) and then pasting it in a terminal window in quotes after the quvi command like this:

quvi "Youtube URL"

Incidentally, to paste something in an xterm or aterm window, middle-click while the mouse cursor is over the terminal window.

A full list of available formats can be found with:

quvi "Youtube URL" --query-formats

See much more at quvi's man page. It's supposed to support other sites besides Youtube, but I haven't tested them. Also, a similar command line tool for saving videos to disk is called cclive.

When using quvi with mplayer, I find this the most cpu-efficient way to waste time, I mean, watch Youtube videos, and I can even watch them without frame-skipping on a G3 laptop, something I couldn't say for Mactubes.

No comments:

Post a Comment