wswartzendruber
14th February 2023, 04:39
Greetings.
I have two PGS projects on GitHub. One is written in Rust and seeks to crop subtitles and also adjust their brightness levels. It's basically in working order. The other is a .NET Standard 2.0 library that hopes to eventually support intuitive manipulation of PGS streams. Others could then incorporate it into their own applications.
Now for those who don't know, PGS uses RLE compression for the actual bitmap data. This isn't so efficient, and my experimentation shows that using PNG requires only 61% of the bytes needed.
Now to be honest, a lot of this is just the desire for a graphical subtitle format to appear that isn't as convoluted as PGS. I'm thinking that it could actually be quite simple. Each frame could have:
timestamp-ms: 4 bytes
duration-ms: 2 bytes
x-location: 2 bytes
y-location: 2 bytes
png-length: 4 bytes
png-buffer: [png-length] bytes
With the way subtitles are used to today, the above proposal should be the sum total for the new format's complexity. If this format could gain popularity within the ripping community, vendors could be incentivized to implement it due to its simplicity.
All right, now let's all have at it: Why wouldn't this work?
I have two PGS projects on GitHub. One is written in Rust and seeks to crop subtitles and also adjust their brightness levels. It's basically in working order. The other is a .NET Standard 2.0 library that hopes to eventually support intuitive manipulation of PGS streams. Others could then incorporate it into their own applications.
Now for those who don't know, PGS uses RLE compression for the actual bitmap data. This isn't so efficient, and my experimentation shows that using PNG requires only 61% of the bytes needed.
Now to be honest, a lot of this is just the desire for a graphical subtitle format to appear that isn't as convoluted as PGS. I'm thinking that it could actually be quite simple. Each frame could have:
timestamp-ms: 4 bytes
duration-ms: 2 bytes
x-location: 2 bytes
y-location: 2 bytes
png-length: 4 bytes
png-buffer: [png-length] bytes
With the way subtitles are used to today, the above proposal should be the sum total for the new format's complexity. If this format could gain popularity within the ripping community, vendors could be incentivized to implement it due to its simplicity.
All right, now let's all have at it: Why wouldn't this work?