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 29th February 2024, 19:35   #1741  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,297
Have you checked if ass2bdnxml can do what you're looking for ?
__________________
My github.
jpsdr is offline   Reply With Quote
Old 29th February 2024, 21:15   #1742  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,537
Quote:
Originally Posted by jpsdr View Post
Have you checked if ass2bdnxml can do what you're looking for ?

Does it convert sup to png?
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 1st March 2024, 19:26   #1743  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,297
Absolutely not, it creates XML+PNG from ass file, so, i misunderstood you needs.

In that case, did you try BDSup2Sub ?
__________________
My github.
jpsdr is offline   Reply With Quote
Old 2nd March 2024, 08:47   #1744  |  Link
von Suppé
Registered User
 
von Suppé's Avatar
 
Join Date: Dec 2013
Posts: 625
Other than BDSup2Sub, I think a much overlooked feature of SE is its so-called "SUP-editor".

Go File --> Import --> Blu-ray (.sup) subtitle file for edit. Once you've opened a SUP, you can Save as --> BDN xml/png (*xml). All images and positions will go unchanged. It's also able to convert xml/png back to SUP.

I wouldn't know how to split subs used in the "upper" from "lower" parts.
von Suppé is offline   Reply With Quote
Old 2nd March 2024, 11:31   #1745  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,537
Quote:
Originally Posted by von Suppé View Post
Go File --> Import --> Blu-ray (.sup) subtitle file for edit. Once you've opened a SUP, you can Save as --> BDN xml/png (*xml). All images and positions will go unchanged. It's also able to convert xml/png back to SUP.
AFAIK the position is stored in the xml file. I need that in the png, i.e. an exact image of how it would appear on the screen.

Quote:
Originally Posted by von Suppé View Post
I wouldn't know how to split subs used in the "upper" from "lower" parts.
That's the easiest part, there are many graphic utilities that can batch resize the canvas of an image. The hard part seems to be to have that image.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 2nd March 2024, 13:20   #1746  |  Link
von Suppé
Registered User
 
von Suppé's Avatar
 
Join Date: Dec 2013
Posts: 625
Quote:
Originally Posted by tormento View Post
AFAIK the position is stored in the xml file. I need that in the png, i.e. an exact image of how it would appear on the screen.
Indeed the positioning coordinates are in the xml file. In the SUP-editor you can import a background video where each subtitle is displayed at its correct position. Maybe I'm missing something here...
von Suppé is offline   Reply With Quote
Old 2nd March 2024, 23:28   #1747  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,537
Quote:
Originally Posted by von Suppé View Post
Indeed the positioning coordinates are in the xml file. In the SUP-editor you can import a background video where each subtitle is displayed at its correct position. Maybe I'm missing something here...
Beside the xml, I just plain need a png with the same size of the video resolution and the subtitles in the correct position as they are displayed on the screen.

I don't know if you ever dealt with anime but having subtitles both in the upper part and in the lower part, overlapping times, makes post editing necessary with a lot of PITA.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 3rd March 2024, 10:17   #1748  |  Link
von Suppé
Registered User
 
von Suppé's Avatar
 
Join Date: Dec 2013
Posts: 625
Quote:
Originally Posted by tormento View Post
I don't know if you ever dealt with anime but having subtitles both in the upper part and in the lower part, overlapping times, makes post editing necessary with a lot of PITA.
No, I have not dealt with these kind of subtitles. It would indeed strike me as quite elaborate.
About "overlapping times", does PGS format natively support this actually? Or would it mean then one SUP image ends at the same time the next - other - image starts? I remember doing subs for sign language where the sentences were build up word for word.
von Suppé is offline   Reply With Quote
Old 3rd March 2024, 10:22   #1749  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,537
Quote:
Originally Posted by von Suppé View Post
No, I have not dealt with these kind of subtitles. It would indeed strike me as quite elaborate
PGS is “simply” a series of images, showing in time order. That image can have whatever it wants: colors, text in every part of the screen and mostly in anime it happens to have multiple text lines, luckily almost always just in two parts of the screen, upper and lower. Well, there can be also signs translations but luckily there are only a few.

I asked many time to nikse to allow a sort of dual pass ocr, I.e. the upper part of the screen and the lower part. He never had time or will to listen to me, well some millions of anime watchers would beg to have that feature. If you are interested I could send you a sup to play with.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 3rd March 2024, 12:19   #1750  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,297
The one thing i know about overlapping timing, is that it seems it's not possible in XML+PNG, as if you import such a thing in Scenarist, it throws an error. The trick, is to create a stream of pictures, creating a different pictures when there is a change in the display and also split the timing at each of these changes.

