Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

TranspRAR - RAR-workaround for Plex .9

alleusalleus Posts: 52Members, Plex Pass
edited January 2012 in Plex Media Center - Mac
[size="4]UPDATE - An experimental Lion-version of TranspRAR (0.1.2) is now online! The new version can be downloaded here. Note that I've switched from MacFUSE to OSXFUSE (see instructions section below). I'm not pushing this out on Sparkle just yet, since it's not tested very much yet.[/size]

Introduction

Hello everyone!

After trying out .9 I was sad to see that RAR-support wasn't built into the new Media Server. The reason for this I learned are many, and there isn't much hope for the implementation of this in future releases.

Since RAR-support is a big deal for me (one of the greatest features of the XMBC/Plex-concept if you ask me!) I decided to try to do something about it. Someone had an idea of mounting RAR-files as file systems, and I even found a link to a MacFUSE-project doing this, rarfs. The problem with this was that the process wasn't really streamlined, since it could only mount one RAR-file at a time (manually). But since MacFUSE is totally flippin awesum, and I had some time to spare, I made my own file system, and I call it TranspRAR!

rXEO.png

TranspRAR is meant to be dead simple. Most of you only have to do one thing. Launch it. When it's running, a new file system will be mounted on your mac (just like if you connect a USB-drive). On that file system, you will find a read only copy of your normal drive. You can browse and read files just as you would from the regular drive. But the magic apears when you locate a RAR-file. Because instead of finding the file, you will find the contents of that RAR-archive and the files can be opened just like any other file.

So how does this work with Plex? Pretty straight forward actually. Instead of choosing your regular Movie directory, you lauch TranspRAR and choose you Movie directory in the TranspRAR file system. Plex will have no idea that the movie files are actually located inside RAR-files.

Instructions

  1. If you haven't got it already, download and install MacFUSE Edit: Since 0.1.2, you will instead need the MacFUSE successor OSXFUSE (Lion compatible).
  2. Download and unpack TranspRAR (and double click TranspRAR.prefPane).
  3. You start TranspRAR through the System Preferences, and when you do, a new Finder window should pop up, containing the root (/) your regular drive.
  4. Open the Media Manager of Plex .9 and add a new Section.
  5. Fill in the details of the Section and when you add the folders containing the Media, browse into them through the TranspRAR file system instead of you regular drive. Can't find your files? See the questions below.
  6. Add the Section and let Plex scan and update everything (this will take a while).
  7. Hopefully everything went nice and dandy, and Plex will find all your movies, even the ones inside RAR-archives.


Questions

  • When TranspRAR is launched, I see a lot of strange files and folders (for example bin/opt/System/Volumes)! Where are my files?
    Locate the folder Users, inside that folder you will find another one with your login name. Open it and you should feel right at home.

  • How do I access my external drives, or network mounts?
    You should find these in the Volumes or Network folders inside the TranspRAR mount.

  • Does RAR-archives in parts work (either .r01, .r02 or .part001.rar, .part002.rar)?
    Yes.

  • Is any other archive formats except RAR supported?
    Yes, ZIP is supported as of 0.1. More formats will be added in the future.

  • What are the performance losses of playing through TranspRAR?
    These figures are taken from playing a 1080p Movie with a source bitrate of about 12 MBit/s (DTS audio+video) on my Intel Core 2 Duo 2.0 GHz Mac Mini.
    The file system takes about 30 MB of memory to keep running.
    When playing a non-archived file through the TranspRAR file system, TranspRAR works at about 0,3% CPU
    When playing an archived file through the TranspRAR file system, TranspRAR works at about 2,0% CPU

  • MacFUSE won't launch! What do I do?
    There have been reports of MacFUSE not working correctly with Mac OS X (both regular and server version) running in 64-bit mode. See this post from behe for more information.



Known Issues

  • TranspRAR can from time to time crash when switching between files in multiple part RAR archives (.r01, .r02, etc). This seems to be a memory issue, and is something I'm working on. If you have examples of archives that don't work, please PM me with some pointers!
  • If you access RAR archives over network (AFP/SMB/etc) TranspRAR has an annoying tendency to lock up. If you want to help out, please follow the instructions in this post and send me the result. Thank you! :)
  • Folders inside RAR-archives doesn't work at all at the moment.
  • Password-protected RAR-archives doesn't work.
  • Some RAR-archives that have strong compression seems to be acting a bit strange.
  • The Plex Media Server setting "Update my library when changes to my folders are detected" doesn't seem to work properly with the TranspRAR file system.
  • I had some issues building TranspRAR for any Mac OS X versions other than Snow Leopard. I will try to resolve this so everyone can use it.


