Log in

View Full Version : The new RARFileSource DirectShow filter.


Pages : [1] 2

OctaneSnail
22nd November 2008, 23:50
Keep your media neatly organised in RAR archives?

Wish you didn't have to spend time unpacking them before playback?

Try my new project: RARFileSource, instant playback of uncompressed multipart archives.

Find it at http://www.v12pwr.com/RARFileSource/

Enjoy!

/OctaneSnail

OctaneSnail
8th December 2008, 00:49
New version v0.9.3 released (2012-02-04):

Fixed problems loading archives containing a mix of media and non-media files.
Workaround to allow loading archives with missing LONG_BLOCK flag.
Workaround to allow loading any part in a multi-volume archive with MHD_FIRSTVOLUME incorrectly set on all parts.
A few minor bug fixes.
Big thanks to John Peterson for reporting the above problems and contributing patches to solve them.
Fixed loading archives with unknown file header data.
Be more lenient when loading multi-volume archives containing multiple files, if parts are missing, allow complete files found so far to play.

New version v0.9.2 released (2011-02-22):

Fixed loading of multivolume RARs that miss the EARC_NEXT_VOLUME flag.
Fixed "Overlapped I/O operation is in progress" error when opening archives.
Compiled using Visual Studio 2010.
Included 64-bit (x64) build.
Minor code cleanup and improvements.

New version v0.9.1 released (2009-02-28):

More thorough detection of the VC2008 runtime in the installer.
Fixed loading of old multivolume RARs without end-of-archive headers.
Code cleanup and refactoring.
A few minor bugfixes.

New version v0.9 released (2008-12-14):

Added a file selector, patch from OV2.
Added detection of media files using the same rules as the normal FileSource filter, again by OV2.
Fixed handling of archives and media files larger than 4 gigabytes, thanks to OV2.
Register all .r00 to .r99 extensions so that any part can be loaded.
Created an installer.
Numerous bugfixes.

New version v0.8.1 released (2008-12-08):

Improved handling of Matroska media files, thanks to OV2.
Fixed memory corruption when encountering RAR files with compression.
Fixed handling of multi-volume archives with new numbering scheme, thanks to OV2.
Any file in a multi-volume set can now be opened and reading will start from the first file. Caveat: Currently the filter does not automatically register itself to handle the extensions .r00 to .r99 so your video player won't open these files unless you manually associate the filter with them.
Git repository published.

Enjoy!

/OctaneSnail

Atak_Snajpera
8th December 2008, 01:04
Compressing already compressed files is absolutely ridiculous ...

LoRd_MuldeR
8th December 2008, 01:20
If WinRAR or any other file archiver is able to reduce the size of your media files to less than 99%, then the audio/video encoder that was used to create these files failed horribly!

The only reason I can think of to store media files in RAR archives is integrity checking. That or a rule #6 violation ;)

squid_80
8th December 2008, 07:12
I actually think this is pretty awesome. It's also great that it's GPL and the source code is available, but there might be a problem there since some source code of UnRAR is included; from the sounds of it the license for UnRAR is not GPL compatible hence any projects that use it cannot be licensed under GPL.
Still, great work all the same.

OctaneSnail
8th December 2008, 23:45
I actually think this is pretty awesome. It's also great that it's GPL and the source code is available, but there might be a problem there since some source code of UnRAR is included; from the sounds of it the license for UnRAR is not GPL compatible hence any projects that use it cannot be licensed under GPL.
Still, great work all the same.

The only thing included from the UnRAR source is a partial set of defines, which in my opinion doesn't fall under copyright so the UnRAR license doesn't apply. I included the original license note out of courtesy, not becasue I thought it was necessary.

It's too bad the UnRAR source has such a lame license, or I would have used it to implement support for compressed archives. To my knowledge there is no GPLed unrar implementation compatible with v3 around. I wish I had the time to try to revive the UniquE RAR File Library (unrarlib) project.

/OctaneSnail

squid_80
9th December 2008, 07:43
I'd say that's fine too; maybe prepend RFS_ to the defines to make them unique and ditch the UnRAR license, just in case.

FlimsyFeet
9th December 2008, 09:43
If WinRAR or any other file archiver is able to reduce the size of your media files to less than 99%, then the audio/video encoder that was used to create these files failed horribly!

