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 9th December 2015, 21:05   #1321  |  Link
Rudde
Registered User
 
Join Date: Oct 2009
Posts: 13
Any way to get higher resolution timestamp on the xml output?
Rudde is offline   Reply With Quote
Old 9th December 2015, 23:44   #1322  |  Link
ScottJ
Registered User
 
Join Date: Sep 2012
Posts: 22
Quote:
Originally Posted by Rudde View Post
Any way to get higher resolution timestamp on the xml output?
It already includes the exact frame number (the last number in the timestamp). Can't get any higher resolution than that.
ScottJ is offline   Reply With Quote
Old 10th December 2015, 10:04   #1323  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,086
Yes, the timecodes in the XML are in the form HH:MM:SS:FF, where FF is a number of frames, not a fraction of a second. There is no way to be more precise than that.

However, the timecodes displayed in the GUI, are in the form HH:MM:SS.sss, where SS.sss is a floating point. And IMO it is extremely difficult to understand what BDSup2Sub does when it converts the input frame rate to the frame rate displayed in the GUI. Usually, they do not match at all. And it's not simply a precision problem. There is obviously a bug here, but increasing the precision will not fix it.

For example, if the XML timecode is 01:27:38:11 at 23.976fps, the frame number is 5258 seconds * (24/1.001) + 11 = 126077. Converted back to a timecode, still at 23.976fps, that gives 126077 / (24/1.001) = 5258.4617 seconds = approximately 01:27:38.462. But in the GUI, the time code displayed is 01:27:43.716 !!! It is obviously completely wrong ! It seems that BDSup2Sub does ALWAYS a framerate conversion, even when that option is not enabled.

Anyway, we have to live with that terrible bug, since BDSup2Sub is not developed any more.
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV

Last edited by r0lZ; 25th December 2016 at 11:36. Reason: missing dots (1001 instead of 1.001)
r0lZ is offline   Reply With Quote
Old 10th December 2015, 16:49   #1324  |  Link
Rudde
Registered User
 
Join Date: Oct 2009
Posts: 13
I didn't know the last FF was frame, and it seems to be difficult to convert to srt compatible format since it also does not extract fps correctly.

I did really try to parse the BDsup myself but I'm quite stuck on it because there is literally no complete documentation on it and it's so frustrating. I'm trying to make an online recourse for OCR and QA of BD (and hopefully DVD and HDDVD too some day) and make it crowdsourced.

Also; will FF = 01 be the first frame as the defined second?

Last edited by Rudde; 10th December 2015 at 16:52.
Rudde is offline   Reply With Quote
Old 10th December 2015, 17:00   #1325  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,086
No, I think that the first frame is 00. In other word, at 25 fps (PAL), FF is between 00 and 24.

Not sure what you mean with "it also does not extract fps correctly". IMO, the fps is correct in the XML. It's when it loads the XML that the frame rate is wrong. I think it assumes always 25 fps, instead of the fps in the header of the XML, although it displays correctly the source FPS in its first window. I suppose that this bug should be easy to fix. What you want to do is much more complicated.

Good luck anyway.
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline   Reply With Quote
Old 11th December 2015, 12:24   #1326  |  Link
Rudde
Registered User
 
Join Date: Oct 2009
Posts: 13
So I ran 3 BD sups trough it now, one 24/1.001 fps, 24 and 25 fps and the xml reports the correct playback time played back at original framerate but it always report 25 fps i XML, that will be significantly off by last caption on 24/1.001 fps but yet insignificant if you only use the FF data as frame accurate.
Rudde is offline   Reply With Quote
Old 11th December 2015, 12:32   #1327  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,086
Sorry, I don't understand. What do you mean with "but it always report 25 fps i XML" ?
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline   Reply With Quote
Old 11th December 2015, 12:37   #1328  |  Link
Rudde
Registered User
 
Join Date: Oct 2009
Posts: 13
Quote:
Originally Posted by r0lZ View Post
Sorry, I don't understand. What do you mean with "but it always report 25 fps i XML" ?
In the XML you have this line

<Format VideoFormat="1080p" FrameRate="25" DropFrame="False"/>

