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 15th May 2009, 00:18   #381  |  Link
deank
Programmer (or just 教务长)
 
deank's Avatar
 
Join Date: Oct 2008
Location: Valencia, Spain
Posts: 4,248
A problem

Hi again!

I have the following problem:

Code:
Decoding frame 11/1037 at offset 0x0000a800
Decoding frame 12/1037 at offset 0x0000b800
Decoding frame 13/1037 at offset 0x0000c800
Decoding frame 14/1037 at offset 0x0000d800
Decoding frame 15/1037 at offset 0x0000e800
Decoding frame 16/1037 at offset 0x0000f800
Decoding frame 17/1037 at offset 0x00010800
ERROR: Corrupt buffer offset information

BDsup2Sub imports all subpictures but won't export them to SUP - stops with the error and the rest is not included.

Let me know if I can be of any help with this.

Here is a link to the problematic pair, extracted with mencoder from my Y Tu Mama Tambien DVD.



Dean
__________________
multiAVCHD - donate | popBD | uncropMKV | mkv2avi | easySUP

Last edited by deank; 15th May 2009 at 00:21.
deank is offline   Reply With Quote
Old 15th May 2009, 01:46   #382  |  Link
0xdeadbeef
Author of BDSup2Sub
 
Join Date: Jun 2003
Posts: 478
Hm, ok, I analyzed it and the problem stems from an invalid size entry at offset 0x1081d:

Code:
0x10800:
000001BA		pack ID
400000000000		(invalid) system clock reference
000000			(invalid) multiplexer rate
00			(invalid) stuffing info
000001BD		subpacket ID
07EC			(valid) packet length
8080			packet type
05 210241F0C1		PTS
20			Stream ID
07E4			(invalid) Subpicture size in bytes (offset: 0x1081d + 0x7e4 = 0x011001)
07C6			(valid) Offset to control header
Apart from the fact that the info in the pack header is invalid (which is irrelevant for the subtitle info though), the main problem is that the subpicture size given (0x7e4) is simply one byte too large. That's why BDSup2Sub assumes that the control buffer is incomplete and continues with the next pack which is however the wrong decision in this case.

Anyway: although IMHO this is a bug in the stream, the next version will have a workaround for this issue. Already works locally but it's nearly 2 o'clock in the morning around here and I'm too tired to release an update right now, so you'll have to wait a few hours while I get a nap.
If you can't wait, you could also try to patch the size at offset 0x1081d from 0x7e4 to the correct value of 0x7e3. Haven't tested this, but in theory, this should work with the current version of BDSup2Sub.

Last edited by 0xdeadbeef; 15th May 2009 at 01:48.
0xdeadbeef is offline   Reply With Quote
Old 15th May 2009, 10:38   #383  |  Link
deank
Programmer (or just 教务长)
 
deank's Avatar
 
Join Date: Oct 2008
Location: Valencia, Spain
Posts: 4,248
Thanks.

