I am writing a C program that uses libb * libs ffmpeg, and using the Dranger tutorial , I can correctly decode both audio and video. I'm currently trying to extract subtitles. I really donβt want to decode them in time and display them on video, but actually extract the subtitle text from the container.
For example, on cli
ffmpeg -i video.mkv -map 0:4 -scodec copy out.ass
will give me an ass. (For some reason, srts returns text only.)
I tried to communicate with AVSubtitle, avcodec_decode_subtitle2, etc., but they return subtitles line by line. I need time codes in srts, header information in ass, etc. All I want is an entire text subtitle file that has been multiplexed into a container.
source share