Play movie files in multi-file .rar archives

Feature requests for VLC.
Sparks

Play movie files in multi-file .rar archives

Postby Sparks » 05 Mar 2006 22:56

This topic is a continuation of a previous topic which was locked.
I must say that videolan is a robust video player. Thanks to everyone for working so hard to make the best video player!

It has all the features you could ever want. Except one:

* Play movie files in multi-file .rar archives. So it will play a movie that is split up in .rar,.r01,r02,etc.

Also if, possible with seeking in movie.

Thanks & Bye!
I have discovered some new information that makes it possible to add this feature thus making a thread like this not a waste of the developers time, namely i have found the location of a GPL Library to decode RAR files.

This is part of the XBMC sourcecode and XBMC can currently play muti part rar files instantly (if rar is not compressed) or will cache/unrar (if rar has compression).

This is extremely handy for watching multi-part rar videos that are commonly sourced on the internet.

Anyway onto the code ;)

http://cvs.sourceforge.net/viewcvs.py/x ... 4&view=log

http://cvs.sourceforge.net/viewcvs.py/x ... 4&view=log

http://cvs.sourceforge.net/viewcvs.py/x ... 9&view=log

http://cvs.sourceforge.net/viewcvs.py/x ... 2&view=log

http://cvs.sourceforge.net/viewcvs.py/x ... 6&view=log

http://cvs.sourceforge.net/viewcvs.py/x ... 5&view=log

There is also ZIP support added in the same directory as the RAR Libs.

Thanks for a great program devolopers I hope you can add the feature I desire most!

Sparks

tonsofpcs
Cone that earned his stripes
Cone that earned his stripes
Posts: 363
Joined: 04 Jan 2006 10:03
Location: Binghamton, NY, USA
Contact:

Postby tonsofpcs » 06 Mar 2006 18:38

@J.C. This might be possible, but I don't think that anyone in the team is willing to spend time on this. We are always open for patches though.
The development on VLC is mostly done by the principle "implement what you personally need". Most of us think that they don't need this, ergo they don't implement it.
Additionally, a media player isn't responsible to extract files automatically. That's the special field of a decompression-application in my opinion. If we were implementing complete rar-support, the next time people would ask us to implement zip-support, etc. pp. so we would end up with a huge app which can decrypt everything, although these features are used by very few people only, because most of our users download VLC to be able to play movies, not to decompress movies.
So feel free to write a patch and submit it :)

Guest LX

Postby Guest LX » 10 Mar 2006 02:12

There's no need for a library. As one person noted in the previous thread:

"Scene releases are released in .rar uncompressed format just for ease of transport over the net and to fit in with scene rules."

So the files are just "split files". VLC is often able to play *.part1.rar because it auto-detects the file type (which is always awesome!!!). To play all the files, it would simply need the logic: "Ok, I'm currently playing *.part1.rar, IF the next file is *.part2.rar, THEN I'll just treat the two files as one continuous file".

The same logic applies to pure split files *.001, *.002, ...

Guest LX

Postby Guest LX » 10 Mar 2006 03:09

Well, it might be a little more complicated than what I stated above.

For example, VLC might not be able to play *.part1.rar of a WMV file (not able to play the partial WMV file). However, it could be smart enough to look for the very last rar file, *.partN.rar, to get the necessary stream info.
(I'm assuming the stream info is contained in the last file, I'm an idiot so I dont know for sure).

If it just treats the collection of RARs as one big file, then we're golden baby 95% of the time.

tonsofpcs
Cone that earned his stripes
Cone that earned his stripes
Posts: 363
Joined: 04 Jan 2006 10:03
Location: Binghamton, NY, USA
Contact:

Postby tonsofpcs » 11 Mar 2006 00:34

Multi-part RARs are not simply split files. Some people rename their split files to ".rar" to make it easier for them to use WinRAR to re-join the files, but these are not the same.

Guest

