Play .rar files with vlc / mplayer

UPDATE: Ive made a more complex version of this post with seeking:
http://dingleberry.me/2009/08/play-rar-files-with-mplayer-v2-0-now-with-seeking/

Are you tired of having to unpack *.rar archives to watch them?
There is a solution for us linux users.

Firstly you should install unrar.

On a debian or derivate:
apt-get install unrar

Then you should make a shell wrapper, e.x.: /usr/local/bin/playrar

Make it look like something like this: (change mplayer to your preferrable videoplayer)

unrar p -inul $1 | mplayer -

And do a:
chmod +x /usr/local/bin/playrar

Now you can do a:
playrar blablabla.rar

And your video will be shown without unpacking it.
The only catch is that you can’t seek in the video if its multipart-rar archive.

Tags: , , ,