kenygia / xy-vsfilter

Automatically exported from code.google.com/p/xy-vsfilter fork:xy-vsfilter-2015-05-04-rc
GNU General Public License v2.0
0 stars 0 forks source link

RAR Archive Support #117

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I am told that at some point in the past, vsfilter was capable of 
automatically extracting subtitle files from RAR files.
2. It isn't clear if this was supported for all subtitle formats, but it was 
supported at least with DVD subtitle format (two files, an .IDX file and a 
.SUB, usually rared).
3. I was wondering what happened to this capability?

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide related subtitle script (if any). And the less characters
the script is, the less effort I have to make to fix the issue, so if you
could make the script as simple as possible, that would be appreciated.

Please provide any additional information below.

Original issue reported on code.google.com by forum.an...@gmail.com on 14 Sep 2012 at 10:42

GoogleCodeExporter commented 9 years ago
Minor clarification to the above (I don't think posts can be edited once they 
are made) - the .idx file is external, and the .sub file is RAR'ed.

Original comment by forum.an...@gmail.com on 14 Sep 2012 at 12:05

GoogleCodeExporter commented 9 years ago
> I was wondering what happened to this capability?

Nothing happened to it, all versions of VSFilter (including xy-VSFilter) still 
support .sub in RAR. It requires unrar.dll to be in your system directory 
(SysWOW64 on Windows x64 | System32 on Windows x86) for it to work.

Original comment by cyber.sp...@gmail.com on 17 Sep 2012 at 10:55

GoogleCodeExporter commented 9 years ago
Hm, it doesn't seem to work for me. I found a test file, and have the RAR file 
(with idx and sub inside it) in the same folder as the video file. This is 
using Zoom Player - and I also tested with idx outside the RAR file. unrar.dll 
is installed on my system (WinRAR user, already in the SysWOW64 folder).

So is there anything particular you need to do to make this work? Zoom Player 
uses v3.0.0.65.

Original comment by forum.an...@gmail.com on 11 Oct 2012 at 11:22

GoogleCodeExporter commented 9 years ago
Only the .sub can be in the RAR, and the .idx needs to be external. Otherwise 
it follows the same rules as loading other external subtitles, requiring the 
idx and rar to have an identical filename to the video (excluding file 
extension).

Are you positive you have the unrar.dll 32-bit version in your SysWOW64? You 
mention you are a WinRAR user, but the WinRAR installer doesn't include or use 
unrar.dll.

I've tested and can confirm this works in ZoomPlayer 8.16 & 8.5RC1, MPC-HC, and 
WMP12 with xy-VSFilter.

Original comment by cyber.sp...@gmail.com on 11 Oct 2012 at 12:07