Postby Guest » 11 Mar 2006 01:01

Multi-part RARs are not simply split files. Some people rename their split files to ".rar" to make it easier for them to use WinRAR to re-join the files, but these are not the same.
The "Store" format is typically used as the compression format for movies posted on Usenet and elsewhere. So, they are basically split files. Anybody that applies compression to a movie file is wasting everyone's time. VLC should not cater to such idiots.

Guest

Postby Guest » 11 Mar 2006 01:27

Well, I guess there's a slight difference between a "split file" and a "stored RAR file", but only in the first or last few bytes.

Currently, it's already possible to drop a rar file (of the proper movie format) in the "store" format onto VLC and it will play it.

What I'm suggesting is that VLC recognize the *.part#.rar pattern to find the index of a DIVX or WMV file, etc (i.e., treat the collection of files as one file).

It's just a time saver for people who don't want to create a 4.7GB file after they've downloaded 97 or so 50MB segments (it's also much easier on the HD). (Beating a dead horse here, I know)

The DJ
Cone Master
Cone Master
Posts: 5987
Joined: 22 Nov 2003 21:52
VLC version: git
Operating System: Mac OS X
Location: Enschede, Holland
Contact:

Postby The DJ » 13 Mar 2006 00:53

No one ever said it wouldn't be done.
However:

1 it's a very low priority
2 it's a terrible idea because people will start to put more .rar content in the wild, which is not what is the intention, but it is the result.
3 no one that wants this is a coder able to do this.
Don't use PMs for support questions.

Sparks

Postby Sparks » 17 Apr 2006 09:01

So a lot of people responded.

It seems an application has been released to do what I wanted, although unfortunately its for mac os x only atm.

Has anyone the time/patience to release this for windows?

A link to the application:

http://vlcrarloader.jjabba.com

Guest

Postby Guest » 17 Apr 2006 20:41

This is a must have function. You should see this in action on XBMC. It's amazing. What is almost more amazing is that it exists on xbox and not yet for windows. What are the odds of that, haha.

You guys have my support on this. Must have function!!!!!

/Michael

Guest

Postby Guest » 18 Apr 2006 11:18

Yes I agree...the way XBMC handles RAR files is amazing, my primary reason for requesting this is that 100% of all the video I download is in RAR format.

It takes quite a bit longer to load videos on a 3.2GHZ PC than it does on a 700Mhz Xbox.

If I could code myself I would add this feature, but alas I code like a dodo.

Sparks

Postby Sparks » 18 Apr 2006 20:37

Well.....I found two ways of doing this.

1. Using this version of MPlayer http://mplayer.sunset-utopia.homeip.net/

Get these files and install them in this order:
a. mplayer-win32-cygwin-dev-cvs<latest_date>.exe
b. mplayer-win32-mingw-dev-cvs<latest_date>.exe

Get Cygwin and Install it, in C:\cygwin\bin (or wherever you installed it) you will find one of the files required to get Mplayer working called "cygncurses-8.dll", copy this file into your mplayer directory.

Install WinRAR.

Check that play_rar.bat is setup correctly and drag and drop your RAR file onto it.

2. This method uses VLC (by far my preferred player) , but unfortunately (for me anyway) you will get skipping.

a. Install VLC
b. Install WinRAR to a temp folder.
c. Install mplayer-win32-mingw-dev-cvs<latest_date>.exe. to a temp folder.
d. Copy unrar.exe from your winrar install to VLC install.
e. Copy play_rar.bat from the Mplayer install to your VLC directory and change paths to match as well as change mplayer.exe to vlc.exe
f. Drag and drop RAR files onto this batch file.

I hope someone uses these to create a better solution, just thought I would share my progress.

Sparks

sparks
Blank Cone
Blank Cone
Posts: 14
Joined: 19 Apr 2006 13:33

Postby sparks » 22 Apr 2006 07:39

Well......