For a 2 overlapping lines for exemple, you'll create 3 pictures. First when there i only the first line, a second with with the two lines, and a third with only the second lines. Also, you had to split the original timing for each lines in a 3 sequence continous timing.

But, it's VERY difficult with this kind of subtitles to not have "buffer underrun" error in Scenarist when it creates the subtitles when there is too much lines, or just too much overlapping continuous sentences.
This is the specific case of Blu-Ray. Maybe the sup/pgs format allow overlapping, but Blu-Ray don't (or just Scenarist don't).
__________________
My github.
jpsdr is offline   Reply With Quote
Old 3rd March 2024, 13:24   #1751  |  Link
cubicibo
Registered User
 
Join Date: Feb 2022
Posts: 100
You can have two distincts <event> with partially overlapping InTC and OutTC as long as:
- Each <Event> has a single <Graphic> (maximum of two concurrent <Graphic>)
- The <Graphic> do not spatially overlap.
- The palette of both <Graphic> are identical, or they can be combined as a single <256 colours palette.

This method has pros and cons:
- Better buffer management.
- Easy usage of inline effects like fade, position, color.
- More efficient stream encoding
- Limited to two objects
- PGS encoder is easy to implement: the BDN XML describes the data stream well enough.
- Limited to two overlapping event at any time.
- Palette has to be managed carefully in PNG generation logic.
- Palette management is constrained and hard to implement. The easy way out is to always use 127+1 colors per event. But this may not be enough for colorful subtitles.

Since the conditions above are just too much for most renderer, especially events sharing the same palette, most software rightfully use non overlapping <event>.

- Each <event> can have one or two <graphic>, whose content is irrelevant.
- No need to worry about spatial overlapping across different <event>.
- Each <event> has its own palette (which need to be shared by the two <graphic>). No need to consider neighbout events in time to generate the palette, only the active <graphic>(s).
- Cannot easily make use of BDN inline effects, as there's no logical <graphic> continuity in the <Events> timeline.
- Cannot encode PGS easily, as the BDN gives no helpful indication on the datastream structure, contiguous events, and so on.
- Way too many <graphic> generated, with often suboptimal splits and sizes.

And that's the shitty part.
- There's no smart BDN generators. The output is already too specific to the PGS format, differs too much from common subtitling needs to demotivate companies to implement it properly. Maybe Lemony Pro gets a few things right, but is still not ideal.
- "Stupid" BDN generators like avs2bdnxml or ass2bdnxml leave all the complexity to the PGS encoder. Scenarist and co do their best, but they all have their own issues. The main problem with Scenarist BDNImport is to allocate one buffer slot for every unique bitmap shape. It should just pad everything to the same size to reuse memory allocation. If your BDN is not nicely made, Scenarist won't be happy.

In essence, PGS encoders expect the BDN XML generators to address the complexities. And BDN generators wants PGS encoders to handle them. It is like politics, all blaming each others and not doing anything

Anyway, just my brain dump on the matter raised by jpsdr.

Last edited by cubicibo; 3rd March 2024 at 13:47.
cubicibo is offline   Reply With Quote
Old 5th March 2024, 14:15   #1752  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,537
Look at this PGS, at a certain point it becomes a pain.

If you can help me to find a faster strategy to ass conversion, I will be really grateful.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 17th March 2024, 08:27   #1753  |  Link
von Suppé
Registered User
 
von Suppé's Avatar
 
Join Date: Dec 2013
Posts: 625
@Nikse
There's something wrong with the SUP editor in version 4.0.3 Try importing a SUP with background video, do some positioning edits and save as XML/PNG. Now import the result back.
All durations come out negative which values start very small and negatively increase towards the last subs. Can you have a look? Tried on both Windows 7 and 10.

[EDIT] FYI version 4.0.2 also has this behaviour. Version 4.0.1 works well.

Last edited by von Suppé; 17th March 2024 at 13:09.
von Suppé is offline   Reply With Quote
Old 17th March 2024, 20:40   #1754  |  Link
Zetti
Registered User
 
Join Date: Dec 2015
Posts: 303
Thanks for new release:
https://github.com/SubtitleEdit/subt...ases/tag/4.0.4
Zetti 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 09:10.


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