[Libav-user] Encoding/decoding subtitles, some code samples or tutorial is needed

Gonzalo GarramuƱo ggarra13 at gmail.com
Thu May 25 15:42:40 EEST 2017



El 24/05/17 a las 05:55, Anton Sviridenko escribiĆ³:
> Hello
>
> Is subtitle always rendered to bitmap? What format is used for bitmap? How can I
> draw it on the screen? Do I always need libass library to do that?
Subtitles are rendered to a bitmap only if they are dvdsubs (.VOBs).  In 
that case, inspecting AVSubtitle.rect and drawing what's there should be 
enough (check as ffplay does it).  There's a problem with colors, as the 
color palette is not present in VOBs but in the INF of DVDs.

If not, the subtitle appears as text (.srt, .sub, etc).  When the 
subtitle appears as text, it is up to the application to draw it, either 
using libass directly or the subtitle filter (thru a filter graph).

As for encoding the subtitle, I have no idea.




More information about the Libav-user mailing list