GoogleCodeExporter commented 9 years ago
Yes, unrar.dll was already in SysWOW64 - I didn't put it there manually, I 
assume WinRAR installed it. If WinRAR didn't install it, I have no idea how it 
ended up in that folder. I'm not sure if it was the 32bit or 64bit version 
though, as WinRAR has both a 32bit and 64bit version, and I have 64bit 
installed. To rule that out as the cause of the problem, I manually copied over 
the 32bit .dll (from WinRAR's website) to SysWOW64 - nothing changed, RAR 
subtitles still do not work.

I then removed the .idx from the RAR file - so only the .sub is in the RAR, and 
the .idx is outside that. Still does not work.

The filenames of the RAR, the .idx and the video file are all the same, except 
for uppercase/lowercase (Windows doesn't differentiate case anyway), and they 
are all in the same folder.

Using Zoom 8.5 RC1, and vsfilter (from Zoom's Install Center) with nothing 
changed in vsfilter's options from what Install Center uses.

Apart from that .dll not being 32bit (which I ruled out anyway by copying the 
32bit version over the top of it), I can't think of any reason why it isn't 
working for me, but is for you. bLight (Zoom's dev) asked me to see if I could 
get this feature to work, as if it does work, he wants to add unrar.dll to the 
xy-vsfilter installer so Zoom users can make use of it. I will let him know the 
you were able to make it work with Zoom, even though it doesn't work on my 
system.

Original comment by forum.an...@gmail.com on 12 Oct 2012 at 8:00

GoogleCodeExporter commented 9 years ago
Just to confirm.

The idx+sub are able to be loaded as external subtitles when not in the RAR?

You are not able to get this to work in either xy-VSFilter or MPC-HC VSFilter?

You've tried media players other than ZoomPlayer and still none work?

unrar.dll only exists in a single directory on your computer?

The unrar.dll you have in your SysWOW64 directory is the same as the one I've 
attached? If you instead place it in System32 does it work? If you instead 
place it in C:\Windows does it work? If you instead place it in the same 
directly as zplayer.exe does it work?

If none of these work, it makes it sound like you have a serious issue with 
paths on your system. You may want to open an administrative cmd prompt and run 
'sfc /scannow' without quotes to check if any settings or files are 
missing/corrupted.

The VSFilter unrar code is very simple. 
If an .idx or .ifo is found without a .sub, look for a .rar
If a matching .rar exists load unrar.dll with LoadLibrary
Read .sub from .rar and load with .idx or .ifo as external subtitles

In any case, for our next stable release we were planning to include unrar.dll 
in the installer distributed here as well, since it sounds like this is a 
feature people actually use.

Original comment by cyber.sp...@gmail.com on 12 Oct 2012 at 8:54

Attachments:

GoogleCodeExporter commented 9 years ago
I did just now get it working. There are two conditions required for this to 
work:

1. IDX is not listed as a subtitle format in Zoom's options - you have to add 
it manually. Advanced Options-->File Format Association-->File Extensions.

2. The RAR file cannot be compressed. It has to be created as 'store only' in 
WinRAR.

Both conditions have to be satisfied - even if you manually add IDX as a 
subtitle format, the subtitles will not show if the RAR is compressed in any 
form. The unrar.dll also has to be in SysWOW64 - it will not work in system32, 
nor will it work in the same folder as VSFilter.dll (C:\Program Files 
(x86)\DirectVobSub by default).

Original comment by forum.an...@gmail.com on 12 Oct 2012 at 10:19

GoogleCodeExporter commented 9 years ago
Oh, and the unrar.dll I used was the one from the WinRAR website:
http://www.rarsoft.com/rar_add.htm (second file from the top, "UnRAR dynamic 
library for Windows software developers.")

That is a different version to the one already in my SysWOW64 folder. 
v4.20.100.526 from the WinRAR website, v4.20.2.502 was already in SysWOW64.

Original comment by forum.an...@gmail.com on 12 Oct 2012 at 10:24

GoogleCodeExporter commented 9 years ago
Oh, and one other condition:

3. The filename for the RAR and IDX is case sensitive for xy-vsfilter. e.g. if 
the video file is named Test.avi, the IDX is named test.idx and the RAR file is 
named test.rar, it will not work. The filenames have to match exactly, 
including case sensitivity.

Original comment by forum.an...@gmail.com on 12 Oct 2012 at 10:38

GoogleCodeExporter commented 9 years ago
There is still something strange is going on with your system.

> IDX is not listed as a subtitle format in Zoom's options 
> - you have to add it manually.

It works for me on multiple systems with a default Zoom Player installation 
using default settings, without any need to manually add anything.

It does appear that if you use FFDShow, it prevents DirectVOBSub(auto-loading 
version) from loading with ZoomPlayer in this case though. Though that would be 
a ZoomPlayer bug, since it works just fine in MPC-HC and WMP12.

> The RAR file cannot be compressed.
> It has to be created as 'store only' in WinRAR.

This is incorrect. The entire point is to use RAR compression, and it works 
just fine on my systems.

Please upload the .idx + compressed .sub in RAR which you claim doesn't work.

> The filename for the RAR and IDX is case sensitive for xy-vsfilter.

This is incorrect as well. DirectVOBSub(auto-loading version) doesn't care 
about case-sensitivity, if you have a video name TeSt it will still auto-load 
external subtitles names like tEsT.idx + tEsT.rar.

Are you using an anti-virus or other security software which could be locking 
down your system? If you disable real-time scanning/protection temporarily, 
does anything improve? I could theorize that an anti-virus locking access the 
RAR for too long, while it scans it for viruses, may cause VSFilter fail to 
loading it.

Original comment by cyber.sp...@gmail.com on 12 Oct 2012 at 9:09

GoogleCodeExporter commented 9 years ago
Issue 123 has been merged into this issue.

Original comment by cyber.sp...@gmail.com on 12 Oct 2012 at 9:13

GoogleCodeExporter commented 9 years ago
> It works for me on multiple systems with a default Zoom Player installation 
using default settings, without any need to manually add anything.

Strange - three separate (and default) Zoom installs here (Free, Pro and MAX 
versions), and none of them list IDX by default.

> It does appear that if you use FFDShow, it prevents DirectVOBSub(auto-loading 
version) from loading with ZoomPlayer in this case though. Though that would be 
a ZoomPlayer bug, since it works just fine in MPC-HC and WMP12.

Thanks, I will pass that onto Zoom's dev next time I am talking to him.

> This is incorrect. The entire point is to use RAR compression, and it works 
just fine on my systems.
> Please upload the .idx + compressed .sub in RAR which you claim doesn't work.

Yes, just now verified that compressed is ok - it was the case sensitivity (see 
next reply below) that was preventing it from working with a compressed RAR 
file.

> This is incorrect as well. DirectVOBSub(auto-loading version) doesn't care 
about case-sensitivity, if you have a video name TeSt it will still auto-load 
external subtitles names like tEsT.idx + tEsT.rar.

It seems to be case sensitive here (Win 7 64bit). Now that I know that it is 
not meant to be, I will do some more testing.

> Are you using an anti-virus or other security software which could be locking 
down your system? If you disable real-time scanning/protection temporarily, 
does anything improve? I could theorize that an anti-virus locking access the 
RAR for too long, while it scans it for viruses, may cause VSFilter fail to 
loading it.

I do run Microsoft Security Essentials as an anti-virus, yes. However, it does 
not scan archive files to my knowledge, only executables.

Original comment by forum.an...@gmail.com on 13 Oct 2012 at 1:44

GoogleCodeExporter commented 9 years ago
> none of them list IDX by default

Correct. It works on my systems with the ZoomPlayer default subtitle formats, 
which doesn't include IDX.

When you add IDX to ZoomPlayer to make it work for you, what is VSFilter lised 
as under filters? "DirectVobSub", "DirectVobSub(auto-loading version)", or 
"DirectVobSub(forced auto-loading version)"?

I don't believe that re-installing ZoomPlayer resets your configuration 
settings. I would suggest that export a backup of your ZoomPlayer settings, 
exit ZoomPlayer, delete the ZoomPlayer settings registry key from 
[HKEY_CURRENT_USER\Software\VirtuaMedia], and restart ZoomPlayer. Also delete 
the VSFilter settings registry key 
[HKEY_CURRENT_USER\Software\Gabest\VSFilter]. That should restore everything to 
default settings. I'd be curious if everything at defaults somehow made it work 
for you. If everything at defaults doesn't work, have ZoomPlayer auto-configure 
SmartPlay and try again. Next try disabling SmartPlay.

> It seems to be case sensitive here (Win 7 64bit).
> Now that I know that it is not meant to be, I will do some more testing.

I'm unsure what could cause it behave differently on your system. Honestly, I'm 
unsure if this is intended or not, since we haven't touched any code related to 
loading external subtitles. It does load external subtitles in case-insensitive 
fashion on my system though.

Does changing your system locale to "English (United States)" make it work?

> I do run Microsoft Security Essentials as an anti-virus, yes. 
> However, it does not scan archive files to my knowledge, only executables.

Even so, try adding exceptions for zplayer.exe as well as the Directory which 
contains the video + subtitles which you are testing. Need to rule this out 
somehow.

Original comment by cyber.sp...@gmail.com on 13 Oct 2012 at 3:25

GoogleCodeExporter commented 9 years ago
> When you add IDX to ZoomPlayer to make it work for you, what is VSFilter 
lised as under filters? "DirectVobSub", "DirectVobSub(auto-loading version)", 
or "DirectVobSub(forced auto-loading version)"?

Just "DirectVobSub". It definitely does not work here unless IDX is added to 
the subtitle formats.

> I'm unsure what could cause it behave differently on your system. Honestly, 
I'm unsure if this is intended or not, since we haven't touched any code 
related to loading external subtitles. It does load external subtitles in 
case-insensitive fashion on my system though.

I have now discovered that it is not case sensitive after all. Despite having 
checked the filename of the RAR file over a dozen times previously (and noticed 
nothing wrong with it), I checked it again in a new round of testing - there 
was a minor difference in the RAR filename to the IDX and AVI filename. After 
correcting that, it seems that yes, filenames are not case sensitive.

I just wanted go to get some more information on the ffdshow bug if I could. Is 
it the ffdshow decoders that are blocking DirectVobSub, or the ffdshow subtitle 
filter? Also, this is with DirectVobSub set as the subtitle rendered in 
Advanced Options-->Playback-->Video-->Subtitles? And is the "Disable FFDShow 
subtitle rendering when using VobSub as the Preferred subtitle renderer" option 
enabled or disabled?

bLight and myself are just puzzled as to how ffdshow is blocking DirectVobSub, 
and we want to reproduce it if we can (so bLight can fix it), as neither of us 
has seen this problem, nor heard anyone else report it other than yourself. So 
as much detail as is required to reproduce it would be great.

Original comment by forum.an...@gmail.com on 13 Oct 2012 at 11:46

GoogleCodeExporter commented 9 years ago
> I have now discovered that it is not case sensitive after all.

Good.

> Just "DirectVobSub"

If you only see DirectVobSub, it means that ZoomPlayer is manually loading into 
the graph both xy-VSFilter and the subtitles. This is why you need IDX set in 
ZoomPlayer subtitle formats.

When you see DirectVobSub (auto-loading version) it means that xy-VSFilter is 
auto-loading both itself and the subtitles using its own logic. This is why I 
don't need IDX set in ZoomPlayer subtitle formats.

What caused this is difference is mutli-fold. First, the ZoomPlayer install 
center doesn't detect LAV Video & LAV Audio installed separately with the 
official installer. Second, ZoomPlayer's SmartPlay auto-configure doesn't 
detect disabled formats in FFDShow. This caused ZoomPlayer to misconfigure 
SmartPlay with formats I had disabled in FFDShow, instead of using LAV Video & 
LAV Audio in those cases.

So the issue is as follows. ZoomPlayer wasn't using SmartPlay on my system 
because the default and Auto-configure setups were invalid. When I re-enabled 
FFDShow, SmartPlay was used, but without IDX in ZoomPlayer subtitle formats, 
DirectVobSub wouldn't be loaded. So no issue, except SmartPlay not 
automatically configuring itself as expected.

At present YuZhuoHuang is working towards release of the next xy-VSFilter 
stable build, which will include all the changes and improvements from our beta 
releases, plus additional bug fixes & enhancements. We've updated the unrar.h 
header, and will plan to include unrar.dll in the installer. Just to confirm, 
it now works for you with unrar.dll in SysWoW64 on Win7 x64?

Original comment by cyber.sp...@gmail.com on 13 Oct 2012 at 8:23

GoogleCodeExporter commented 9 years ago
> Just to confirm, it now works for you with unrar.dll in SysWoW64 on Win7 x64?

Correct!

Original comment by forum.an...@gmail.com on 14 Oct 2012 at 5:30