It will be FrameRate="25" regardless of the actual frame rate.
Rudde is offline   Reply With Quote
Old 11th December 2015, 12:49   #1329  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,086
Ah, OK. I didn't know that. In BD3D2MK3D, when an XML is created from a SUP at 23.976 fps, the real output frame rate is specified in the command line, and it is correctly written in the XML. But it seems that BDSup2Sub considers it still as 25 fps.

Anyway, your finding confirms that there is a very big bug here. Not sure if the same bug exists with other formats (BD SUP or DVD VobSub).
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline   Reply With Quote
Old 17th March 2016, 18:51   #1330  |  Link
Kez
Longtime Lurker
 
Join Date: May 2014
Location: London
Posts: 2
Quote:
Originally Posted by r0lZ View Post
<snip>The big differences in timings you have noticed when converting to XML/PNG is probably due to a bug in the GUI and/or command line. I don't use the GUI often and therefore I can't be sure, but I know that you have to specify the input and output frame rate when you use the command line, as otherwise BDSup2Sub does a conversion (probably to 25 fps) anyway! The correct option for the java version and for a BD@23.976fps is --convert-fps 24p,24p (or --fps-source 24p --fps-target 24p for the ++ version). <snip>
I can confirm the bug also exists in the GUI where you have to set the target frame rate to avoid a conversion to 25fps which it defaults to on every start up. The input frame rate seems ok though and always matches source in my experience. YMMV

As for a command line option to work around the bug, you are better off using --fps-target keep on either the CLI or on the shortcut icon command line. This ensures that the target frame rate matches the source, just in case you load a non 23.976 fps sup...

-kez

Last edited by Kez; 17th March 2016 at 18:58.
Kez is offline   Reply With Quote
Old 17th March 2016, 20:19   #1331  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,086
Welcome to the Doom9 forums, Kez.
Thanks for the confirmation ant the --fps-target keep hint.
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline   Reply With Quote
Old 18th March 2016, 21:10   #1332  |  Link
Kez
Longtime Lurker
 
Join Date: May 2014
Location: London
Posts: 2
Thanks for the welcome r0lZ.

One question:
Does anyone know if BDSUP2SUB and the ++ version are in sync in terms of bugfixes and features?
Obviously I'd like to use whichever one is more up-to-date in that regard, but it wasn't exactly clear to me from the info on GitHub.

Thanks!
Kez is offline   Reply With Quote
Old 18th March 2016, 21:27   #1333  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,086
Some bugs are present in both versions (the frame rate of the XML/PNG and the badly built palette when converting to DVD SUB for example). But IMO, the java version is better. The ++ version has at least one additional bug. When a BD SUP is converted to XML/PNG, some subtitles are converted as several pictures instead of only one, and some of them are totally black. The converted XML stream cannot be reloaded in BDSup2Sub++ itself ! Also, the development of the ++ version has been very rapid and promising, but has stopped abruptly after only a few months. Therefore, it has not been tested as extensively as the java version. However, when the ++ version works fine, I prefer it. It is much more rapid, and it doesn't require the overhead of java. But personally, I use almost always the java version, for security purpose.

Note also that the syntax of the command line is somewhat different for the two versions.
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline   Reply With Quote
Old 19th December 2016, 11:03   #1334  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 4,966
Quote:
Originally Posted by 0xdeadbeef View Post
Documentation
The complete documentation is available from the help menu inside the application. You can also read it online.
Unfortunately, this link is forwarded to https://codebeamer.com/cb/wiki/938267help.htm now, and anonymous reading is not allowed here, you need to create an account before even reading.

Is this tool able to batch-edit palette entries of subtitles in a Blu-ray SUP stream (e.g. set the opacity of the background of all subtitles in this stream to 0) and save the result in the same format?
__________________

German doom9 / Gleitz board
MediaFire shares: x265 | VPx | AOM | Xvid

Rémoulade is spoiled
LigH is online now   Reply With Quote
Old 19th December 2016, 13:29   #1335  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,086
I don't think so. Personally, for this kind of job, I convert the SUP to XML/PNG with BDSup2Sub (java version), then I batch-edit the PNG files with Image Magick or a good image editor (with batch support of course), and finally I recreate a new SUP from the edited XML/PNG, again with BDSup2Sub.

Take care! BDSup2Sub assumes ALWAYS 25 fps by default when it reads a XML/PNG stream, so be sure to specify that you want to convert the FPS from 23.976 to 23.976 fps in the little window that appears when you load the XML. That seems stupid, but it's the only workaround for that nasty frame rate bug.
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV

