[FFmpeg-devel] [RFC][PATCH] ffplay: factorize subtitle rendering code to a private filter

Clément Bœsch u at pkh.me
Mon Mar 2 21:48:56 CET 2015


On Tue, Feb 17, 2015 at 03:27:01AM +0100, Marton Balint wrote:
> 
> 
> On Sat, 14 Feb 2015, Clément Bœsch wrote:
> 
> >On Sat, Feb 14, 2015 at 02:08:15AM +0100, Marton Balint wrote:
> >>Signed-off-by: Marton Balint <cus at passwd.hu>
> >>---
> >> Makefile                         |   1 +
> >> doc/ffplay.texi                  |   4 +
> >> ffplay.c                         | 336 +++++--------------------------------
> >> libavfilter/Makefile             |   1 +
> >> libavfilter/vf_ffplay_subtitle.c | 347 +++++++++++++++++++++++++++++++++++++++
> >> libavfilter/vf_ffplay_subtitle.h |  38 +++++
> >> 6 files changed, 434 insertions(+), 293 deletions(-)
> >> create mode 100644 libavfilter/vf_ffplay_subtitle.c
> >> create mode 100644 libavfilter/vf_ffplay_subtitle.h
> >>
> >
> >This is not the correct way of doing it.
> >
> >The proper way is to integrate subtitles within lavfi. If you want to work
> >toward this, feel free to ask for more details, but it's not trivial.
> >
> >(and no, this patch is not an improvement in the correct direction, sorry)
> >
> 
> What would be an improvement in the right direction? I see little chance
> that I will work on subtitles in lavfi, but if there is a better/preferred
> way to change ffplay to support subtitles in the filter chain without
> waiting for the whole subtitles-in-libavfilter infrastructure, I may be
> interested in working toward that.

Oups, sorry about the delay.

The main problem is to move AVSubtitles to libavutil (because you don't
want a hard dep on libavcodec in libavfilter). Doing this means moving the
AVSubtitleRect and the other stuff.

If we do this, we will need to make that API more easily extendable than
currently (so dynamically allocated).

I have a WIP on this somewhere, but it's a lot of pain for various reasons
because want to take the opportunity to define a new structure...

When this is done we can:
 - inject the new struct into lavfi
 - make subtitles filter take a subtitle stream when no file are specified
 - rework the subtitles encoding API (it's the original API...)
 - fix the DVB sub hacks
 - ...

Sorry I haven't much stuff to "give". I'll try to go back on this stuff
ASAP...

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150302/d711021b/attachment.asc>


More information about the ffmpeg-devel mailing list