On Wed, 12 Mar 2014 21:18:46 +0100, wm4 <[email protected]> wrote: > mp4 files embedding DVD subtitles do not use the same extradata format > as the rest of Libav expects. The subtitle decoder in libavcodec in > particular does not understand this format. > > Convert the extradata to the vobsub .idx format. mp4 stores the palette > as binary 32 bit ints in YUV. The subtitle resolution is stored > separately in the track header, which we access through AVStream. > --- > Some uncertainties: > - not sure if I got the component order right, and all samples I > found had gray subs > - should this write a header? Like: > # VobSub index file, v7 (do not modify this line!) > - is the width/height necessarily known at this point? the size comes > from the "tkhd" element, and it looks like in theory it doesn't need > to come before the other elements. > > Also, I tried to use libavutil/colorspace.h for the colorspace > conversion. But it's so messy, and ff_cropTbl (needed for using it > comfortably) is private to libavcodec. So I just copied the YUV > to RGB conversion from some site. > --- > libavformat/isom.c | 57 > ++++++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 57 insertions(+) >
LGTM, pushed Thanks -- Anton Khirnov _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
