Support for rarred vobsubs
#1
i always wanted support for rarred subtitles and was waiting for a long time for someone to implement it. well, it didn't happen, so i thought i'd give it a shot myself. i extended the chachesubtitles function a little bit. it now unrars vobsubs to the alternate subtitles directory and then caches them from there. i'm sure this could be done in one step, but it's not really necessary.

current limitation: the filename inside the rar must also correspond to the movie name, but i think i can fix that quite easily (hopefully tomorrow).
i haven't tested huge vobsubs yet (50mb+). i will post a patch on sourceforge tomorrow once i've tidied up the code a bit (it looks pretty crappy right now...) and did some more testing.
Reply
#2
:bowdown:  :bowdown:  :bowdown:  :bowdown:

is this really trueHuh this is the one feature i've been waiting since switching from xbmp... awesome work!!

-munde

note: i know development forums aren't meant for these kinds of comments, so feel free to delete this if seen necessary. just couldn't help myself  Smile
Reply
#3
does it work with multi language vobsubs?
i mean does it only load that certain language from the vobsub or does it load it fully into mem?
thats the reason for it causing to fail/crash with large (50+mb) vobsubs
Reply
#4
maybe you can check for one thing while you are working at the sub code.
we had "chunk loading" (dunno a better word for it) for subs some time ago. butcher added a way to only load the part currently needed so even 100mb subs would work.
but unfortúnatly it got broken somehow. Sad
read the xbmc online-manual, faq and search the forums before posting! do not e-mail the xbmc-team asking for support!
read/follow the forum rules! note! team-xbmc never have and never will host or distribute ms-xdk binaries/executables!
Reply
#5
does it work with winrar3 rars btw?
Reply
#6
first of all, i would like to say that i am no professional programmer whatsoever, my code is far from perfect, and this is the first thing i coded that i actually find useful. second, i would like to thank mxm (especially benjeremy) and unleashx for porting the unrar library by eugene roshal and making in publicly available.

the patch is on sourceforge: http://sourceforge.net/tracker....=581840

check the readme.txt for instructions.

this patch does: add unrar functionality to the cachesubtitles method.

if a idx/subtitle is found, it is copied to the alternate subtitles directory and then extracted there. this is done because this unrar library does not work directly from cd and possibly network.

after it is extracted (the whole process takes about 5 seconds for a 15 mb .sub file, which is acceptable i think, but there is still alot of room for improvements), it gets loaded normally.

the .idx/.sub are not deleted from the alternate subtitle directory when you finished the movie, in case you want to watch the movie again, there is no need to unrar it again, so you save about 5 seconds Wink you can still delete them manually with the filemanager if you feel like it.

current limitations / bugs:

it only works for filenames <= 42 chars (fatx limitation). - this should not be a big problem to fix.

it only works if the .sub filename inside the rar file also corresponds to the movie filename. - this shouldn't be too hard to fix either.

it does not work for very big subs (below 20 mb .sub file should not be a problem). this is not the problem of the unrar process, e.g. a 37 mb .sub file gets extracted successfully, but xbmc runs out of memory when trying to load it. i think this was fixed in a previous version of xbmc but now doesn't work anymore.

i don't know what happens or even bigger subtitles (50mb+, which would be more than the free memory before playing a movie). it probably can't even extract it then.

and yes, it does work for winrar 3 files.

post bugs and other issues here or in the sourceforge patch tracker.

update:
i fixed the first 2 issues, it now works for any filenames, and it also works if the .sub inside the rar doesn't have the same name as the movie.

i also tested a 100mb .sub file (compressed it was 20mb), it was extracted successfully (copying rar/idx from smb and then extracting took about 30 secs), however xbmc couldn't load it after that.
i hope butcher can fix that again, as i didn't really look at that part of the code (and don't really have the time or knowledge either). once we get that fixed, we have full unlimited support for vobsubs Smile

and btw, i forgot to mention in the instructions, that you need to change the dependencies in the vc project (project -> project dependencies) and make xbmc dependant from unrarxlib. otherwise unrarxlib isn't recompiled / relinked when you make changes to it.

i will post another patch on sourceforge once i cleaned up the code a bit (right now it is a mess as usual).
Reply
#7
apparently updating a post doesn't push it up. so i'm doing that now.



Reply
#8
(sergej @ oct. 31 2004,20:14 Wrote:i hope butcher can fix that again, as i didn't really look at that part of the code (and don't really have the time or knowledge either). once we get that fixed, we have full unlimited support for vobsubs Smile
i fixed it about 4 times the first time round, if it's broken now it's staying broken. :p
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#9
pppppppppplllllllllllllllllllllllllzzzzzzzzzzzzzzz fix it, im begging you :bowdown:

:lol:
Reply
#10
posted the new patch on sourceforge (still http://sourceforge.net/tracker....=581840 )

Quote:if a idx/rar subtitle is found, files copied to the alternate subtitles directory and then extracted there. filename is truncated to 42 chars and illegal chars are removed. for the extracted .sub, the same filename is used as for the rar, so it can e.g. be named vts_02_0.sub. it's like dvobsub, that works with those files, too.

after it is extracted (the whole process takes about 5 seconds for a 15 mb .sub file, which is acceptable i think, but there is still alot of room for improvements), it is loaded normally.

the .idx/.sub are not deleted from the alternate subtitle directory when you finished the movie, in case you want to watch the movie again, there is no need to unrar it again, so you save about 5 seconds Wink you can still delete them manually with the filemanager if you feel like it.

known bugs:

it does not work for very big subs (around 20 mb .sub file should not be a problem). this is not the problem of the unrar process, e.g. a 100 mb .sub file gets extracted successfully, but xbmc runs out of memory when trying to load it.
i think this was fixed in a previous version of xbmc but now doesn't work anymore.
Reply
#11
is it gonna be added?
Reply

Logout Mark Read Team Forum Stats Members Help
Support for rarred vobsubs0