[FFmpeg-devel] Format of decoded text subtitles

Clément Bœsch ubitux at gmail.com
Thu Aug 2 11:56:53 CEST 2012


On Thu, Aug 02, 2012 at 11:26:38AM +0200, Nicolas George wrote:
> Le quintidi 15 thermidor, an CCXX, Clément Bœsch a écrit :
> > I think that markup can be left unchanged to start with: no changes
> > required in the decoders. And I also think we should follow Michael's
> > recommendation about just extending the ASS markup to FFmpeg needs
> 
> If you really think it is better. What about simplifying markup: {\a2\fs25}
> -> {\a2}{\fs25}? It may make work easier for non-ASS encoders.
> 
> > only one "important" I see in the pure markup thing is text justification;
> > I don't think ASS has that). I'd propose to wait for the AS6
> > specifications (ASS++) to see if we can't just follow it.
> 
> Do you know when it is due?
> 

You should ask the aegisub team, I have no idea; some seems to consider it
like another vapourware.

> > I guess you'll hit some classic storage issues, such as how to make a sane
> > key/value system for palettes for example. I can't think of much more
> > things.
> 
> What do you mean exactly?
> 

JACOsub for instance support palettes: how would you store them, and use
them? Also, what happens if another format defines another way of
exposing a palette?

> 
> I realized that this proposal has an easy solution for transition: since
> currently a lot of decoders fill the rect->ass field with a full ASS event
> line, converting old encoders to the new format can be done in the wrapper
> function:
> 
> 	if (rect->ass && !rect->rich_text) {
> 	    av_log(avc, AV_LOG_WARNING, "Please update the decoder\n");
> 	    ff_convert_legacy_ass(rect);
> 	}
> 

Just to be sure, what real issue are you trying to solve here? If you're
trying to make a sane modular system for subtitles codecs, I would instead
suggest again to store the markup in an AST. That looks a bit overkill to
me since I don't see much issues with the current state, but clearly
better than the strings mangling you seem to propose.

Having an AST being able to support both nested styles, flat styles and
karaoke events should be possible.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120802/2c93c9b2/attachment.asc>


More information about the ffmpeg-devel mailing list