Log in

View Full Version : bdsup2sub++ - convert and tweak bitmap subtitles.


Pages : 1 2 3 4 5 [6]

Stereodude
27th September 2022, 19:21
Avatar 3D is well known for the problem of their subtitles. In the BD3D, there are two subtitle streams with the same UIDs, one in the main AVC M2TS (the primary view, used when you watch the stream in 2D) and one in the AVC M2TS (dependent stream, used only for 3D). If you are using the 3D version of the BD, don't worry, as 2 streams with the same UID cannot be parsed correctly with most software demuxers !
Interesting... I found the 2D version to be more broken than the 3D with the single .sup the demuxer's find, but I wasn't aware there were two subtitles streams with one for each eye. I watched the 3D Blu-ray rip (made with MakeMKV) with my GF over the weekend and discovered the forced subtitles were messed up. The .mkv only has 1 subtitle stream, so that's where I started. I now have a mkv of each with forced subtitles that have only the correct subtitles in them, that display for the right amount of time, that appear in the right place on the screen. There's only one .sup in each though.

Is there actually a way to handle the two subtitle streams for the 3D disc correctly in a .mkv?

Edit: Or a way to create a .mkv without re-encoding that has subtitles with the same 3D depth as the original Blu-ray?
Edit2: Seems like there is no way to assign a 3D plane to the .sup in a .mkv

von Suppé
28th September 2022, 11:17
Is there actually a way to handle the two subtitle streams for the 3D disc correctly in a .mkv?

3DBD usually carries one subtitle. Not one for each eye. Avatar is just an odd one out. Subtitle depth information is present in so-called "3D planes" which are carried by the MVC stream. A 3D compatible player can read this information and will create the second subtitle with the proper offset, and overlay this on frames for the other eye.

As such, mkv just carries the same one subtitle (for each language of course) that's in the AVC mainstream of a 3D disc. Regarding video, main difference between 3D bluray and 3Dmvc-mkv is that the AVC-stream and MVC-stream are interleaved into one elememtary videostream. This is what MakeMKV does.

r0lZ
28th September 2022, 13:05
Yes. And the number of the 3D-Plane associated with a particular subtitle stream is stored in the MPLS file on the 3DBD. Since that file is lost when MakeMKV muxes the tracks to the final MKV 3D, the 3D-Plane number was lost too, but I have asked to copy it in a special tag. That information is therefore available now (and is used by BD3D2MK3D) when the 3D MKV has been created by MakeMKV. I don't know if it is possible to modify or specify that tag manually.
BTW, a similar problem existed for the order of the main and dependent video streams (left/right or right/left eyes). With old versions of MakeMKV, that information was also lost, then incorrect, but it should be available and correct now.

von Suppé
28th September 2022, 14:33
From day one, I've always been creating BD-ISO for "movie-only" and my homebrew sups. Always worked on every 3D player. I have very limited experience with mvc-mkv.

...to copy it in a special tag. That information is therefore available now...

Am I right to consequently assume that displaying the (intended) subtitle depth will be at the mercy of a player's ability to read this special tag in the first place?
Interesting anyways. When I have time I'll rip a 3DBD with MakeMKV and go see for myself.

Edit2: Seems like there is no way to assign a 3D plane to the .sup in a .mkv
I don't know if it is possible to modify or specify that tag manually.

If not, there may be a workaround. First create a 3DBD with tsMuxer (where you can assign the right 3D-plane to a PGS stream). Rip that result with MakeMKV. Hopefully this works.

Stereodude
28th September 2022, 18:20
Yes. And the number of the 3D-Plane associated with a particular subtitle stream is stored in the MPLS file on the 3DBD. Since that file is lost when MakeMKV muxes the tracks to the final MKV 3D, the 3D-Plane number was lost too, but I have asked to copy it in a special tag. That information is therefore available now (and is used by BD3D2MK3D) when the 3D MKV has been created by MakeMKV. I don't know if it is possible to modify or specify that tag manually.
BTW, a similar problem existed for the order of the main and dependent video streams (left/right or right/left eyes). With old versions of MakeMKV, that information was also lost, then incorrect, but it should be available and correct now.
Mosu said there was no way to assign a PGS subtitle (.sup from Blu-ray) to a 3D plane in a .mkv container. How is MakeMKV putting that into the file? Additionally, do any software or hardware players use that tag?

