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

Michael Niedermayer michael at niedermayer.cc
Thu Jan 20 12:06:47 EET 2022


On Thu, Jan 20, 2022 at 03:25:29AM +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                          |  501 ++++-----
>  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, 2837 insertions(+), 669 deletions(-)

segfaults

Stream mapping:
  Stream #0:2 -> #0:0 (ass (ssa) -> subrip (srt))
Press [q] to stop, [?] for help
==4485== Invalid read of size 8
==4485==    at 0x3052F7: transcode (in /home/michael/ffmpeg-git/ffmpeg/ffmpeg_g)
==4485==    by 0x2DDCCB: main (in /home/michael/ffmpeg-git/ffmpeg/ffmpeg_g)
==4485==  Address 0x10 is not stack'd, malloc'd or (recently) free'd
==4485== 
==4485== 
==4485== Process terminating with default action of signal 11 (SIGSEGV)
==4485==  Access not within mapped region at address 0x10
==4485==    at 0x3052F7: transcode (in /home/michael/ffmpeg-git/ffmpeg/ffmpeg_g)
==4485==    by 0x2DDCCB: main (in /home/michael/ffmpeg-git/ffmpeg/ffmpeg_g)
==4485==  If you believe this happened as a result of a stack
==4485==  overflow in your program's main thread (unlikely but
==4485==  possible), you can try to increase the size of the
==4485==  main thread stack using the --main-stacksize= flag.
==4485==  The main thread stack size used in this run was 8388608.


will send you the sample privatly

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No great genius has ever existed without some touch of madness. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20220120/997d41e9/attachment.sig>


More information about the ffmpeg-devel mailing list