Play video inside .rar files in Ubuntu (without extracting the archives)

2008 noiembrie 16
by Andrei

There are two methods one can use to play video inside .rar files in Ubuntu (without extracting the archives).

First method:

Install vlc and unrar:

Code:
sudo apt-get install unrar vlc

The command to use:

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

But that command is too long, so here’s how you can make it shorter:

Open ~/.bashrc in a text edior, using for example this command:

Code:
gedit ~/.bashrc

Paste this somewhere in the file, I did it in the top of the file:

Code:
PATH=$PATH:$HOME/bin

Close and save the file.
(This makes your Bash looking in the ~/bin folder for executeable files.)

Make a folder in your home folder called “bin”:

Code:
mkdir ~/bin

Make and open in a text editor a file called “rarvideo” in ~/bin:

Code:
gedit ~/bin/rarvideo

and paste this into it:

Code:
#! /bin/sh
unrar p -inul $1 | vlc -

Close and save the file.

Make the file executeable with this command:

Code:
chmod u+x ~/bin/rarvideo

You probably have to restart Bash, so in the terminal, type:

Code:
bash

Now you can just open a terminal in the folder where the .rar files are, and type this:

Code:
rarvideo myrarfile.r00

(Of course, rename “myrarfile.r00″ to the name of the .rar file you want to play).

I found this tutorial here and tried it myself and it works (i tested it on Ubuntu Intrepid)

Method 2:

This method uses Wine and RAR Movie player.

First, install wine:

Code:
sudo apt-get install wine

Then, download RAR Video Player from here, extract it and open it with Wine.

That’s it

2 Responses leave one →
  1. 2008 noiembrie 17

    I’m afraid I fail to see how this method can be described as ‘without extracting’.
    You extract on the fly, in memory, and not to disk, yes. But you still extract.

  2. 2008 noiembrie 17

    without waiting to extract. anyway, how would you name it?

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS