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. |
3rd April 2022, 03:29 | #1 | Link |
hlg-tools Maintainer
Join Date: Feb 2008
Posts: 413
|
PGS Bitstream Question: Cropping + Abrupt Packet End
What on God's green earth does it mean when a composition object declares cropping flag 0x40 and then abruptly ends?
And while we're at it, who the hell came up with this god-forsaken format, anyway?! I haven't been hit in the head with a metal pipe anywhere near enough times to think this is a rational way of going about things! |
3rd April 2022, 15:37 | #2 | Link |
Registered Developer
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,347
|
cropping flag is a single bit, it can't be 0x40?
In some software, the entire flag field is called "composition flags" (2 valid bits, 6 reserved ones, as far as I know), with 0x80 being cropping, and 0x40 being "forced on", eg. used for forced/alien subtitles. Only in the first case, composition flag being 0x80 (or rather, including 0x80, its a bitmask), would the crop rectangle be present.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders |
3rd April 2022, 17:09 | #3 | Link |
hlg-tools Maintainer
Join Date: Feb 2008
Posts: 413
|
All right, going by The Phantom Menace (2011 U.S. Blu-ray) subtitles, that indeed makes sense. I've also checked the original Ghost in the Shell anime (4K U.S. release) and it makes sense there as well.
I can't find any mention of this in the patent that defines PGS. |
3rd April 2022, 17:42 | #4 | Link |
Registered Developer
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,347
|
Patents are often out of date with any future development of the format - they are not meant to implement against, afterall. The Blu-ray specs include proper documentation for the format.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders |
3rd April 2022, 23:26 | #6 | Link |
Registered User
Join Date: Feb 2022
Posts: 108
|
Of course not. You have to pay or request them for an evaluation period.
VLC specifically masks the composition flag with 0x80 for cropping. If the flag is set, then it fetches 4xint16 additional values from the stream (which I find surprising, I would assume those 8 bytes being present whatsoever, with garbage or zero value – "stream consistency"). The function header also claims the cropping is a "TODO" so who knows if that's correct at all. The patent also claims that there can be numerous cropping_rectangle_information for a single window, but it doesn't make sense whatsoever (see sheet 8). Can you elaborate on that? How can a specific subtitle be forced if that can be defined at the stream level? Also, if a given subtitle track is selected, it will be displayed anyway. I don't see the purpose at all so I must me missunderstanding the point. Last edited by cubicibo; 3rd April 2022 at 23:29. |
4th April 2022, 00:13 | #7 | Link | ||||
hlg-tools Maintainer
Join Date: Feb 2008
Posts: 413
|
Quote:
Quote:
Quote:
Quote:
I do have some titles that use forced captions, however. For a track dedicated to foreign translation, all captions are forced. For tracks that contain all dialogue, only the captions that appear in the translated captions are forced. Ergo, the captions marked as "force" are the same between the two. EDIT: Here's a link to my work: https://github.com/wswartzendruber/pgs-tools Maybe someday I'll publish this as a Rust crate. I was worried about someone grabbing the "pgs" name, but now that I think about it, I'm probably going to call it "brain-damage" or some-such. Last edited by wswartzendruber; 4th April 2022 at 00:20. |
||||
4th April 2022, 07:11 | #8 | Link | ||
Registered Developer
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,347
|
Quote:
Quote:
If you rip from a Blu-ray disc, you can also choose to filter the subtitles and put the forced ones into a separate track if that makes it more convenient for your target container - eg. MakeMKV offers that as an option.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders Last edited by nevcairiel; 4th April 2022 at 07:16. |
||
4th April 2022, 07:43 | #9 | Link | ||
Registered User
Join Date: Feb 2022
Posts: 108
|
Quote:
Quote:
EDIT: May I ask for a sample containing solely the Epoch DSs where the said flag is set? Last edited by cubicibo; 4th April 2022 at 13:11. |
||
4th April 2022, 14:31 | #10 | Link | ||
hlg-tools Maintainer
Join Date: Feb 2008
Posts: 413
|
Quote:
Quote:
http://wswartzendruber.net/uploads/g...eng-forced.sup EDIT: Here's the documentation for the Rust library: http://wswartzendruber.net/doc/pgs-tools/pgs/ Last edited by wswartzendruber; 4th April 2022 at 14:50. |
||
|
|