Re: [matroska-devel] Re: a subtitle format

Christian HJ Wiesner <[email protected]> Thu, 06 Mar 2003 13:21:25 +0100
Newsgroups gmane.comp.multimedia.usf.devel,gmane.comp.multimedia.matroska.devel
Message-ID <[email protected]>
TO : [email protected]
TO : [email protected]

Hi Gabest,

Gabest wrote:

>>@Gabest : was it possible to include libpng into VobSub, such that the
>>Bitmaps could be compressed to PNG, without altering anything ? Of
>>course, matroska codec ID would then be set to
>>    
>>
>
>I did not follow this discussion but if this is about muxing bitmaps as
>subtitles then I don't understand why vobsub or any other future
>filter/renderer doing the painting needed to know about the storage format
>of the pictures.
>
Well, my idea was that maybe VobSub could do the PNG compression of the 
Bitmaps for the user, and output to a file with another extension, like  
.SPN  ( or whatever ).

The matroska muxer that would mux the subtitle stream into a matroska 
file would then recognize that this is NOT a bitmap substream, but that 
PNG compression was used, and would set the corresponding codec ID in 
the matroska track header. For playback, the matroska DirectShow demuxer 
( splitter ) could either

- call DVobSub for playback ( means libpng had to be implemented in 
DVobSub also )
- decode the PNG sub stream to Bitmap and handle to the player
- decode the PNG to Bitmap and call the overlay mixer ( tricky )
- handle the subs stream unaltered to the player, and this cares about 
the PNG decompression ( works only with special matroska adapted player 
like TCMP )

My preferred solution was Nr. 1, but i understand if you dont want to 
introduce a new subs format to VobSub, just for matroska.

> Multiplex every kind of subpictures like idx/sub or bmps as
>png and the demuxer will output it as an uncompressed subtitle image towards
>the renderer.
>

IMHO there should be a way to differentiate if a .SUB file contained PNG 
compressed images or uncompressed bitmaps. Either you do this with a 
flag in the .SUB file header ( i dont know the structure of your format 
i hate to admit ) or by choosing another extension ( see above ).
In any case, as you are the author of VobSub and an expert in this 
field, we will closely listen to your advice in this respect :-) !!

@spyder : John, could you consider updating your existing proggie 
SRT2USF to a more universal tool like SUB2matroska ? So it would accept 
.SRT, .SUB, .ASS and .SSA on the input, and would allow the user to 
define what the output sub stream was ( PNG or BMP, USF or TEXT/ASCII , 
TEXT/UTF8  ), but already muxed into a matroska file, with the correct 
codec ID set, so it is ready for muxing by mkvmerger ?

Regards

Christian

http://usf.corecodec.org