View Full Version : Blu-Ray rip PGS / sup format questions
dandirk
22nd January 2010, 20:45
ok this is just a general question, that I am trying to figure out....
I mainly rip to mkv, but PGS seems to be supported in MKV soon.
I also use XBMC to view my rips, so it has some subtitle requirements/support...
When you extract PGS subs from Blu-ray with say TsMuxer or eac3to is the resultling supfile the native file format? Or is sup a converted version used by many tools?
The reason I ask is because XBMC supports PGS subs but when I rip/extract the sup, and remux to m2ts, XBMC will not show the subs.
If I rip and create a m2ts with TsMuxer directly from Disk the subs work fine.
Some one told me the sup format that eac3to rips is not the native format so you can't extract and remux properly.
Is this true?
Any tools out there where I can rip the exact supported PGS file and edit and remux.
0xdeadbeef
22nd January 2010, 21:31
When you extract PGS subs from Blu-ray with say TsMuxer or eac3to is the resultling supfile the native file format? Or is sup a converted version used by many tools?
The SUP files demuxed by Eac3to etc. are the PGS streams from the M2TS. They are not converted. However some stream fields (like internal time stamps) that are not needed to extract the bitmaps and display times might be omitted.
The reason I ask is because XBMC supports PGS subs but when I rip/extract the sup, and remux to m2ts, XBMC will not show the subs.
If I rip and create a m2ts with TsMuxer directly from Disk the subs work fine.
Some one told me the sup format that eac3to rips is not the native format so you can't extract and remux properly.
Is this true?
I haven't looked at it lately, but some time ago, Eac3To didn't use/extract the DTS timestamps (but only PTS) and set them all to 0 while tsMuxer extracted/created the DTS fields.
You can try to compare a PGS stream extracted by Eac3To and the same stream extracted by tsMuxer and they probably will only differ regarding the DTS fields.
Indeed these fields are not really needed to display the subtitles if processing power is not an issue, however a standalone with limited processing power will need them since they contain time offsets when data has to be loaded into internal processing units/buffers.
Therefore it surprises me that a software player refuses to play a PGS stream without DTS fields as it shouldn't need/use them anyway.
Any tools out there where I can rip the exact supported PGS file and edit and remux.
You already know how to extract and remux them. BDSup2Sub can edit BD-SUPs to some degree and also recreates the display time stamps.
dandirk
22nd January 2010, 21:50
ah... ok so sup is the native format, I was told at the xbmc forums that subs would only work if you rip/remux directly from disk with TsMuxer.
I did not try to extract with TsMuxer, edit forced only and remux with TsMuxer. I only test extraction with eac3to.
Could be the DTS timing... can't remember if the movie I tied even used DTS audio, don't think it did. I will try some more.
0xdeadbeef
22nd January 2010, 23:56
Sorry for confusing you, but the DTS I talked about is not related to the audio format, but a decoding time stamp. In the PGS stream, there are presentation time stamps (PTS) and decoding time stamps (DTS). There are indeed quite a few decoding time stamps for each subtitle that tell the decoder when e.g. it has to load the run length encoded bitmap data in the decoder so it's decoded in time for display.
As I said, this is important for standalones with dedicated hardware that really needs a relevant time to decode, paint or even clear the display buffer. If a PC decodes the subtitles, it usually doesn't have to care about this details.
Pelican9
31st January 2010, 16:07
As I said, this is important for standalones with dedicated hardware that really needs a relevant time to decode, paint or even clear the display buffer. If a PC decodes the subtitles, it usually doesn't have to care about this details.
Are you sure? It's quite new for me...
The 'standard' BD SUP format made by me and drmpeg based on the older SUP files. :)
This SUP file contains neither the elementary stream nor the PES stream.
It contains the elementary PG stream stuffed with 'PG', PTS, DTS (10 bytes together) at every boundary.
When I last demuxed a SUP from BD I used drmpeg's xport, but unfortunately he has removed this feature from his sw.
0xdeadbeef
31st January 2010, 17:32
Of course the PES packets are simplified to contain only the identifier, DTS, PTS, segment info and segment length read from the elementary stream. The PGS segments themselves are untouched though. So IMHO the SUP file contains the full, unmodified PGS stream and only the elementary wrapper is simplified. Anyway, for sure no PGS data is converted in any way.
The outer packet wrapper of the DVD-SUP format is similar though a little better thought-out as it gets rid off the packet fragmentation and the DTS fields.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.