I went away determined to make playing video files easier.

I needed to learn programming to do this.....so I went to what I thought would be the easiest.....Java.

I have created a Java based executable that plays rar files, it needs to be in the same directory as MPlayer with UNRAR.exe.

RARPlayer can open your RAR File with either "Open with" or Drag and Drop from explorer.

Click play

Go here to get:

http://sourceforge.net/project/showfile ... _id=167742

Look forward to hearing feedback!
Last edited by sparks on 18 May 2006 14:32, edited 2 times in total.

eiduag

Playrar.bat

Postby eiduag » 22 Apr 2006 16:02

The simplest way to play rar files with mplayer is:

1. Download mplayer binaries and codecs:
http://www.mplayerhq.hu/

2. Download WinRAR:
http://www.rarlab.com/

3. Put the following in a bat file on your desktop and edit accordingly

Code: Select all

"%Path to Winrar%\unrar.exe" p -inul "%1" | "%Path to mplayer%\mplayer.exe" -
The unrar executable is freeware and open source and can be found in many places, most people who would want to do this probably have WinRAR installed already.

Play_rar.bat can also be used with vlc but it stutters and I couldn't get it to work properly.(Just change the path to mplayer so it point so vlc to try)

Regards,
Eidur

sparks
Blank Cone
Blank Cone
Posts: 14
Joined: 19 Apr 2006 13:33

Postby sparks » 22 Apr 2006 17:17

Yes you can use the more frequently updated default mplayer binaries with that batch file.

I also updated my RARPlayer and it can now support associations with your RAR files.

Still I cannot fix the stuttering with VLC.

Note to developers: Is there someway to allow VLC to not stutter when receiving a data redirect from UNRAR.exe?

I am sure the reason mPlayer does not stutter is due to the Buffer Cache (8MB in size I believe).

--file-caching is it! Now you can play without stutter!

Edit: Added note about buffer.
Edit: --file-caching comment
Last edited by sparks on 22 Apr 2006 18:59, edited 1 time in total.

sparks
Blank Cone
Blank Cone
Posts: 14
Joined: 19 Apr 2006 13:33

Postby sparks » 22 Apr 2006 18:57

Well I found the fix to enable this to work with VLC Media Player!

1.
Download UNRAR here: http://www.rarlab.com/rar/unrarw32.exe and extract into your VLC Directory.

2. Download VLCRAAR here: http://sourceforge.net/project/showfile ... _id=167742 and extract into your VLC Directory.

3. Drag and Drop RAR Files onto it open the rar file with it.

This took me ages of digging/coding to find so I hope you enjoy!
Last edited by sparks on 18 May 2006 14:31, edited 2 times in total.

J5

THank YOu

Postby J5 » 24 Apr 2006 01:07

Sparks!!!

THank YOU FOR that it works Great!!!

I too think this is must have feature. XBMC was my perferred method of watching video until I got my Widescreen laptop. I also love VLC(Cant get any better than this).

Thanks,
Jason,

sparks
Blank Cone
Blank Cone
Posts: 14
Joined: 19 Apr 2006 13:33

Postby sparks » 27 Apr 2006 06:06

Glad you like it, if you can program please help me tidy it up :)

I would like the few lines of code I made into a simple program, being added into VLC (although I am aware Java is not the same thing as C++)

All it really needs is something along these lines:

Code: Select all

if file = .rar { if unrar.exe exists { unrar -p -inul "file.rar" [data redirected into vlc with some caching] } }

tonsofpcs
Cone that earned his stripes
Cone that earned his stripes
Posts: 363
Joined: 04 Jan 2006 10:03
Location: Binghamton, NY, USA
Contact:

Postby tonsofpcs » 30 Apr 2006 04:07

Code: Select all