It seems there are a lot of problem streams and this particular generates 200-300 warnings... If it is possible to make bdsup2sub to ignore the erroneous segments (not to include the subpictures) and add all it can decode it will be nice (if it doesn't do it already).

I'll try with patching the value, just for a test.

***

Yes, it worked but stopped again at another offset with "Corrupt buffer offset information". I suspected it will happen - probably the subtitle stream is not authored properly and has a lot of errors, but if your tool can skip/fix those it will be great!
__________________
multiAVCHD - donate | popBD | uncropMKV | mkv2avi | easySUP

Last edited by deank; 15th May 2009 at 10:41.
deank is offline   Reply With Quote
Old 15th May 2009, 12:02   #384  |  Link
0xdeadbeef
Author of BDSup2Sub
 
Join Date: Jun 2003
Posts: 478
Most of the warnings are due to missing end times. Though this is allowed in the DVD caption transport stream AFAIK, this currently gives a warning in BDSup2Sub as my original understanding was that in a VobSub, each control buffer needs an end sequence.

It's hard to tell if the main issue is an authoring fault, a bug in the demuxer or something that is on the edge of what is allowed.
To me this looks like a bug in either the authoring tool or demuxer that happens only if the pack is one byte too large. Instead of appending an additional pack for that one byte, it's simply dropped, but the size info is not decreased accordingly.
Anyway, here's the update:


15.05.2009 3.5.5 -> 3.5.6
  • Changed: VobSub: parsing of packet is now always stopped when reaching offset of next caption even if control buffer is incomplete.
0xdeadbeef is offline   Reply With Quote
Old 15th May 2009, 12:59   #385  |  Link
deank
Programmer (or just 教务长)
 
deank's Avatar
 
Join Date: Oct 2008
Location: Valencia, Spain
Posts: 4,248
Thanks for the update!

I just converted a DVD and now all subtitles show fine!

__________________
multiAVCHD - donate | popBD | uncropMKV | mkv2avi | easySUP
deank is offline   Reply With Quote
Old 16th May 2009, 21:07   #386  |  Link
0xdeadbeef
Author of BDSup2Sub
 
Join Date: Jun 2003
Posts: 478
16.05.2009 3.5.6 -> 3.6.0
  • Changed: added editing of "forced" flags (via edit dialog)
  • Changed: added possibility to exclude single captions from export (via edit dialog)
  • Changed: added erasing of rectangular regions (via edit dialog)
  • Changed: VobSub: bitmaps are automatically cropped on import
0xdeadbeef is offline   Reply With Quote
Old 16th May 2009, 21:30   #387  |  Link
deank
Programmer (or just 教务长)
 
deank's Avatar
 
Join Date: Oct 2008
Location: Valencia, Spain
Posts: 4,248
Quote:
Changed: VobSub: bitmaps are automatically cropped on import
How does this change affect the import of VobSub (visually)? (asking just to be safe)
__________________
multiAVCHD - donate | popBD | uncropMKV | mkv2avi | easySUP
deank is offline   Reply With Quote
Old 16th May 2009, 21:38   #388  |  Link
turbojet
Registered User
 
Join Date: May 2008
Posts: 1,840
Is there a way to change start and end time per sub? I tried editing but preview/re-edit/output kept the original times.

Also is there a way to specify a delay or change one subs start time and all others can be changed like vobsub resync?

If not, any plans for adding either of these?

Last edited by turbojet; 16th May 2009 at 22:33.
turbojet is offline   Reply With Quote
Old 16th May 2009, 22:21   #389  |  Link
0xdeadbeef
Author of BDSup2Sub
 
Join Date: Jun 2003
Posts: 478
Quote:
Originally Posted by deank View Post
How does this change affect the import of VobSub (visually)? (asking just to be safe)
Only transparent pixels are cropped. E.g. in your sample VobSub, each caption was stored as (nearly) full screen image. Revision 3.6.0 crops that to the real bitmap.
If we want to be nit-picking, there might be minimal visual differences in the border pixels after scaling compared to the uncropped image (simply because additional half tone pixels could be created outside the cropping range when scaling).
Then again, as this also happens with typical captions which are already cropped, a general solution for this isssue is already on my list though.

Quote:
Originally Posted by turbojet View Post
Is there a way to change start and end time per sub? I tried editing but preview/re-edit/output kept the original times.
Well, there's an edit dialog for this since quite some time and it's described in the online help. If you either don't press return after editing or if you don't store the changes though (via "Save Changes" or "Ok" Buttons), they are not used of course. Hard to understand for me what is so complicated about this.

Quote:
Originally Posted by turbojet View Post
Also is there a way to specify a delay or change one subs start time and all others can be changed like vobsub resync?
Well, specifying a delay is in since revision 1.0. Again, I really dunno how to make this easier or clearer. You enter a value and press ok. In this (special) case, not even pressing return is needed. Though it generally never hurts to press return in any edit box of any application to give it the chance to validate the entered value.
0xdeadbeef is offline   Reply With Quote
Old 16th May 2009, 22:29   #390  |  Link
turbojet
Registered User
 
Join Date: May 2008
Posts: 1,840
Quote:
Originally Posted by 0xdeadbeef View Post
Well, there's an edit dialog for this since quite some time and it's described in the online help. If you either don't press return after editing or if you don't store the changes though (via "Save Changes" or "Ok" Buttons), they are not used of course. Hard to understand for me what is so complicated about this.
I change a frames time, save changes does not enable and ok button resets everything to original in preview/re-edit/output. After I press min/max/center/top/bottom or check forced/exclude the save changes button is activated but after pressing saving changes preview/re-edit/output are still identical, this is also the case with positioning. The only settings that stick are force and exclude. Oh 'return' has to be hit, very unusual but nevermind, solved now.

Quote:
Well, specifying a delay is in since revision 1.0. Again, I really dunno how to make this easier or clearer. You enter a value and press ok. In this (special) case, not even pressing return is needed. Though it generally never hurts to press return in any edit box of any application to give it the chance to validate the entered value.
I was looking for it in edit frame settings but I notice it in the input window and it works, nevermind.

Last edited by turbojet; 16th May 2009 at 22:44.
turbojet is offline   Reply With Quote
Old 16th May 2009, 23:00   #391  |  Link
0xdeadbeef
Author of BDSup2Sub
 
Join Date: Jun 2003
Posts: 478
Quote:
Originally Posted by turbojet View Post
I was looking for it in edit frame settings but I notice it in the input window and it works, nevermind.
It's a global conversion option, so it's in the conversion dialog. Why would you look for a global delay in the dialog to edit a single caption???

Quote:
Originally Posted by turbojet View Post
I change a frames time, save changes does not enable and ok button resets everything to original in preview/re-edit/output.
I'm pretty sure that the explanation in my last posting was already my 2nd trial to explain this, but ok, maybe third time is a charm:

If you enter a time or any other value in a text input field inside the edit dialog (or any other dialog), you have to press RETURN to allow BDSup2Sub to validate the value. After the value has been validated and has been found to be different from the original value, the save button is enabled.

Generally speaking, there are only three possibilities for a program to handle text edit boxes:
  • validate while typing: not (easily/if at all) usable to reformat/fix the input. Outside full featured syntax coloring text editors in the league of the Eclipse framework, this is only usable for the easiest of inputs (e.g. single characters).
  • validate when leaving the dialog: may lead to unexpected results if inputs are corrected or ignored, but the user is not informed. Also updates can't be processed while the dialog is active.
  • validate when pressing return: the user get's immediate feedback and sees if the value was fixed or invalid. Updates can be processed. Easy to implement and understand. Therefore the typical implementation.
So, in a nutshell, validating after pressing return seems to be the most (or even the only) sensible approach.

And again: these assumptions are not limited to BDSup2Sub. You're well advised to press return in any edit box of any tool if it's obviously not reacting during typing (which is something I personally hate in 99% of cases).

Last edited by 0xdeadbeef; 16th May 2009 at 23:03.
0xdeadbeef is offline   Reply With Quote
Old 16th May 2009, 23:22   #392  |  Link
turbojet
Registered User
 
Join Date: May 2008
Posts: 1,840
Quote:
Originally Posted by 0xdeadbeef View Post
It's a global conversion option, so it's in the conversion dialog. Why would you look for a global delay in the dialog to edit a single caption???
I'm used to changing a time of one and having it change other sub timings too. It's fine and probably makes more sense where it is but it's not what I'm used to so not where I expected.

Quote:
I'm pretty sure that the explanation in my last posting was already my 2nd trial to explain this, but ok, maybe third time is a charm:

If you enter a time or any other value in a text input field inside the edit dialog (or any other dialog), you have to press RETURN to allow BDSup2Sub to validate the value. After the value has been validated and has been found to be different from the original value, the save button is enabled.

Generally speaking, there are only three possibilities for a program to handle text edit boxes:
  • validate while typing: not (easily/if at all) usable to reformat/fix the input. Outside full featured syntax coloring text editors in the league of the Eclipse framework, this is only usable for the easiest of inputs (e.g. single characters).
  • validate when leaving the dialog: may lead to unexpected results if inputs are corrected or ignored, but the user is not informed. Also updates can't be processed while the dialog is active.
  • validate when pressing return: the user get's immediate feedback and sees if the value was fixed or invalid. Updates can be processed. Easy to implement and understand. Therefore the typical implementation.
So, in a nutshell, validating after pressing return seems to be the most (or even the only) sensible approach.

And again: these assumptions are not limited to BDSup2Sub. You're well advised to press return in any edit box of any tool if it's obviously not reacting during typing (which is something I personally hate in 99% of cases).
This is the only gui, from what I can remember, where I've had to press 'enter' for a setting to stick while 'ok' and 'save changes' don't stick. Again I'm used to 'ok' and 'save changes' using the changes made. Come to think of it how would someone press 'enter' after changing this setting on a touchscreen?
turbojet is offline   Reply With Quote
Old 16th May 2009, 23:27   #393  |  Link
0xdeadbeef
Author of BDSup2Sub
 
Join Date: Jun 2003
Posts: 478
Quote:
Originally Posted by turbojet View Post
This is the only gui, from what I can remember, where I've had to press 'enter' for a setting to stick while 'ok' and 'save changes' don't stick. Again I'm used to 'ok' and 'save changes' using the changes made. Come to think of it how would someone press 'enter' after changing this setting on a touchscreen?
Hard for me to imagine that you really didn't understand it the third time. Then again: yeah well.
0xdeadbeef is offline   Reply With Quote
Old 16th May 2009, 23:44   #394  |  Link
turbojet
Registered User
 
Join Date: May 2008
Posts: 1,840
Quote:
Originally Posted by 0xdeadbeef View Post
Hard for me to imagine that you really didn't understand it the third time. Then again: yeah well.
I completely understand your text box pressing return assumption. It's just the only time I've ever seen this sort of text box behavior.

What is written in the help "The rest should be pretty self-explanatory. "Ok" stores the changes and returns, "Cancel" returns without taking over the changes, "Save Changes" stores the changes but doesn't close the dialog. "Prev" and "Next" skip to the previous/next subtitle without (!) saving the changes." and also what you wrote earlier today is not true in BDSup2Sub when typing in text boxes as 'enter' must be pressed however if text boxes are changed another way it is true.

But I got the program to do what I was trying to achieve from your first post which you claim I didn't understand so I'm done with this discussion.

Last edited by turbojet; 16th May 2009 at 23:47.
turbojet is offline   Reply With Quote
Old 17th May 2009, 00:22   #395  |  Link
0xdeadbeef
Author of BDSup2Sub
 
Join Date: Jun 2003
Posts: 478
Quote:
Originally Posted by turbojet View Post
What is written in the help [..] and also what you wrote earlier today is not true [...]
*Sigh*. To the contrary, BDSup2Sub behaves exactly as described in the help and as I explained it several times. I even pointed out why this is more or less the only sensible way it could behave.
Then again, if you insist to claim the opposite, please don't expect that I'll bother to respond. I'm kinda tired to explain this again and again and again.
0xdeadbeef is offline   Reply With Quote
Old 17th May 2009, 01:56   #396  |  Link
turbojet
Registered User
 
Join Date: May 2008
Posts: 1,840
No one asked you to explain it more then once, if it acted normally you'd never have to explain it at all.

Save generally means save, not save only if you hit enter after typing. The latter is exactly the rule in bds2up2sub. Imagine opening a text editor entering 1 line of text, save & close, reopen to find the line hadn't been saved because you didn't hit enter.

While it may be normal to you as you always hit enter after typing you can't expect every one else to do the same. By having this text box behavior and omitting any mention of having to hit 'enter' or 'return' after editing a text box I'm led to believe you expect every one else presses enter after editing. WYSINWYG
turbojet is offline   Reply With Quote
Old 17th May 2009, 02:55   #397  |  Link
deank
Programmer (or just 教务长)
 
deank's Avatar
 
Join Date: Oct 2008
Location: Valencia, Spain
Posts: 4,248
Quote:
Originally Posted by 0xdeadbeef View Post
Only transparent pixels are cropped. E.g. in your sample VobSub, each caption was stored as (nearly) full screen image. Revision 3.6.0 crops that to the real bitmap.
I'll give it a try tomorrow. I was thinking about the sample I sent you, because subpictures (as it seems - generated in full-screen) are placed too high in the video area, and the new option will make them go @ the bottom, which is really nice.

Dean

edit: Just tested it and it is perfect! Thanks!
__________________
multiAVCHD - donate | popBD | uncropMKV | mkv2avi | easySUP

Last edited by deank; 17th May 2009 at 03:10.
deank is offline   Reply With Quote
Old 17th May 2009, 03:22   #398  |  Link
Surf
Senior Kindergarten
 
Join Date: Sep 2004
Location: here & there
Posts: 417
Hello Ox,

Your most ardent supporter here.

Right upto your last version...still no luck inputting into Subtitlecreator...with 3 titles so far...2 avc and 1 vc1.

Load demuxed Sup by Tsmuxer.

Source NTSC, 23.976....target 720x480, same fps.

Did not touch anything! Hi-low, medium thresholds, nothing!

Save.

Load...no go.

How about chasing me away with a new sddvd compliant SUP output instead of the roundabout sub/idx?

TIA
Surf is offline   Reply With Quote
Old 17th May 2009, 11:06   #399  |  Link
0xdeadbeef
Author of BDSup2Sub
 
Join Date: Jun 2003
Posts: 478
Quote:
Originally Posted by Surf View Post
Right upto your last version...still no luck inputting into Subtitlecreator...with 3 titles so far...2 avc and 1 vc1.
And I still can only repeat the same advice I gave you several times: upload your samples (e.g. SUP and VobSub) to a one-click hoster and send me the link. I'm not quite sure what you expect in ignoring this advice several times and instead posting the same stuff over and over again.

Generally speaking (and repeating myself as well), compatibility to SC was always good: I tried hundreds of VobSub created by BDSup2Sub in (VobSub Resync) and SC and none ever completely refused to load. Before 3.5.4, some VobSub weren't displayed correctly (only) in SC (e.g. only half of the captions were displayed). Due to the changes in 3.5.4, I'm yet to find a VobSub that didn't display every caption correctly in SC.

Anyway, just for the sake of it, I just converted a few complex SUP to VobSub (NTSC, 24p) and loaded them in SC 2.2 and SC 2.3rc1. Both loaded the VobSubs without any glitch and showed all of the captions.
0xdeadbeef is offline   Reply With Quote
Old 17th May 2009, 11:26   #400  |  Link
hubblec4
Matroska find' ich toll
 
Join Date: Apr 2008
Posts: 983
hello

here is a new sample and a question to.

Some captions are colored but in the sub/idx-mode are all captions white.

I saw in SC you can choose different colors for the captions.

Is it possible to keep the Sup-color in the vobsub.idx-file?

hubble
hubblec4 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 04:26.


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