[FFmpeg-devel] [PATCH 21/24] fftools/ffmpeg: Introduce subtitle filtering new frame-based subtitle encoding

Soft Works softworkz at hotmail.com
Sat Jan 15 10:36:15 EET 2022



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of Michael
> Niedermayer
> Sent: Friday, January 14, 2022 5:53 PM
> To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH 21/24] fftools/ffmpeg: Introduce subtitle
> filtering new frame-based subtitle encoding
> 
> On Fri, Jan 14, 2022 at 01:13:30AM +0000, ffmpegagent wrote:
> > From: softworkz <softworkz at hotmail.com>
> >
> > This commit actually enables subtitle filtering in ffmpeg by
> > sending and receiving subtitle frames to and from a filtergraph.
> >
> > The heartbeat functionality from the previous sub2video implementation
> > is removed and now provided by the 'subfeed' filter.
> > The other part of sub2video functionality is retained by
> > auto-insertion of the new graphicsub2video filter.
> >
> > Justification for changed test refs:
> >
> > - sub2video
> >   The new results are identical excepting the last frame which
> >   is due to the implementation changes
> >
> > - sub2video_basic
> >   The previous results had some incorrect output because multiple
> >   frames had the same dts
> >   The non-empty content frames are visually identical, the different
> >   CRC is due to the different blending algorithm that is being used.
> >
> > - sub2video_time_limited
> >   The third frame in the previous ref was a repetition, which doesn't
> >   happen anymore with the new subtitle filtering.
> >
> > - sub-dvb
> >   Running ffprobe -show_frames on the source file shows that there
> >   are 7 subtitle frames with 0 rects in the source at the start
> >   and 2 at the end. This translates to the 14 and 4 additional
> >   entries in the new test results.
> >
> > - filter-overlay-dvdsub-2397
> >   Overlay results have slightly different CRCs due to different
> >   blending implementation
> >
> > Signed-off-by: softworkz <softworkz at hotmail.com>
> > ---
> >  fftools/ffmpeg.c                          |  493 ++++----
> >  fftools/ffmpeg.h                          |   13 +-
> >  fftools/ffmpeg_filter.c                   |  235 ++--
> >  fftools/ffmpeg_hw.c                       |    2 +-
> >  fftools/ffmpeg_opt.c                      |    3 +-
> >  tests/ref/fate/filter-overlay-dvdsub-2397 |  182 +--
> >  tests/ref/fate/sub-dvb                    |  162 +--
> >  tests/ref/fate/sub2video                  | 1091 +++++++++++++++++-
> >  tests/ref/fate/sub2video_basic            | 1239 +++++++++++++++++++--
> >  tests/ref/fate/sub2video_time_limited     |   78 +-
> >  10 files changed, 2829 insertions(+), 669 deletions(-)
> 
> ./ffmpeg -i ~/tickets/153/bbc_small.ts -filter_complex '[0:v][0:s]overlay' -
> qscale 2  -t 3 f.avi
> 
> Press [q] to stop, [?] for help
> Auto-inserting subfeed filter
> Auto-inserting graphicsub2video filter
> Assertion c > 0 failed at libavutil/mathematics.c:60
> Aborted (core dumped)

Thanks for testing.

With the new update also incorporating the final step (complete removal
of heartbeat code), it is unfortunately invalidating the previous test
results. The new version is providing the subfeed filter as a replacement
for the heartbeat functionality, which is working somewhat differently,
and even more tests (of those you are running) won't have bitexact results.
In those cases a visual comparison will be required.

Anyway, the previous results were erroneous in several ways, so it cannot 
be seen as a straight reference. The individual results need to be evaluated
individually in case there are significant differences.


Thanks,
softworkz







More information about the ffmpeg-devel mailing list