[FFmpeg-devel] [PATCH v8 13/13] avfilter/graphicsub2text: Add new graphicsub2text filter (OCR)
Soft Works
softworkz at hotmail.com
Wed Sep 22 05:17:11 EEST 2021
> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of Andreas
> Rheinhardt
> Sent: Wednesday, 22 September 2021 04:05
> To: ffmpeg-devel at ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH v8 13/13] avfilter/graphicsub2text: Add
> new graphicsub2text filter (OCR)
>
> > +
> > +static void uninit(AVFilterContext *ctx)
> > +{
> > + SubOcrContext *s = ctx->priv;
> > +
> > + TessBaseAPIEnd(s->tapi);
> > + TessBaseAPIDelete(s->tapi);
>
> Beware: uninit is also called on init failure, so it might be that
> s->tapi is NULL or that TessBaseAPIInit4 did not succeed.
vf_ocr does it in the same way, so I assumed it to be safe.
Unfortunately there's no proper API documentation for tesseract.
[..] Will apply the stripped notes - thank you!
> > + if (frame->num_subtitle_areas > 0 && frame->subtitle_end_time >=
> 30000) {
>
> Where does this number come from?
dvbsubdec uses this as value when it can't determine the end display
time. Others are setting it to UINT64_MAX.
This is the indication to know that the subtitles do not have a
display duration and we need to wait for the next one instead.
softworkz
More information about the ffmpeg-devel
mailing list