Stereodude
28th September 2022, 18:27
3DBD usually carries one subtitle. Not one for each eye. Avatar is just an odd one out. Subtitle depth information is present in so-called "3D planes" which are carried by the MVC stream. A 3D compatible player can read this information and will create the second subtitle with the proper offset, and overlay this on frames for the other eye.

As such, mkv just carries the same one subtitle (for each language of course) that's in the AVC mainstream of a 3D disc. Regarding video, main difference between 3D bluray and 3Dmvc-mkv is that the AVC-stream and MVC-stream are interleaved into one elememtary videostream. This is what MakeMKV does.
Are you sure that all 3D versions of Avatar do this? Mine shows only 1 PGS subtitle and it's assigned to a 3D plane from the MVC. What tool should I use to see the 2nd subtitle track? (if it's there)

https://i.imgur.com/SA0UFkK.png

Stereodude
28th September 2022, 18:34
From day one, I've always been creating BD-ISO for "movie-only" and my homebrew sups. Always worked on every 3D player. I have very limited experience with mvc-mkv.
I came to that conclusion yesterday... That a "movie only" BD-ISO is a better way to rip 3D Blu-rays. I had only ripped a few to .mkv for testing. I used TSmuxer and the .mkv to make a .ISO from them. I used the original 3D Blu-ray to find the right plane to assign the PGS subs to.

von Suppé
29th September 2022, 09:43
How is MakeMKV putting that into the file?

Unless I'm missing something here, I think r0lZ has answered this. He asked for a special tag with that data and his request obviously was honoured. So when a MakeMKV-created 3D-mkv is imported in BD3D2MK3D, the tag can be read to determine the right 3D-planes.

Are you sure that all 3D versions of Avatar do this? Mine shows only 1 PGS subtitle and it's assigned to a 3D plane from the MVC. What tool should I use to see the 2nd subtitle track? (if it's there)

No, I am not sure. It's been a long time and don't remember how my Avatar disc layout looked like. Also I don't think I have the US version.
Doesn't the second subtitle show already in your screenshot (at the bottom, as disabled)? Isn't that the one used for 2D, like r0lZ said?

[EDIT] I just realised we're still in the bdsup2sub++ thread. To avoid further pollution, shouldn't we better continue this conversation in your "Avatar sups" thread?

r0lZ
29th September 2022, 10:18
Am I right to consequently assume that displaying the (intended) subtitle depth will be at the mercy of a player's ability to read this special tag in the first place?
Interesting anyways. When I have time I'll rip a 3DBD with MakeMKV and go see for myself.
Mosu said there was no way to assign a PGS subtitle (.sup from Blu-ray) to a 3D plane in a .mkv container. How is MakeMKV putting that into the file? Additionally, do any software or hardware players use that tag?
Honestly, I don't know. I have requested that tag for BD3D2MK3D, but I don't know if it is used by some players. It's theoretically possible but...

The tag is called "tag_3d-plane".

r0lZ
29th September 2022, 10:34
Are you sure that all 3D versions of Avatar do this? Mine shows only 1 PGS subtitle and it's assigned to a 3D plane from the MVC. What tool should I use to see the 2nd subtitle track? (if it's there)
That's exactly the problem. Since the 2 streams share the same UID, it is difficult for a software to discover that there are indeed two independent subtitle streams. Hence some major problems when you demux that streams with some demuxers (IIRC, with eac3to for example). The demuxer is confused by some overlapping subtitles and/or conflicting time-codes.

Note also that the main, normal subtitle track is, as it should, in the M2TS with the main 2D view (with the AVC video stream, all audio streams and the "standard" subtitle streams). The second track is in the "dependent M2TS", containing normally only the MVC video stream (for the second view, used only for 3D playback).

