[FFmpeg-devel] DVD subtitles
Thu Feb 28 19:15:43 CET 2008
Erik Slagter wrote:
>>> IMHO it's very easy to make such a filter with the filter example
>>> ("negate") as a basis, although at the moment actually I don't have a
>> Actually, the negate filter read the input frame and put the negated
>> frame in a new frame as output. For a hardsub filter, that would be a
>> needless memcpy. It would be better to use the drawbox filter as a
>> template (yes, it is not even in the SoC tree yet, I'll put it there soon).
> Point taken.
>> For doing this you should modify the avfilter framework to filter also
>> subtitles (now, it only work for video but subtitle and audio is planned
>> for the future). It means making CODEC_TYPE_SUBTITLE as a valid value
>> for AVFilterPad.type while keeping the framework sane. That will be the
>> hardest part. Then you can make a filter that has one video stream and
>> one subtitle stream as input and one video stream as output.
> So what you're saying is that the correct approach would be to have a
> filter with two input "pads", a video input and a subtitle input. Hmmm,
> looks logical to me, indeed.
Yes, that's what I have in mind. A nice way to test the inclusion of
subtitle pads would be writing a subtitle capitalization filter (yes, I
know, it's a bit useless, but it should be easier to debug than the
> Anyway, for the moment I am using a some q&d tricks to achieve my goal,
> but if libav* is up for it and you're available to point me in the right
> direction, I'd take on the challenge.
Nice! More developers in libavfilter are really welcome!
Maybe the first step would be looking what new functions pointers to add
to the AVFilterPad struct. I'd say a (*request_subtitle) method and
maybe renaming poll_frame to just poll...
Do not hesitate in asking if you have any question.
More information about the ffmpeg-devel