if file = .rar {
fair enough

Code: Select all

if unrar.exe exists {
ok, a bunch of proprietary filesystem calls, but we probably have what it takes to check already. fair enough

Code: Select all

unrar -p -inul "file.rar"
ah, calling another BINARY from within one... nice memory hogging and system waiting...
[data redirected into vlc with some caching]
and here is the major problem. Data redirection and caching -- how much? how long? how fast can your machine unrar? how will vlc know?

sparks
Blank Cone
Blank Cone
Posts: 14
Joined: 19 Apr 2006 13:33

Postby sparks » 30 Apr 2006 11:03

In my experiments anything under 1000ms worth of cache has lag.

The ideal level was at around 1500 but I used 2000ms just to be sure.

Although I am aware your post was not a question, but a statement.

tonsofpcs
Cone that earned his stripes
Cone that earned his stripes
Posts: 363
Joined: 04 Jan 2006 10:03
Location: Binghamton, NY, USA
Contact:

Postby tonsofpcs » 01 May 2006 17:15

In my experiments anything under 1000ms worth of cache has lag.

The ideal level was at around 1500 but I used 2000ms just to be sure.

Although I am aware your post was not a question, but a statement.
What about on an 80586/133 with 16 MB of RAM? Will we see the same cache working?

ipkiss
Big Cone-huna
Big Cone-huna
Posts: 695
Joined: 23 Nov 2003 01:49

Postby ipkiss » 01 May 2006 21:19

That could be made configurable easily...

sparks
Blank Cone
Blank Cone
Posts: 14
Joined: 19 Apr 2006 13:33

Postby sparks » 02 May 2006 10:12

I released a new version of both the RARPlayer (MPlayer) and VLCRAAR!(VLC) RAR Players.

Backgrounds/Icons have been redone to be more efficient and improve look.

0.2

Improved: Background Image
Added: Program starts centred
Fixed: Image not correctly fitting within border
Removed: Unnecessary code

Thanks for keeping up with the thread developers!

I like seeing the interest being stirred in this feature!

jeff-o

Registry key for right clicking

Postby jeff-o » 08 May 2006 14:30

I released a new version of both the RARPlayer (MPlayer) and VLCRAAR!(VLC) RAR Players.

Backgrounds/Icons have been redone to be more efficient and improve look.

0.2

Improved: Background Image
Added: Program starts centred
Fixed: Image not correctly fitting within border
Removed: Unnecessary code

Thanks for keeping up with the thread developers!

I like seeing the interest being stirred in this feature!

The new version of your VLCRAAR seems to work fine. It would be nice if you could add the feature of just start playing the file as you drag it to the vlcraar.exe, without showing the application window (file path and play button). IE: Only show the "file path/play-window" if the application didn't get any argument when it was executed.

I made a registry key for all you who are too lazy to actually enter the folder and then open the rar files. Just right click on the folder containing splitted into rar-archives and select

Play with VLCRAAR

It has only been tested on my english windows xp where the default VLC installation directory is "C:\Program Files\VideoLAN\VLC". If you have installed your VLC to any other directory, just change the folder where your vlcraar.exe is located in the .reg-file.

Copy and paste the following into an text file, rename it to whatever.reg and run it.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\VLCRAAR.Play]
@="Play with VLCRAAR"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\VLCRAAR.Play\command]
@="\"C:\\Program Files\\VideoLAN\\VLC\\vlcraar.exe\" \"%1\""

sparks
Blank Cone
Blank Cone
Posts: 14
Joined: 19 Apr 2006 13:33

Postby sparks » 09 May 2006 05:04

New version released:
0.3

Starts VLC automatically if a RAR is drag and dropped onto
VLCRAAR or if a RAR is opened with VLCRAAR
Shame i cant fix the seeking/avi is corrupted bugs, although this problem is shared with MPlayer it is not shared with XBMC.

(I have also applied for a Sourceforge account so hopefully will have a proper webpage for this soon.)


Return to “VLC media player Feature Requests”

Who is online

Users browsing this forum: No registered users and 14 guests