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. |
|
|
Thread Tools | Search this Thread | Display Modes |
7th April 2009, 10:06 | #221 | Link |
Registered User
Join Date: May 2005
Posts: 395
|
0xdeadbeef,
I've done a bit more digging It seems perhaps VSFilter will let me vertically expand the subtitles on playback after all... There's a setting under the General tab, under Picture Size, called "Vertical Padding" which has one value called "Extend to 16:9" which looks like it will show full-scale (1920x1080) subtitles exported from BDSup2Sub properly proportioned across the whole screen, NOT just within the confines of my cropped video encode (by default, this WAS set to "Original Height" which is what was giving me the vertically squashed presentation). I'll do some further investigation on my end before you get too deep into implementing that Vertical Offset feature! Last edited by magic144; 7th April 2009 at 10:20. |
7th April 2009, 16:23 | #222 | Link |
Author of BDSup2Sub
Join Date: Jun 2003
Posts: 478
|
To be honest, most of the code is already there, the only thing missing is the command line support. Yet I could quickly undo the changes if they prove to be useless. So please tell me when you're sure about it.
Then again, I'm still struggling with the BD-SUP parser anyway. Although I rewrote large parts again, I'm still not completely happy with it and it may take a while until I find a solution that works for all the problematic SUPs in my private zoo. |
8th April 2009, 15:03 | #224 | Link | |
Author of BDSup2Sub
Join Date: Jun 2003
Posts: 478
|
Quote:
In a nutshell: SUPs have an individual 256 color palette per caption, VobSubs have a fixed 16 color palette for the whole stream and only 4 colors of these 16 colors can be used per caption. As there's one color used as transparent color, this leaves 3 (more or less) opaque colors for the caption which is about 252 colors less compared to a SUP. Obviously this doesn't leave much space for antialiasing and thus the images look less smooth. |
|
8th April 2009, 16:38 | #225 | Link |
Registered User
Join Date: Aug 2007
Posts: 59
|
Thanks for your answer.
And I did read the online help, from which I understood that the conversion to sub/idx results in a reduction of color information. However, my knowledge on this subject is way too little to see that this results in jagged edges. |
8th April 2009, 18:34 | #226 | Link |
Author of BDSup2Sub
Join Date: Jun 2003
Posts: 478
|
08.04.2009 2.9 -> 3.0
|
9th April 2009, 02:42 | #227 | Link |
Registered User
Join Date: May 2005
Posts: 395
|
Thanks for the update 0xdeadbeef
I tried out the subtitle cropping feature with my test movie/subtitle. Took me a while to realize I had to press the "Upper Bound" button instead of manually entering the "Offset Y value"!! The original movie is 1920x1280. I am cropping the video 140 pixels each, top and bottom, leaving 1920x800 (AR 2.4:1) I used v3.0 using the "Move all captions" dialog, set AR=2.4, set the "move inside bounds" radio button and set a Crop Offset Y value of 140 (via the "Upper bound" button). Only thing I have to do manually after export is change the Frame size in the idx file from:- size: 1920x1080 to size: 1920x800 (because I've remapped the subtitles into the picture-only area of the source video, thanks to the cropping) - so it's not a totally automatic procedure just yet. Of course 1080-2*140=800. I tried it in BOTH VSFilter in ZoomPlayer, AND in VLC (a quite behind-the-times v0.8.6i Windows build!) and both rendered the subtitles at the correct AR. I think this will now mostly benefit people who use VLC as their only playback solution since it allows the subs to be used in cropped encodes like this and still be shown at the correct AR. Thanks for the work and quick support! m PS - by the way, is using REC.709 appropriate for non-HD resolutions?? I had read that it was only applicable for YUV to RGB conversions of HD material. http://www.glennchan.info/articles/t...olor-space.htm http://forum.doom9.org/showthread.php?t=133982 Last edited by magic144; 9th April 2009 at 02:57. |
9th April 2009, 07:33 | #228 | Link | |
Registered User
Join Date: Mar 2005
Posts: 433
|
Quote:
0xdeadbeef: Thanks for the REC.709 support! Does it use the exact formula I mentioned? That preserves the original levels of the subtitles. But if you wanted to do levels expansion, you could always add a switch I guess. |
|
9th April 2009, 09:29 | #229 | Link | |
Author of BDSup2Sub
Join Date: Jun 2003
Posts: 478
|
Quote:
Code:
/* BT.709 for RGB 0..255 (PC) -> YCbCr 16..235 */ y = 16 + (int)( r*0.2126*219/255 + g*0.7152*219/255 + b*0.0722*219/255 + 0.5); cb = 128 + (int)(-r*0.2126/1.8556*219/255 - g*0.7152/1.8556*219/255 + b*0.5*219/255 + 0.5); cr = 128 + (int)(r*0.5*219/255 - g*0.7152/1.5748*219/255 - b*0.0722/1.5748*219/255 + 0.5); /* BT.709 for -> YCbCr 16..235 -> RGB 0..255 (PC) */ y1 = 1.164383562*y; r = (int)(-253.3400548 + y1 + 1.833671233*cr + 0.5); g = (int)( 79.05863261 + y1 - 0.218117304*cb - 0.5450762084*cr + 0.5); b = (int)(-295.1907945 + y1 + 2.160630137*cb + 0.5); Anway, I find it hard to see any difference compared to my BT.601 code: at least with the naked eye, the colors look the same to me. Last edited by 0xdeadbeef; 9th April 2009 at 12:11. |
|
9th April 2009, 12:11 | #230 | Link | |||
Author of BDSup2Sub
Join Date: Jun 2003
Posts: 478
|
Quote:
Quote:
Quote:
As a side note: the color model used in the IDX file is a little debatable, too. Indeed I didn't find any clear definition if it is always assumed to be RGB 0..255 or if some tools expect other color models (RGB 16..235 or YCbCr/YCrCb 16..235 or whatever). Also the range of YCrCb/YCbCr values doesn't seem to be clearly defined. While the typical limits are 16..235 in video applications, there are some cases where this is extended to 16..240 - sometimes for all three components, sometimes only for the luminance (Y). Then again, it shouldn't really matter much in this context. |
|||
9th April 2009, 14:47 | #231 | Link | ||
Registered User
Join Date: May 2005
Posts: 395
|
Quote:
Quote:
I would have thought that the 16..235 luminance values would have been inherent in the subtitle source, if they were to match the underlying video (typically). Obviously, as we have just witnessed, I am not an expert :-) The ffdshow "RGB conversion" tab (Constrast section) describes the "Standard" conversion as being Y:16-235, Chroma:16-240 Indeed the Wikipedia YCbCr page describes the RGB conversion as giving an output with Y(16-235) and CbCr(16-240). http://en.wikipedia.org/wiki/YCbCr ps - and again, THANKS for this great tool! Last edited by magic144; 9th April 2009 at 14:55. |
||
9th April 2009, 15:32 | #232 | Link | |||
Author of BDSup2Sub
Join Date: Jun 2003
Posts: 478
|
Quote:
Quote:
So for the rare case of SUPs with PAL/BTSC resolution I guess I'd need to select BT.601 and BT.709 for the rest. But as I said, the difference between BT.601 and BT.709 seem to be neglectable when it comes to subtitles which seldomly use subtle colors (if at all). Quote:
You're welcome, still it's always nice to get positive feedback. |
|||
10th April 2009, 13:39 | #233 | Link |
Registered User
Join Date: Feb 2009
Posts: 19
|
Thank you note
0xdeadbeef,
I just wanted to thank you for that great tool. I allows me to offset the subtitles of a BD in the pictures, which is great when you have a 2.35 screen !!! I used to manually trimmed exported .png then to reauthor my .xml and .png to recreate .sub. Took my hours. Now, 1 minute !!! |
10th April 2009, 14:20 | #234 | Link |
Author of BDSup2Sub
Join Date: Jun 2003
Posts: 478
|
Ah, another happy camper
Still, there's always place for improvement. 10.04.2009 3.0 -> 3.1.0
|
11th April 2009, 16:31 | #235 | Link |
Registered User
Join Date: Feb 2007
Posts: 195
|
Fantastic App! Thanks very much. I do have a request of course
Could you possibly implement a job queue of some sort such that many front end GUI encoders have? Once the jobs are queued up, they could then be started one after the other. Perhaps even a drop box to queue up the SUPs? Also, as direct VOBSUB (VSfilter) can read one IDX and one RAR'ed SUB for multiple languages, it would be fantastic to have that as a possible output as well. Thanks again! |
13th April 2009, 23:29 | #236 | Link |
Author of BDSup2Sub
Join Date: Jun 2003
Posts: 478
|
14.04.2009 3.1.0 -> 3.2.0
Last edited by 0xdeadbeef; 13th April 2009 at 23:32. |
14th April 2009, 04:18 | #238 | Link |
Registered User
Join Date: Jun 2008
Posts: 91
|
Changed: BD-SUP palette is created by default when scaling, mode can be selected (keep palette, new palette, dither)
What exactly does that mean? Well, let me ask a more direct question...if I'm just downscaling a BD-Sup to 720p to be burned back to an avchd/bluray structure...should I change my default back to keep palette? |
14th April 2009, 11:46 | #239 | Link |
Author of BDSup2Sub
Join Date: Jun 2003
Posts: 478
|
Before 3.2.0, BDSup2Sub used the existing palette for each caption. When scaling up/down, this led to suboptimal antialiasing in cases where the original palette didn't contain the according intermediate colors or versions of the same color with intermediate alpha values.
Although theses cases were rare, some people complained about it and so I decided to determine a new (optimized) palette when scaling. You can see the differences when changing the "palette mode" options in the GUI. As the creation of a new palette proved to be about as fast as using the existing one, I decided to make this the default option. This shouldn't be a problem though. So the answer is "no, you should get best results with the default setting". |
14th April 2009, 11:54 | #240 | Link | |
Author of BDSup2Sub
Join Date: Jun 2003
Posts: 478
|
Quote:
Besides, you can use the JAR as library for own Java projects. The Javadoc help is included and I can provide everyone interested with an example to use the Core classes (indeed the example is the main class of BDSup2Sub containing the CLI stuff). |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|