The second stream has NOT the same content than the first. It contains a full-screen panel with a message telling something like "put your 3D-glasses now". Not sure how a player is supposed to use that stream, and when it should be displayed (since, AFAIK, the player has no way to know if the 3D-glasses are used or not).

Of course, you can demux only the main M2TS. The demuxer will see only a single stream, and everything will work as expected. You can also try to demux the dependent M2TS alone, and you will probably succeed. The problem occurs when you try to demux the MPLS or the two M2TS at the same time.

Also, it is possible that recent editions of Avatar do not have the problem any more.

r0lZ
29th September 2022, 10:37
[EDIT] I just realised we're still in the bdsup2sub++ thread. To avoid further pollution, shouldn't we better continue this conversation in your "Avatar sups" thread?
Right. Unfortunately, I see this only now !

Perhaps a mod can move the last posts to the Avatar thread ? Thanks !

r0lZ
16th October 2022, 12:13
So over the last couple of weeks I've been working on knocking out a number of bugs and I thought I'd make a test build for people to try. That can be grabbed here (https://github.com/captainayy/BDSup2SubPlusPlus/releases/tag/1.0.4).
Indeed, some bugs are fixed. A crash of v1.0.3 has been reported here (https://forum.videohelp.com/threads/395498-BD3D2MK3D-Convert-3D-BDs-or-MKV-to-3D-SBS-TAB-or-FS-MKV-Support-thread/page9#post2669892) (with the difficult subtitles of Avatar 3D). I have checked the problematic SUP stream with v1.0.4b and the crash doesn't occur any more. I have therefore decided to replace the official v1.0.3 with your beta in BD3D2MK3D.

Is it possible to provide a 32-bit version ? That will be useful for peoples with an old hardware, still supported by BD3D2MK3D. Also, do you plan to release a new beta, or a final version soon ?

Thanks anyway for the current beta !

oniiz86
27th November 2023, 07:28
I know this is completely trivial & inconsequential but was curious if anyone or @r0lZ has experienced the default language to be set to "Cree (cr)" when exporting to VobSub (IDX/SUB)? When exporting to SUP to SUP(BD) there is no such issue, it's such a shame that @captainayy hadn't developed it further as his 1.04b beta release was really promising. :(
https://i.imgur.com/1mHVB0X.png

chompy
9th November 2024, 11:37
Hello,

I've just installed v1.0.4b and I've found a little bug:

If a frame is excluded from export and you export the subtitle in XML/PNG format, the corresponding PNG to that frame is not created, but the reference to it in the XML file is not deleted (exporting to SUP works as expected).

Thanks

chompy
12th November 2024, 15:57
Hello,

There's another bug I've just found: X Offset and Y Offset does not work on SUP subtitles, you can change values, but then original values are written again.

Thanks

hidef_rec
15th December 2025, 22:54
Hi. Is there a way w/this tool or another to edit a .sup (PGS) subtitle to remove certain lines and save as .sup? Not convert.

Music Fan
15th December 2025, 23:32
Yes, with Subtitle Edit. I don't know if bdsup2sub++ can.

Bandits
21st December 2025, 22:36
Hi. Is there a way w/this tool or another to edit a .sup (PGS) subtitle to remove certain lines and save as .sup? Not convert.

What do you mean remove lines?

PGS are images. If you want to remove a whole frame, then yes you can do it with bdsup2sub. You have to export it as xml/png, remove the frames you don't want from the xml, then resave as sup.

I do this to merge forced events into the main subtitle stream when they are in separate streams. I made my own tool to do this in a gui so I could see what I was doing.

For manual way:
Open sup in bdsup2sub
Export to xml
Open the xml in text editor
Find the frame info in bdsup2sub
Delete the matching entry in the xml
Save the xml
Open the xml in bdsup2sub
Export to sup.

You don't have to worry about the png's. Your new file will only have what was listed in the xml.