[FFmpeg-devel] Status and Plans for Subtitle Filters

Soft Works softworkz at hotmail.com
Fri Feb 14 05:26:30 EET 2020


Hi,

I am looking for some guidance regarding future plans about processing subtitle streams in filter graphs.

Please correct me where I'm wrong - this is the situation as I've understood it so far:

- Currently, ffmpeg filter graphs do not support processing subtitle streams
- This is why filters like 'subtitles' and 'ass' need to open, read and parse the media file a second time  in parallel instead of just taking the subtitle events from ffmpeg'demuxing
- For graphical subtitles, there exists the so-called 'sub2video' workaround which is injecting the the graphical subtitle overlay images into the video filtergraph by declaring them as video
- The 'sub2video' was meant to exist until filtering would support subtitle streams
- A while ago, Clement Boesch submitted a patch for adding subtitle streams to filtergraph processing (https://patchwork.ffmpeg.org/project/ffmpeg/patch/20161102220934.26010-1-u@pkh.me/)
- I read through all the discussion about it, but nothing happened afterwards and I couldn't find any indication about why it didn't get merged


I'm asking because I'm intending to implement a subtitle filter that operates on in-stream data rather than a separate input and that will render text on transparent frames for later overlay.

The possible options that I have identified so far for creating that kind of "subtitle rendering filter" would be:

- Create a video source filter and implement some hack to get the subtitle data from the decoder to that filter - or...
- Jump on the sub2video implementation and extend it to render overlay images  in case of text subtitles - or...
- check out the situation with regards to adding subtitle filter support in ffmpeg and ask about plans for this

That's where I stand right now. Does  it even make sense, the way I summarized it?`

Thank you very much,

softworkz



. 


More information about the ffmpeg-devel mailing list