The only reason I can think of to store media files in RAR archives is integrity checking. That or a rule #6 violation ;)
I can understand what you mean about rule #6, but this has legitamate uses as well - say you want to share your homemade videos with family and friends (footage you recorded yourself with a DV camera, compressed into a suitable format), you could STORE (i.e. no additional compression) them in a multipart RAR archive then upload the parts to Rapidshare or something (rather than keep as one big file which would probably be over the file size limit). The downloaders would then be able to play the video without extracting first.

Sagekilla
9th December 2008, 23:36
Except what you're describing is file sharing (read: illegal).

LoRd_MuldeR
9th December 2008, 23:44
Except what you're describing is file sharing (read: illegal).

File sharing itself isn't illegal. It depends on what files you share! But what he describes is clearly is a voilation: Uploading copyrighted material to a public server...

CruNcher
10th December 2008, 04:10
File sharing itself isn't illegal. It depends on what files you share! But what he describes is clearly is a voilation: Uploading copyrighted material to a public server...

if he would yes but i see no evidence for that assumption though maybe im blind :D

"say you want to share your home videos with family and friends"

in which state (country) is this illegal ? in germany that isn't illegal yet but who knows what comes in the future ;)

LoRd_MuldeR
10th December 2008, 04:14
if he would yes but i see no evidence for that assumption though maybe im blind :D

"say you want to share your home videos with family and friends"

in which state (country) is this illegal ? if it is in yours i would really think about leaving it soon ;)

If "home video" refers to videos he captured himself self at home, then he would be allowed to share these videos of course :D

But commonly "home video" refers to films and telemovies you buy on a VHS tape (or a DVD/BR disc nowadays) to watch them at your home.
And such material is definitely copyrighted and you aren't allowed to share it. In almost no country on this planet...

http://en.wikipedia.org/wiki/Home_video

CruNcher
10th December 2008, 04:25
Good thing we aren't in a courtroom, indeed i assumed he meant "home video" in the term "my own created non copyright violating private content" :)

AntiJw
10th December 2008, 07:59
..
The only reason I can think of to store media files in RAR archives is integrity checking.For that I prefer MD5 or SFV-files.

clsid
10th December 2008, 14:56
To make a static build:
UseOfMFC="1"
RuntimeLibrary="0"
AdditionalDependencies="strmbase.lib winmm.lib libcmt.lib kernel32.lib user32.lib advapi32.lib ole32.lib oleaut32.lib"

clsid
10th December 2008, 15:00
Some common file types that it currently does not yet support:
mp4, mpeg, ts, m2ts, wmv, hdmov, ogm, ogg

OctaneSnail
10th December 2008, 21:08
Some common file types that it currently does not yet support:
mp4, mpeg, ts, m2ts, wmv, hdmov, ogm, ogg

Most of those formats should just be a matter of adding the file extension along with the correct subtype to the s_file_types array. Feel free to give suggestions and I'll add them.

The wmv and asf formats are tricker since M$ in their infinite wisdom decided to make a combined source and splitter filter (WM ASF Reader) to handle them. I havn't yet investigated if there is a splitter only filter available that could be used in conjuntion with RARFileSource.

/OctaneSnail

Sagekilla
10th December 2008, 22:08
File sharing itself isn't illegal. It depends on what files you share! But what he describes is clearly is a voilation: Uploading copyrighted material to a public server...


Sorry, I should've been more clear. Yes, I meant that file sharing of copyrighted material like a movie is illegal.

AntiJw
11th December 2008, 01:00
Sorry, I should've been more clear. Yes, I meant that file sharing of copyrighted material like a movie is illegal.Doesn't that depend on which country you live in?!

setarip_old
11th December 2008, 01:12
@AntiJw

Hi!file sharing of copyrighted material like a movie is illegal.

Doesn't that depend on which country you live in?! No... (Perhaps you are thinking of backup copies you make for yourself)

AntiJw
11th December 2008, 07:20
Hey!
@AntiJw

Hi!

No... (Perhaps you are thinking of backup copies you make for yourself) Afghanistan: Copyright laws=0, no copyright. The first copyright law has yet to be passed.
Laos: Copyright laws=0, no copyright. The first copyright law has yet to be passed.
Marshall Islands: Copyright laws=0, no copyright. Copyright legislation is not known to exist.
.. although most countries got copyright-laws:
http://en.wikipedia.org/wiki/List_of_countries%27_copyright_length

squid_80
11th December 2008, 12:49
:goodpost:
Possible misuses aside, I wanted a x64 build so if anyone else wants it too: http://members.optusnet.com.au/squid_80/RARFileSource.ax
(Requires VS2005 x64 runtime.)

