[FFmpeg-devel] [PATCH 00/12] I added text to bitmap subtitle conversion functionality!

Soft Works softworkz at hotmail.com
Wed May 4 03:16:32 EEST 2022



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of Soft
> Works
> Sent: Tuesday, May 3, 2022 6:27 PM
> To: FFmpeg development discussions and patches <ffmpeg-
> devel at ffmpeg.org>
> Cc: Traian Coza <traian.coza at gmail.com>
> Subject: Re: [FFmpeg-devel] [PATCH 00/12] I added text to bitmap
> subtitle conversion functionality!
> 
> 
> 
> > -----Original Message-----
> > From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> > Traian Coza
> > Sent: Tuesday, May 3, 2022 6:13 PM
> > To: ffmpeg-devel at ffmpeg.org
> > Cc: Traian Coza <traian.coza at gmail.com>
> > Subject: [FFmpeg-devel] [PATCH 00/12] I added text to bitmap
> subtitle
> > conversion functionality!
> >
> > I added the possibility of converting text-based subtitle tracks
> (such
> > as subrip or ass) to bitmap-based subtitle tracks (such as
> > dvd_subtitle).
> >
> > I accomplished this by using libass, and basically using the code
> from
> > vf_subtitles.c to render text subtitles and store the images in the
> > AVSubtitle structure.
> 
> Have you seen this: https://github.com/ffstaging/FFmpeg/pull/18

With the subtitle filtering patchset, you could do the same with 
a fraction of code and (probably) a single code file.

You can use the textsub2video filter as a starting point to
create a textsub2graphicsub filter.

What you see there will look all familiar to you. The textsub2video
filter uses libass as well.
You'll need to change the output media type to subtitle and the
format to graphic subtitles and add AvSubtitleArea items for 
each bitmap in a frame (similar to AVSubtitleRect).

Your code will magically shrink.. :-)

Kind regards,
softworkz









More information about the ffmpeg-devel mailing list