[FFmpeg-devel] [PATCH 2/2] lavc/WIP: allow subtitle text format to be ASS without timing
nfxjfg at googlemail.com
Sun Jan 10 20:24:19 CET 2016
On Sun, 10 Jan 2016 19:57:17 +0100
Clément Bœsch <u at pkh.me> wrote:
> On Sun, Jan 10, 2016 at 02:03:46PM +0100, wm4 wrote:
> > On Sat, 9 Jan 2016 14:46:52 +0100
> > Clément Bœsch <u at pkh.me> wrote:
> > > From: Clément Bœsch <clement at stupeflix.com>
> > >
> > > ---
> > > TODO
> > > - ass_split needs to be able to handle dialog event without "Dialogue:
> > > ..." so our encoding chain can handle the sane decoded subtitles
> > > - zvbi needs testing
> > > - option sub_text_format needs to be documented and default ready to be
> > > changed
> > > - doxy ff_ass_*
> > > - minor or micro lavc bump
> > > ---
> > Can I have a private option that prevents resetting readorder on flush?
> > In my own code, I don't want to delete the libass event list on seeks.
> > On the other hand, libass will use readorder to deduplicate events. So
> > if libavcodec outputs packets with the same readorder, they will be
> > incorrectly dropped.
> > Unfortunately it looks like this would have to be implemented in every
> > decoder, which is not practical.
> It's not that much work to do, I could add that if it's indeed deemed
> But that option could instead make the decoders use the packet pos (with
> pts and dts fallback), but in all these cases, you risk an overflow on the
> ASS parser side.
Yes, libass stores ReadOrder as "int", so this won't work. If the
subtitles come from a file with audio/video streams, you could easily
exceed the int range. Also, libass won't handle arbitrary ReadOrder
values very efficiently (but on the other hand, maybe this doesn't
libass could be extended to make ReadOrder an int64_t, but I'm not sure
if this is a real solution.
More information about the ffmpeg-devel