Ranguvar
14th December 2008, 02:50
Add support for tar, 7-zip, and lzma, and then you'll have an even more useful filter ;) LZMA > RAR in most situations. And, open formats are better than closed ones always :D

Good luck, and thanks!

Ábudos
14th December 2008, 05:08
I'm a fan of lzma myself. Much better compression than gz, much faster decompression speed than bzip2, I think it will eventually catch on.

clsid
14th December 2008, 15:57
I have never seen a video file that was packed with 7z. I have seen thousands that are packed with rar. So adding LZMA support is currently a huge waste of time.

Ranguvar
14th December 2008, 21:56
Ah, but if we are indeed discussing archives made by ourselves? Then it's completely legitimate, indeed, it makes more sense. And I'm not just talking about 7-Zip, I mean compressed tar archives as are familiar to Linux users (.tar.foo). gzip and bzip2 (tar.gz and tar.bz2) are the most popular now, but LZMA is gaining support.

squid_80
14th December 2008, 22:14
It's hardly worth discussing which compresses better when the filter doesn't decompress and we've established there's not much point trying to squash media files since they're pretty tight already.

OctaneSnail
14th December 2008, 23:54
Done whining about rule 6 and no compression? :sly:

Then grab version 0.9 (http://www.v12pwr.com/RARFileSource/) and enjoy!

/OctaneSnail

squid_80
15th December 2008, 00:51
Heh I mistakenly tried to open an archive that did use compression and got this error from mplayer2:

http://www.digitalfoundry.org/andrew/catastrophe.JPG

Gee sounds bad, I'd better click More Help (http://www.microsoft.com/windows/windowsmedia/player/webhelp/default.aspx?) to make sure nothing's broken:
You've encountered an error message while using Windows Media Player. Additional information is not currently available for this error.
The only thing that would make that text less helpful is having it read to me by a piece of stationery (http://en.wikipedia.org/wiki/Clippy).

Ranguvar
15th December 2008, 03:04
Good old MS... anyways...

Since compression is in the works, and a situation has already been discussed about how it may be useful if you read the thread, I think LZMA/TAR/7Z would be completely relevant.

I won't say any more on the subject, it's not a big deal to me personally. Again, thanks OP, and happy hacking.

clsid
15th December 2008, 13:38
As said before, compressing video files is insane. So there is no point in supporting compression algos that nobody is currently using for archiving videos (read: cut them in little pieces). Supporting compressed RAR archives is useful because sometimes people accidentally use compression instead of STORE when creating an archive.

yesgrey
15th December 2008, 16:26
I think 7z support is relevant. I stopped using rar in STORE mode. The 7z STORE mode is a lot faster! After each volume, rar takes lots of time in some tests, 7z doesn't, it's a volume after the other... Now I only use 7zip.

OctaneSnail
15th December 2008, 18:06
Heh I mistakenly tried to open an archive that did use compression and got this error from mplayer2:
...
The only thing that would make that text less helpful is having it read to me by a piece of stationery (http://en.wikipedia.org/wiki/Clippy).

I could let the filter show it's own more informative error message, there is no avoiding that useless message from mplayer though.

/OctaneSnail

squid_80
15th December 2008, 18:35
I could let the filter show it's own more informative error message, there is no avoiding that useless message from mplayer though.

I only posted it because I thought "Catastophic failure" was a pretty funny error message, rather than reporting a bug. I know it's just the host program overreacting, not an issue with the filter.

Ranguvar
16th December 2008, 02:10
I think 7z support is relevant. I stopped using rar in STORE mode. The 7z STORE mode is a lot faster! After each volume, rar takes lots of time in some tests, 7z doesn't, it's a volume after the other... Now I only use 7zip.

(Pure uncompressed) tar is even better for pure store :)

mikeathome
22nd January 2009, 17:06
Probably a bit OT, sorry for that...

Is there a chance to write a FileSourceFilter for ISO images. I would like to put my DVDs in ISO images on the NAS. So far the only Mediaplayer to handle them directly, I know of, is VLC.

MPC HC is my prefered, so I store folders (VIDEO_TS).

Will RARFileSource be able to play a DVD structure, stored in a RAR Container? Movie-Only would be fine but chapters are a MUST.

regards,
mike

lpcstr
23rd January 2009, 01:50
Probably a bit OT, sorry for that...

Is there a chance to write a FileSourceFilter for ISO images. I would like to put my DVDs in ISO images on the NAS. So far the only Mediaplayer to handle them directly, I know of, is VLC.

MPC HC is my prefered, so I store folders (VIDEO_TS).

Will RARFileSource be able to play a DVD structure, stored in a RAR Container? Movie-Only would be fine but chapters are a MUST.

regards,
mike

Now that actually seems quite useful. I no longer store my rips in ISO format, but for the longest time I did. A ISO filter would eliminate the step of having to mount the images with an ISO program and allow all media player to access the video directly.

mikeathome
23rd January 2009, 22:26
Now that actually seems quite useful. I no longer store my rips in ISO format, but for the longest time I did. A ISO filter would eliminate the step of having to mount the images with an ISO program and allow all media player to access the video directly.

Yes, my thoughts. I have a portable device (MVisto) which nicely plays ISOs as they are.

On the PC: well in Linux you can use the loopback device; in windows you use e.g. the Mount-Tool provided together with Slysoft's Virtual CloneDrive. A batch job can mount the ISO automatically and autoplay does the job, but still a kind of unhandy...

How do they do that in VLC? The VLC source code is available, isn't it?

But let's not hijack this thread, if anybody is interested in such thing let's open a new thread.


Back to topic:
WinRAR btw. opens ISOs, so is there a chance that functionality can be added to the RARFileSource filter?

mike

Ranguvar
30th January 2009, 04:21
IMO, mounting is the right way to do this. Even on Windows, mounting can be done in a fast single step. It's just the 'right way' from a technical standpoint - doing it through a filter would be an improper cludge.

Actually, you could probably completely replicate (and far more) all that this filter does using named pipes in Linux (not 110% sure if that will work with avs2yuv or similar in Wine), and probably in Windows too...

OctaneSnail
28th February 2009, 12:07
Hi folks!

Today I finally got around to releasing a long overdue update with some bug fixes here and there. See the second post for details.

Enjoy!

/OctaneSnail

asc28
19th September 2009, 11:00
Might anybody be able to supply an x64 build of the latest version? Would be much appreciated!

FredThompson
25th September 2009, 20:11
If WinRAR or any other file archiver is able to reduce the size of your media files to less than 99%, then the audio/video encoder that was used to create these files failed horribly!

The only reason I can think of to store media files in RAR archives is integrity checking. That or a rule #6 violation ;) True, there's negligible compression benefit but RAR as a container of multiple files has a benefit. I use ISO all the time for this with audiobooks, web code, etc. This method is great for ASX-linked file sets.

Pismo Mount supports mounting ISZ and ZIP which can be helpful. RAR supports a simple container so you could argue that it's a nice way to package video and subs into a single file. Some file cataloging programs will look inside ZIP and RAR so maybe an anime fansub person might find some benefit. Personally, I think a Windows driver to treat a container (rar, iso, zip, isz, etc.) as a folder/directory would be very useful. The limitation of all the virtual drives is they do not automatically "unmount" when the data isn't in use. In theory, you'd run out of drive letters.

FDisk80
20th January 2010, 23:04
Hi guys, is RARFileSource still being developed?
I'm having trouble opening large files with the 64-bit version.
Someone try playing a 1080p rar'ed movie. It's just does not work. If I'm not mistaken it will only play rar files if all on them together are less then ~4GB. :confused:

asc28
30th January 2010, 13:52
Haven't had this problem with the x86 version. Sure would love an updated build of the x64

FDisk80
8th March 2010, 22:10
This is so depressing. :( So is there any way to play large HD files with MPC-HC 64 bit without unraring the files?

thewebchat
9th March 2010, 01:08
I don't know... don't encode them with RAR in the first place? Oh wait...

FDisk80
9th March 2010, 01:19
I don't know... don't encode them with RAR in the first place? Oh wait...

srsly? Very Helpful.

kakoura69
28th March 2010, 05:33
there are some rars that rarfilesource and kmplayer wont run the videos within but xbmc will run them fine. ie *-immerse

FDisk80
28th March 2010, 08:10
there are some rars that rarfilesource and kmplayer wont run the videos within but xbmc will run them fine. ie *-immerse

Yes, XBMC is awesome with handling RAR's.
I wonder if whatever filter XBMC uses could be implemented with MPC-HC.

kakoura69
29th March 2010, 20:35
u can do the reverse : use mpc-hc instead of the default player of xbmc but that is not what i asked. i would love rarfilesource to add support for those other rars as well