[FFmpeg-devel] Killing ASS timings in AVSubtitle ass text field

wm4 nfxjfg at googlemail.com
Sun Feb 21 17:33:40 CET 2016


On Sun, 21 Feb 2016 13:08:27 +0100
Clément Bœsch <u at pkh.me> wrote:

> [PATCH 1/6] Kill timed SSA
> 
> This one is an old patch, which kills the usage of the old and unused
> AV_CODEC_ID_SSA
> 
> [PATCH 2/6] lavc: allow subtitle text format to be ASS without timing
> 
> The big commit. Text based decoders do not have to rescale and insert the
> timing in the ASS text anymore. A compatibility function
> (convert_sub_to_old_ass_form()) is used to actually re-insert them. After this
> commit, you can get clean AVSubtitle by setting sub_text_format=ass in decoder
> context.
> 
> [PATCH 3/6] lavc/options: add ass_ro_flush_noop to flags2
> 
> Apparently, mpv do not want to reset the ReadOrder of the decoded subtitles on
> flush. This addition of this option makes it possible.

Whether a user wants this flag or not really depends on the use-case.
For example, if you'd encode a single file from multiple source files,
and concatenate the subtitle streams, then resetting the ReadOrder on
each source file would generate an invalid output file. The ReadOrder
has to be unique, and if it isn't, libass might e.g. not show subtitles
with the same ReadOrder after the first one.

> 
> [PATCH 4/6] ffmpeg: set sub_text_format to ass (without timing) by default
> 
> Make use of the newly introduced option. The nice side effect is that it fixes
> all kind of long standing timing inaccuracy issues.
> 
> [PATCH 5/6] lavfi/ass: use ass_process_chunk() instead of ass_process_data()
> 
> libass has been willing to drop this since a long time...
> 
> [PATCH 6/6] lavc: deprecate decoded ass subtitles with timings
> 
> And the final deprecation to kill that code automatically at next major bump.
> Compilation and FATE tested when set to 0.


More information about the ffmpeg-devel mailing list