[FFmpeg-devel] [PATCH 2/3] closed caption decoder: add new parameter to allow output to avoid repeated lines

Roger Pack rogerdpack2 at gmail.com
Thu Apr 30 08:30:43 EEST 2020


On Tue, Apr 28, 2020 at 1:46 AM Hendrik Leppkes <h.leppkes at gmail.com> wrote:
>
> On Tue, Apr 28, 2020 at 8:19 AM Roger Pack <rogerdpack2 at gmail.com> wrote:
> >
> > I didn't actually *need* this but thought the functionality was very
> > nice to have, so here's my contribution.
> >
> > It allows for forcing "rollup" style closed captions to output one
> > line at a time (basically, when there is a carriage return, it outputs
> > a line), so there is never any duplication in the output, for instance
> > if it's converted to .srt or .vtt files.  Without this you have output
> > like this:
> >
> >
> > 00:01.536 --> 00:03.605
> > AND AS A SECONDARY QUESTION, I
> >
> > 00:03.605 --> 00:05.707
> > AND AS A SECONDARY QUESTION, I
> > WOULD ASK YOU HOW OUR VETERANS
> >
> > 00:05.706 --> 00:09.343
> > WOULD ASK YOU HOW OUR VETERANS
> > AND ACTIVE DUTY MILITARY HAVE
> >
> > 00:09.344 --> 00:10.412
> > AND ACTIVE DUTY MILITARY HAVE
> > FARED UNDER THIS COMMANDER IN
> >
> > With it set to "1" you get output like this:
> >
> >
> > 00:02.014 --> 00:03.049
> > SOLDIERS HOME IN HOLYOKE,
> >
> > 00:03.048 --> 00:04.116
> > MASSACHUSETTS, HAVE LOST 73.
> >
> > 00:04.116 --> 00:04.850
> > ANOTHER FACILITY IN NEW ORLEANS,
> >
> > 00:04.850 --> 00:06.184
> > 53.
> >
> > 00:06.184 --> 00:07.753
> > VETERANS ARE IN REAL PERIL
> >
> > 00:07.753 --> 00:14.193
> > BECAUSE OF A LACK OF PREPARATION
> >
> > 00:14.193 --> 00:15.727
> > AND THEN THE SAME DYSFUNCTION
> >
>
> I would've figured that even when you split it into  individual lines,
> that each line would show for the same amount as it did before, ie.
> with overlap in the SRT. Otherwise, some lines like the "ANOTHER
> FACILITY IN NEW ORLEANS," one are shown for not even a second, which
> seems pretty bad.


The chief goal of the new setting is to make it easier for automated
processes to parse the output (realtime or otherwise).

Like "read from analog tuner and tail the .vtt file and see what the
subtitles are" without having to worry about duplication of lines.  So
it not displaying for long isn't a problem in this case.
This seems like a useful functionality for me.
The goal here is to just show the latest line in the .srt output, no
previous lines.  I think that's useful, though not for display
purposes, in which case they can just use the default anyway?

Thanks.
-roger-

>
> - Hendrik
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list