Open Source info and credit

The source code for TranspRAR can be found on GitHub.

TranspRAR has been made possible with a few extraordinary frameworks. MacFUSE, the Fuse Mac port maintained by Google, was previously used to mount TranspRAR as a drive. Since MacFUSE since a while back is discontinued, I'm now using the successor OSXFUSE instead. I'm also using the awesome Objective-C wrapper/port XADMaster, made from libxad by Dan Ågren. XADMaster handles all the unarchiving goodness. I also use Sparkle to push out updates to all of you fancy users out there.

–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––

Edit: Added known issue with crash on launch
Edit: Updated Known Issues for Experimental 2
Edit: Added "archive files remain opened" to Known Issues.
Edit: Added problem with network mounted drives to Known Issues.
Edit: Added instructions to possibly solve "Could not read from input stream" errors.
Edit: Updated with version 0.1 information.
Edit: Added Open Source information.
Edit: Updated with version 0.1.1 information.
Edit: Updated with Experimental version 0.1.2 information.
«13456712

Comments

  • HatherleyHatherley Posts: 15Members
    Thank you! (Tack ;)
    As you sort of mention, this isn't the best solution but I'm so glad that unofficial support for RAR is being developed. I'll certainly install and try this out.

    Not to get off topic but...
    How come we are able to view the movies compressed in RARs using the regular file browsing system in Plex nine? I'm referring to this method: http://sourceforge.n....php?f=15&t=670

    If that's the case, how come adding the support is time consuming in the library browser? What am I missing?

    (... And yes, I might be flogging a dead horse here but I'm still hoping that the developers recognize that we are growing number of users who want the feature back.)
  • alleusalleus Posts: 52Members, Plex Pass
    Glad someone likes it, since I saw noone else working on some kind of RAR-support I thought why not give it a try :)

    The link you posted isn't working, but I'm assuming it is a way to get to the Plex .8-style File Manager. In that case, I'd bet that it's the old XMBC-code running under the hood. The library connections (what you get when you choose Movies in the root of Plex for example) is getting it's content from the Plex Media Server. The Media Server isn't a part of XMBC at all if I understand it correctly. So in other words, what you see inside the File Manager is coming from a completely different application than the library, thus making it kind of irrelevant.

    That being said, the developers behind Plex/XMBC is probably the most qualified people to implement RAR-support into the Plex Media Server. Some of them have been working with data streams from RAR-archives in the XMBC project, and there is alot of RAR-related code in the XMBC project.

    My little application is getting it's unRAR-power from a modified version of the official RARLAB source, and it's not perfect for the job.
  • xopherxopher Posts: 20Members
    Wow! Thanks for doing this! Now we're getting somewhere :) Keep up the good work, and hopefully we'll get it refined to a level of complete transparency!
  • alleusalleus Posts: 52Members, Plex Pass
    Glad you like my initiative ckarv :) I thought there was a little bit too much whining and too little attempts to come up with a solution in the forums.

    If you try it out and encounter any strange behavior (that's not already in the Known Issues in my post), please feel free to report :)
  • elanelan Sheriff of Plexville MauiPosts: 8,848Members, Plex Employee, Plex Pass, Plex Ninja Plex Employee
    alleus: You sir, are brilliant, and this is, in my opinion, the exact right way to go. Not only will it work with Plex, but also with other applications.

    I *knew* there was a reason why we loved our Swedish Plex users so much.

    Very well done!
  • elstreifelstreif Posts: 502Members ✭✭
    I'm curious and puzzled. Why is RAR support needed? I don't get it. Why would someone keep a video file (AVI, MP4, MKV) within a RAR archive? Just decompress it and the video file will work with Plex.

    Please enlighten me.
  • boots2xboots2x IP Challenged Ninja Posts: 1,184Members, Plex Pass, Plex Ninja Plex Ninja
    Hat's off to you sir! I don't use RAR files with Plex - I actually didn't even know that Plex .8 worked with RAR files the way it did! But for you to take the initiative and help the Plex community out this way is fantastic! Even though I won't be using your work, Thank You!!!

    James
  • petegaspetegas Posts: 37Members
    This is great work! You've got Elan's attention so it must be going in the right direction :) To answer the last question, the reason is many have hundreds or even thousands of videos (most likely TV episodes) inside .rar archives, as they come this way when downloaded, and 'just decompressing' is not that easy. Of course you can use a script to do it all for you, but every new one still needs the treatment. I'll keep an eye on these developments for sure.

    elstreif wrote on 08 September 2010 - 04:22 AM:

    I'm curious and puzzled. Why is RAR support needed? I don't get it. Why would someone keep a video file (AVI, MP4, MKV) within a RAR archive? Just decompress it and the video file will work with Plex.

    Please enlighten me.
  • cyantistcyantist Posts: 147Members ✭✭
    elstreif wrote on 07 September 2010 - 08:22 PM:

    I'm curious and puzzled. Why is RAR support needed? I don't get it. Why would someone keep a video file (AVI, MP4, MKV) within a RAR archive? Just decompress it and the video file will work with Plex.

    Please enlighten me.

    I know, there are MANY unrar apps for the Mac, for those that don't use a more elegant solution already (ie. SABNZBd), so I don't get what the big deal is, either.

    What's easier? Unraring your files (like you should, TBH), or whining/waiting for a plugin? I'm of the opinion that NOT unraring your downloads is bad practice on many levels. Although this is a step backwards IMO, I do applaude the effort, Alleus. Way to step up for the community!! B)
  • jayman978jayman978 Posts: 4,467Members, Plex Pass Plex Pass
    elstreif wrote on 07 September 2010 - 11:22 PM:

    I'm curious and puzzled. Why is RAR support needed? I don't get it. Why would someone keep a video file (AVI, MP4, MKV) within a RAR archive? Just decompress it and the video file will work with Plex.

    Please enlighten me.


    This has already been discussed at length here: http://forums.plexapp.com/index.php?/topic/15780-rar-issue/page__hl__rar. Please do not revisit the issue in this thread.
  • haagenhaagen Posts: 4Members
    Wow!

    You are my hero!

    I have not been able to test this one out, but it would be my first misssion when i get home.
    Finally maybe we can skip the 8 series.

    Do you have the skills to take a look at Spotify plugin aswell ?
    Dunno if Plex team is looking into that one.

    But i am willing to donate quite a sum to get it to work.

    Thanks for the superior effort!

    HA4g3n in Västerås!
  • behebehe Posts: 3Members, Plex Pass
    edited September 2010
    Great work, but unfortunately this crashes on launch on my Mac Mini. Are there any logs I should check for errors?
  • alleusalleus Posts: 52Members, Plex Pass
    behe wrote on 08 September 2010 - 08:25 AM:

    Great work, but unfortunately this crashes on launch on my Mac Mini. Are there any logs I should check for errors?

    My two first guesses for a reason would be:
    • Have you installed the latest MacFUSE?
    • Are you running Snow Leopard (Mac OS X 10.6)?

    If you indeed are fulfilling these two requirements, fire up the Finder, press Cmd-Shift-G and enter ~/Library/Logs/CrashReporter. Look for a TransRAR-file in the list and post it in the thread if you find anything.
  • alleusalleus Posts: 52Members, Plex Pass
    elan wrote on 08 September 2010 - 05:04 AM:

    alleus: You sir, are brilliant, and this is, in my opinion, the exact right way to go. Not only will it work with Plex, but also with other applications.

    I *knew* there was a reason why we loved our Swedish Plex users so much.

    Very well done!


    Wow, thank you Elan. Means alot coming from you ;)

    boots2x wrote on 08 September 2010 - 05:35 AM:

    Hat's off to you sir! [...]

    HA4g3n wrote on 08 September 2010 - 07:57 AM:

    Wow! You are my hero! [...]

    Thanks for the support. Always motivating to make your software better when you get response from the comunity.

    HA4g3n: I don't think a Spotify plugin would be outside my field of knowledge, but since I'm working alot (shameless plug for our company Appcorn) I can't do it all. :)
  • engessaengessa Posts: 17Members, Plex Pass Plex Pass
    Someone posted this link: http://hem.bredband.net/catacombae/jlrarx.html in the 'Please give us rar-support back-thread. Seems to me its almost the same approach as you are taking.
  • alleusalleus Posts: 52Members, Plex Pass
    engessa wrote on 08 September 2010 - 09:41 AM:

    Someone posted this link: http://hem.bredband.net/catacombae/jlrarx.html in the 'Please give us rar-support back-thread. Seems to me its almost the same approach as you are taking.

    That's correct. If you read my introduction, you will find that I even used rarfs as an inspiration (and starting point) for TranspRAR :)
  • Stevenson-PriceStevenson-Price Posts: 209Members, Plex Employee, Plex Pass, Plex Ninja Plex Employee
    Huh, I've always quite liked cool MacFUSE file systems and this strikes me as being quite awesome completely aside from adding RAR support to Plex!

    Genuinely awesome work... add zip, 7-zip and tar support and this would be just amazing! (I don't actually expect you to do this, as I assume it's probably a lot of work!)

    Nice job though, well done.
  • alleusalleus Posts: 52Members, Plex Pass
    Alex P wrote on 08 September 2010 - 10:57 AM:

    Huh, I've always quite liked cool MacFUSE file systems and this strikes me as being quite awesome completely aside from adding RAR support to Plex!

    Genuinely awesome work... add zip, 7-zip and tar support and this would be just amazing! (I don't actually expect you to do this, as I assume it's probably a lot of work!)

    Nice job though, well done.

    I actually think those compression methods will be easier than RAR to implement. I'll see what I can do when the current functionality is more robust. I've found some leads for more efficient RAR libraries.
  • NudgenudgeNudgenudge Master Synology Engineer Posts: 293Members
    I have to say, as one of the most "anti-RAR" guys: well done.
    Instead of complaining for support, you went and created a truly kick-ass external and re-usable solution. Not many people do that.

    So, tip of the hat to you, good sir. And thanks for this program (although, have to admit, I won't use it :D ).
  • behebehe Posts: 3Members, Plex Pass
    alleus wrote on 08 September 2010 - 08:54 AM:

    My two first guesses for a reason would be:
    • Have you installed the latest MacFUSE?
    • Are you running Snow Leopard (Mac OS X 10.6)?

    If you indeed are fulfilling these two requirements, fire up the Finder, press Cmd-Shift-G and enter ~/Library/Logs/CrashReporter. Look for a TransRAR-file in the list and post it in the thread if you find anything.


    I have installed MacFUSE-2.0.3,2 (latest) running on Snow Leopard Server.

    Attached log. Hope you can make something out of them. ;)
«13456712
Sign In or Register to comment.