-
Notifications
You must be signed in to change notification settings - Fork 98
Description
I'm working on adding subtitle support to a project and it looks like avcpp doesn't have support for it, but it seems it can be easily added with the existing classes.
Most of the API for decoding and encoding subtitles seem to be nearly identical to video and audio decoding/encoding, and since the codeccontext are already templatized on AVMediaType, it can be extended naturally. Instead of using a Frame object that's dependent on AVFrame, it will need to use AVSubtitle, and the decode/encode functions could otherwise work with that without much major changes.
I have some code for reference that was able to be used with my existing audio/video decoding logic with minimal changes. It would probably be more useful to add more subtitle specific data to the subtitle data class.
https://github.com/CommitteeOfZero/impacto/blob/subtitles/src/video/ffmpegsubtitlehelper.h
https://github.com/CommitteeOfZero/impacto/blob/subtitles/src/video/ffmpegsubtitlehelper.cpp