Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Subtitles

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th February 2015, 05:41   #761  |  Link
Eamon
Registered User
 
Join Date: Aug 2014
Posts: 7
Quote:
Originally Posted by cyberbeing View Post
First, it should be TextSub and not TextSubMod if using normal VSFilter/xy-VSFilter. That alone would cause the avs script to throw an error, since the required function would not exist. Also, you'd normally load all your plugins at the beginning of script. If you are still getting a framerate error, try adding AssumeFPS after FFVideoSource with your decoded video framerate. If that still doesn't work, move AssumeFPS after your #deinterlace, and set it to whatever the resulting framerate should be after deinterlacing+decimation.
Thanks. Yep, the problem was the "TextSubMod." I forgot that only VSFilterMod needed the "Mod" part in the avs script.

So I finally tested it out, and xy-VSFilter successfully hardcoded styled text that were rotated in the x and y axes. But the only problem is this came at the cost of certain styled karaoke I made. The karaoke required VSFilterMod to be correctly interpreted when hardcoded. With xy-VSFilter, the karaoke just goes bananas and isn't rendered properly.

This leads me to a new question. Is there a way to use two filters, VSFilterMod and xy-VSFilter to hardcode different parts of the video. I don't mean splitting the video into segments. I'd rather not split, since that would mean more rendering thus losing more quality. But being able to load specific filters for specific durations in a single hardcoding process. Is it possible to write such a command in an avs script?
Eamon is offline   Reply With Quote
Old 27th February 2015, 07:01   #762  |  Link
cyberbeing
Broadband Junkie
 
Join Date: Oct 2005
Posts: 1,859
Quote:
Originally Posted by Eamon View Post
This leads me to a new question. Is there a way to use two filters, VSFilterMod and xy-VSFilter to hardcode different parts of the video.
If you load both VSFilter.dll and VSFilterMod.dll as plugins, it would give you access to both TextSub and TextSubMod. Move your VSFilterMod karaoke into a separate script and load it with TextSubMod. Move your standard VSFilter typesetting into a separate script and load it with TextSub. The order of your TextSub/TextSubMod commands would determine the blending order.

Code:
LoadPlugin("LSMASHSource.dll")
LoadPlugin("VSFilter.dll")
LoadPlugin("VSFilterMod.dll")

LWLibavVideoSource("source.mkv")

TextSub("vsfilter_typesetting.ass")
TextSubMod("vsfiltermod_karaoke.ass")
cyberbeing is offline   Reply With Quote
Old 27th February 2015, 13:30   #763  |  Link
Eamon
Registered User
 
Join Date: Aug 2014
Posts: 7
I see. But what does blending order mean?

Also, I noticed you used LSMASHSource.dll. Was that on purpose? Is it better to use that plugin rather than ffmpegsource?
Eamon is offline   Reply With Quote
Old 27th February 2015, 15:02   #764  |  Link
cyberbeing
Broadband Junkie
 
Join Date: Oct 2005
Posts: 1,859
Quote:
Originally Posted by Eamon View Post
I see. But what does blending order mean?
Subtitles will be alpha-blended onto the video frame in the order you have your TextSub/TextSubMod commands in your avs script. You can think of it in terms of layers. In my previous example, the TextSub typesetting would be blended first as the bottom layer, while the TextSubMod karaoke would be blended afterwords as the top layer.

Quote:
Originally Posted by Eamon View Post
Also, I noticed you used LSMASHSource.dll. Was that on purpose? Is it better to use that plugin rather than ffmpegsource?
No particular reason in this case, it's just what I had available at the moment when I was testing. LWLibavVideoSource is essentially the L-SMASH-Works equivalent of FFVideoSource from FFMS2.
cyberbeing is offline   Reply With Quote
Old 27th February 2015, 15:28   #765  |  Link
Eamon
Registered User
 
Join Date: Aug 2014
Posts: 7
Thanks a huge bunch, cyberbeing, for the help and explanation. It's very difficult to find specific answers for specific problems on the net
Eamon is offline   Reply With Quote
Old 9th March 2015, 22:19   #766  |  Link
maverick477f
Registered User
 
Join Date: Apr 2013
Posts: 3
Hello,

I have a question that maybe someone could answer.
When I use \fad (or \t(\alpha&HFF&)) in Aegisub (also visible in MPC-HC), with xy-VSFilter as renderer, border of the text becomes thinnier. This bothers me since I noticed it and I don't know if its supposed to look that way because with libass there is no change to the border (that I can see, anyway).

To make things easier I'm attaching an archive with four screenshots.

xyVSFilter_01.png - frame before fade starts
xyVSFilter_02.png - next frame

libass_01.png - frame before fade starts
libass_02.png - next frame

And the line:
{\fs500\shad0\1c&H00F6C3F4&\bord1\fade(0,1000)}TEXT
Attached Files
File Type: rar Text.rar (106.8 KB, 22 views)
maverick477f is offline   Reply With Quote
Old 10th March 2015, 23:54   #767  |  Link
cyberbeing
Broadband Junkie
 
