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 |
27th September 2009, 19:38 | #1 | Link |
Programmer (or just 教务长)
Join Date: Oct 2008
Location: Valencia, Spain
Posts: 4,251
|
readSUP - CLI to downscale/resize SUP to 720p/576i/480i and extract timings to SRT
Here is a small tool to create 'srt' timings from .sup file and to downscale (only) higher to lower resolution: readSUP (only 40kb (or 90kb with the icon) - requires calclib.dll (1.4MB) from multiAVCHD/CalcIt or just full download (600kb)).
I don't know if there is any use of it... I decided today to play around with this .sup format and see if it is possible to create a CLI for resizing .sup subtitles. The idea was to make it small and not dependent on NET framework or java or anything... just a standalone exe+dll. Also here is a link to another tool textST which extracts textST subtitle streams from m2ts / pes files. Code:
C:\>readSUP.exe readSUP 0.2 - SUP/PGS analyzer & resizer (deank@doom9) Usage: readSUP input_file [out_file] /720|576|480 /verbose /srt /analyse /left * input_file must be in SUP/PGS format Code:
C:\>readSUP.exe 00000.track_4608.sup readSUP - SUP/PGS analyzer (deank@doom9) Detected 2928 segments and 366 objects (732 PG compositions). ... 00:02:14,857 - 00:02:14,926 # 113: $13 bytes, Presentation: 1920x1080@23.976 00:02:14,857 - 00:02:14,922 # 114: $A bytes, Window: 466,870 981x156 00:00:00,000 - 00:02:14,857 # 115: $4E4 bytes, Palette Definition 00:02:14,857 - 00:02:14,866 # 116: $D30F bytes, Object: 54024 bytes, 981x156 [C] 00:00:00,000 - 00:02:14,866 # 117: $0 bytes, End of Display Set 00:02:14,926 - 00:02:18,180 # IN_OUT TIME 00:02:18,175 - 00:02:18,180 # 118: $B bytes, Presentation: 1920x1080@23.976 00:02:18,175 - 00:02:18,175 # 119: $A bytes, Window: 466,870 981x156 00:00:00,000 - 00:02:18,175 # 120: $0 bytes, End of Display Set 00:02:18,319 - 00:02:18,388 # 121: $13 bytes, Presentation: 1920x1080@23.976 00:02:18,319 - 00:02:18,383 # 122: $A bytes, Window: 450,870 1013x156 00:00:00,000 - 00:02:18,319 # 123: $4E9 bytes, Palette Definition 00:02:18,319 - 00:02:18,328 # 124: $FFEF bytes, Object: 65577 bytes, 1013x156 [F] 00:02:18,319 - 00:02:18,328 # 125: $45 bytes, Object: (cont) 58 bytes [L] 00:00:00,000 - 00:02:18,328 # 126: $0 bytes, End of Display Set 00:02:18,388 - 00:02:23,727 # IN_OUT TIME 00:02:23,722 - 00:02:23,727 # 127: $B bytes, Presentation: 1920x1080@23.976 00:02:23,722 - 00:02:23,722 # 128: $A bytes, Window: 450,870 1013x156 00:00:00,000 - 00:02:23,722 # 129: $0 bytes, End of Display Set Code:
15 00:02:14,926 --> 00:02:18,180 Text line #15 16 00:02:18,388 --> 00:02:23,727 Text line #16 17 00:02:24,019 --> 00:02:28,482 Text line #17 Dean Last edited by deank; 1st October 2009 at 16:05. |
29th September 2009, 11:36 | #2 | Link | |
Author of BDSup2Sub
Join Date: Jun 2003
Posts: 478
|
Quote:
It took me quite some time to determine all of the timestamps for my simplified packet format in BD-SUP streams exported by BDSup2Sub, so I guess it will be a major effort to get this all right in a complex stream. |
|
29th September 2009, 19:57 | #3 | Link |
Programmer (or just 教务长)
Join Date: Oct 2008
Location: Valencia, Spain
Posts: 4,251
|
I'll see what will happen.
I had some time earlier today so I'm ready with the vertical resize. I loaded the 'resized' .sup file in BDsup2sub and it is just fine. Now I'll finish the horizontal resize and will post back with a test version. Except resizing I'll add simple parsing with changing the justification of the subtitles, so one can move them up or down and align them left/centered/right. Small steps at a time - after all it is just 200 lines of code without the help of any libraries or anything. edit: Ok, now resize works just fine Wasn't that hard. It is kind of slow (~9mins for 1400 subpictures 1920x1080->1280x720 conversion in 2hr movie), but I'll check the RLE decode/encode, as it seems it is slowing the whole process. Last edited by deank; 30th September 2009 at 17:32. |
30th September 2009, 14:16 | #4 | Link |
Programmer (or just 教务长)
Join Date: Oct 2008
Location: Valencia, Spain
Posts: 4,251
|
Task completed! Link in 1st post is updated to a fully working readSUP downscaller.
I'll appreciate any feedback (without complaints about speed). Dean p.s. Few small bugs were fixed, too. Last edited by deank; 30th September 2009 at 20:31. |
11th October 2015, 00:08 | #5 | Link | |
Registered User
Join Date: Oct 2009
Posts: 13
|
Wow, this post is really old, but I'm desperate. I need to extract TextST subs from a BD, using the textst.exe tool I only get the error.
Quote:
|
|
Tags |
multiavchd, readsup, textst |
|
|