Last edited by r0lZ; 19th December 2016 at 13:51.
r0lZ is offline   Reply With Quote
Old 19th December 2016, 14:45   #1336  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,524
The question above was intended on my behalf, as not receiving any answer here for a long time, I also asked it in the German forum. Apparently proper handling of subtitles never was a hot issue here.

This is actually what I did, demuxing into elementary bitmaps, editing them, then recomposing them back. The author suggested to go by DVD subs, where such editing tools exist, then converting them back to BD subs.

But thanks for the tip concerning BDSupToSub and 25fps, I never noticed it, maybe because I muxed directly the XML+PNG in tsmuxer.
__________________
Born in the USB (not USA)
Ghitulescu is offline   Reply With Quote
Old 19th December 2016, 14:57   #1337  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,086
Yes, editing the colors or transparency of DVD subs is easy, but it is a pity to have to reduce the colors to 4 and the transparency to 16 levels and lose the quality of the original BD SUP just to edit it!

For the frame rate bug, afaik it happens only when BDSup2Sub (java or ++) loads the XML/PNG stream, regardless of the frame rate included in the XML file. But I use the FPS conversion trick anyway, even when I load another format, just to be sure. With that trick, I have never experienced any sync problem.
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline   Reply With Quote
Old 25th December 2016, 05:18   #1338  |  Link
Bandits
Registered User
 
Join Date: Feb 2015
Posts: 15
Quote:
Originally Posted by r0lZ View Post
Yes, the timecodes in the XML are in the form HH:MM:SS:FF, where FF is a number of frames, not a fraction of a second. There is no way to be more precise than that.

However, the timecodes displayed in the GUI, are in the form HH:MM:SS.sss, where SS.sss is a floating point. And IMO it is extremely difficult to understand what BDSup2Sub does when it converts the input frame rate to the frame rate displayed in the GUI. Usually, they do not match at all. And it's not simply a precision problem. There is obviously a bug here, but increasing the precision will not fix it.

For example, if the XML timecode is 01:27:38:11 at 23.976fps, the frame number is 5258 seconds * (24/1001) + 11 = 126077. Converted back to a timecode, still at 23.976fps, that gives 126077 / (24/1001) = 5258.4617 seconds = approximately 01:27:38.462. But in the GUI, the time code displayed is 01:27:43.716 !!! It is obviously completely wrong ! It seems that BDSup2Sub does ALWAYS a framerate conversion, even when that option is not enabled.

Anyway, we have to live with that terrible bug, since BDSup2Sub is not developed any more.
I thought the time codes were:

FF - milliseconds
0 - 000
1 - 040
2 - 080
3 - 120
4 - 160
5 - 200
6 - 240
7 - 280
8 - 320
9 - 360
10 - 400
11 - 440
12 - 480
13 - 520
14 - 560
15 - 600
16 - 640
17 - 680
18 - 720
19 - 760
20 - 800
21 - 840
22 - 880
23 - 920
24 - 960

I could be wrong but its always worked for me. I seem to remember testing by exporting and importing using the above conversion and the times remained correct.

Edited typo on numbering.

I always use --fps-target keep and the above numbers work for all FPS.

Last edited by Bandits; 25th December 2016 at 18:42.
Bandits is offline   Reply With Quote
Old 25th December 2016, 11:50   #1339  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,086
@Bandits: There is a bug in your list of time codes. Frame 15 is missing, For 25fps, if the first frame is frame 0, frame 24 is the last frame in the same second, not frame 25.

And anyway, your timings are correct only for PAL at 25fps. BDSup2Sub is always correct when it deals only with streams at 25fps, since it's the frame rate that it assumes (wrongly) always. The bug happens only when it loads streams at other frame rates (film at 24fps, NTSC at 23.976 or 29.97fps or other exotic frame rates), if you don't specify explicitly to convert the frame rate to itself.
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV

Last edited by r0lZ; 25th December 2016 at 11:53.
r0lZ is offline   Reply With Quote
Old 22nd February 2017, 08:58   #1340  |  Link
DMD
Registered User
 
DMD's Avatar
 
Join Date: Jan 2006
Location: Italy
Posts: 181
Good morning
I ask if you can include the subtitle management 4K resolutions.

Thank you
DMD 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:49.


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