Join Date: Oct 2005
Posts: 1,859
It doesn't actually become thinner, it's only an illusion since the subpixel overlap between the border and body fades out of existence too quickly with VSFilter. The reason for the discrepency between VSFilter and Libass in this regard I believe is Issue #145 (There is a subpixel gap between the main glyph and the border). This was already fixed in XySubFilter Beta2 (with some limitations regarding text overlaps), but not yet with xy-VSFilter.
cyberbeing is offline   Reply With Quote
Old 11th March 2015, 18:04   #768  |  Link
maverick477f
Registered User
 
Join Date: Apr 2013
Posts: 3
I see, so I decided to test xySubFilter.
I uninstalled everything, checked if xy-vsfilter.dll is unregistered and installed up to date Kawaii Codec Pack with xySubFilter 3.1.0.705 Beta 2. To my surprise there is no difference.

{\pos(603,45)\an5\be1\1c&H00F6C3F4&\t(1310,2110,\alpha&HFF&)}I be

I also tried to recreate Issue #145, tested line is
{\pos(603,45)\1c&H000000&\3c&H000000&\bord5}be
with secondary color alpha 55.

Font is Arial.

maverick477f is offline   Reply With Quote
Old 12th March 2015, 13:11   #769  |  Link
cyberbeing
Broadband Junkie
 
Join Date: Oct 2005
Posts: 1,859
Are you positive XySubFilter is being used? You'll need to ensure the MPC-HC ISR is disabled. Uncheck Playback -> 'Use built-in subtitle renderer' in MPC-HC setting, and confirm that XySubFilter is present under the filters context menu during playback. Also, if your test video has no audio track, you'll need to set XySubFilter General->Loading setting to 'Always Load'.

I cannot reproduce this, which is expected unless there is some discrepancy about your script+video which you aren't telling me about. If you are still seeing this problem when XySubFilter is used, I would request that you upload a complete sample (video+script+font) which can easily reproduce this. As mentioned, this should not happen with XySubFilter unless the bounding boxes from two lines are overlapping. That was the entire purpose of XySubFilter Beta2 introducing an 'addition draw' method to be used instead of 'alpha blending' when possible.

Last edited by cyberbeing; 12th March 2015 at 22:07.
cyberbeing is offline   Reply With Quote
Old 12th March 2015, 15:06   #770  |  Link
a8213711
Registered User
 
Join Date: Dec 2014
Posts: 31
Using MPC-HC I can't cycle through XySubFilter subs with keyboard shortcuts. Is this possible? If not, I think it should be implemented.
a8213711 is offline   Reply With Quote
Old 12th March 2015, 21:57   #771  |  Link
cyberbeing
Broadband Junkie
 
Join Date: Oct 2005
Posts: 1,859
Quote:
Originally Posted by a8213711 View Post
Using MPC-HC I can't cycle through XySubFilter subs with keyboard shortcuts. Is this possible? If not, I think it should be implemented.
If they are internal subtitles, it's possible to cycle through by pressing 's' in MPC-HC. MPC-HC has not yet implemented support for cycling through external subtitles, or toggling subtitles on/off (directly) via hotkeys. This was part of this feature request from last year to support VSFilter api functionality in MPC-HC, but nothing has happened with it yet.

MPC-BE has already had full hotkey support for VSFilter/xy-VSFilter/XySubFilter for many years now, and so have players like ZoomPlayer. Support for the VSFilter api goes beyond just hotkey support, and also allows features like drag/drop, menu support, subtitle delay, and other such features to function.

Last edited by cyberbeing; 12th March 2015 at 22:05.
cyberbeing is offline   Reply With Quote
Old 12th March 2015, 23:43   #772  |  Link
maverick477f
Registered User
 
Join Date: Apr 2013
Posts: 3
Quote:
Originally Posted by cyberbeing View Post
Also, if your test video has no audio track, you'll need to set XySubFilter General->Loading setting to 'Always Load'.
Well, you can consider my issue resolved and thank you for your time. I will use xySubFilter for playback from now on.

One last question though, will xySubFilter be able to fade overlapping text in the future like libass can?
maverick477f is offline   Reply With Quote
Old 13th March 2015, 08:29   #773  |  Link
cyberbeing
Broadband Junkie
 
Join Date: Oct 2005
Posts: 1,859
Quote:
Originally Posted by maverick477f View Post
One last question though, will xySubFilter be able to fade overlapping text in the future like libass can?
I assume you mean fade overlapping text without a subpixel gap between border and body. Unfortunately, the answer is probably not. Our developer didn't have much interest refactoring the alpha blending code to compensate for all corner cases. He deemed that adding the draw method was a more straightforward way to target the problem cases directly, simpler to implement, and likely better for overall performance.

