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.

Be Sociable, Share!

Tags: , , ,

11 Responses to “Play .rar files with vlc / mplayer”

  1. Jonas Says:

    GODT TIPS GUTTAR!
    GODT ARBEID

  2. Loddo Says:

    Hey :)

    im a total linux newb, but i still like this feat. (if you could call it that)

    i have just tried it on my newly installed Ubuntu 9.04, and it does not work :/ has anything changed since this post was made?

    dont know if you still look at these old posts, but i hope you have an answer :)

  3. MrBerry Says:

    What exactly is failing? this works like a charm for me

  4. Loddo Says:

    I use this command

    unrar p -inul /example/path/to/Some.Scene.Release/some.sr.r00 | vlc -

    and then it tells me:

    [0x90c888] main libvlc: Running vlc with the default interface. Use ‘cvlc’ to use vlc without interface.
    [0xe2f318] main stream error: cannot pre fill buffer

  5. MrBerry Says:

    you dont run this as root?

  6. Loddo Says:

    if I run it as root, i get:
    [sudo] password for chansen: [0x1d3b888] main libvlc: Running vlc with the default interface. Use ‘cvlc’ to use vlc without interface.

    if i have missed some stupid thing :) just tell me, i havent used linux for that long, and i have been killing google for some time. so if it is not an obvious error, then i will fint it on my own :) but thx for the support :)

  7. MrBerry Says:

    you should NOT run this as root.

    is unrar really installed?

    does vlc pop up, but without video?

  8. Royalg Says:

    Good tip… thx :D

  9. Play .rar files with mplayer v2.0: now with seeking | dingleberry.me Says:

    [...] It really started bothering me that its impossible to seek in media files when using my previous playrar script: [...]

  10. MrBerry Says:

    Check out the new post guys: http://dingleberry.me/2009/08/play-rar-files-with-mplayer-v2-0-now-with-seeking/

  11. :] Says:

    You should also quote the “$1″ or you’ll have problems playing rar files with spaces in the name. :]

Leave a Reply