With XySubFilter's current method, only the portions of the bounding boxes which overlap will use alpha blending, while non-overlapping portions will use the draw method. It's not an all or nothing thing. The main problem comes when the text is 3d transformed, since the bounding boxes are rectangular and can result in a false positives in terms of overlap from the excess empty space. In that respect, the overlap detection code could be improved if someone came up cache friendly method of dealing with the problem.
cyberbeing is offline   Reply With Quote
Old 22nd March 2015, 06:56   #774  |  Link
romulous
Registered User
 
Join Date: Oct 2012
Posts: 179
Hi cyberbeing,

I have a sample clip here that shows the subs as transparent with xyVSFilter (3.0.0.306) and XYSubFilter (3.1.0.705). The nightly MPC-HC version of VSFilter.dll shows them non-transparent though, which is the desired effect:
https://dl.dropboxusercontent.com/u/...ransparent.mkv (10.0MB)

Is this something that could be corrected in xyVSFilter and XYSubFilter?

Thanks,

romulous
romulous is offline   Reply With Quote
Old 22nd March 2015, 08:42   #775  |  Link
cyberbeing
Broadband Junkie
 
Join Date: Oct 2005
Posts: 1,859
I'm aware of this issue. The fix which MPC-HC used to support animated (fade-in/fade-out transparency) VOBSUB doesn't function with xy-VSFilter. The current behavior is a workaround to at least allow something to be shown rather than nothing (like VSFilter 2.39), but I'm unsure how to fix this properly without our developer around. I suspect somewhere in the queue or render code he is making assumptions that bitmap subtitles like VOBSUB would never be animated.
cyberbeing is offline   Reply With Quote
Old 1st April 2015, 15:36   #776  |  Link
GCRaistlin
Registered User
 
GCRaistlin's Avatar
 
Join Date: Jun 2006
Posts: 262
I've got the DVD and external subtitles for it. If I open the DVD with MPC-HC (via VIDEO_TS.IFO), start playing the movie and then open external subtitles via built-in subtitle renderer, they're displayed correctly. If I open them via XySubFilter, they're being displayed too early. But if I open the movie via VTS_01_0.IFO and then open external subtitles via XySubFilter, they work OK.
__________________
Magically yours
Raistlin
GCRaistlin is online now   Reply With Quote
Old 1st April 2015, 20:51   #777  |  Link
cyberbeing
Broadband Junkie
 
Join Date: Oct 2005
Posts: 1,859
Wasn't it you who asked this same question last year?

Quote:
Originally Posted by cyberbeing View Post
Taken at face value, I'm not sure what can be done about that when the DVD has adverts and menus before the main title. You'd probably just need to shift the timings of the external subtitle to compensate for the discrepancy.
Did the behavior you describe still function as you expect with MPC-HC VSFilter (rather than ISR)? If it does, maybe this could be fixed. If doesn't, I'd suggest filing a bug with MPC-HC since I have no idea how they are handling this with the ISR and if whatever they are doing is still possible with external filters like VSFilter or XySubFilter.

I assume MPC-HC must either shift timestamps or reset the ISR on DVD folders, so external subtitles are not shown prior to the main movie starting. It may only be able to do this, since MPC-HC itself it actually managing opening and playback of the DVD. I don't really know. One solution could be for the Subtitle Consumer (i.e. EVR-CP or madVR) to automatically compensate the REFERENCE_TIME reported by RequestFrame if they are aware of the correction needed.
cyberbeing is offline   Reply With Quote
Old 1st April 2015, 21:11   #778  |  Link
GCRaistlin
Registered User
 
GCRaistlin's Avatar
 
Join Date: Jun 2006
Posts: 262
Yes, it was me.

Quote:
Did the behavior you describe still function as you expect with MPC-HC VSFilter (rather than ISR)?
Yes, the external subtitles are being displayed correctly with VSFilter 1.7.1.322.

Quote:
they're being displayed too early
To be precise, they're being displayed too fast and, as a result, too early.
__________________
Magically yours
Raistlin
GCRaistlin is online now   Reply With Quote
Old 2nd April 2015, 04:28   #779  |  Link
cyberbeing
Broadband Junkie
 
Join Date: Oct 2005
Posts: 1,859
This actually seems to be a madVR bug. It's probably reporting incorrect timestamps to XySubFilter with DVDs.

I am unable to reproduce this when using XySubFilter with EVR-CP or with xy-VSFilter.
cyberbeing is offline   Reply With Quote
Old 12th April 2015, 21:13   #780  |  Link
SecurityBunny
Registered User
 
Join Date: Jul 2013
Posts: 76
MadVR just updated to support an x64 build to go along with MPC-HC x64. Is there any possible way to get XySubFilter to function with the 64 bit versions? As it is the only thing I'm missing that is a necessity for me to completely update my 'high quality' playback setup.
SecurityBunny is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 20:30.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.