[MPlayer-dev-eng] More subtitles: mencoder with DVD subtitles,

Kim Minh Kaplan kmkaplan at selfoffice.com
Fri Jan 4 03:44:43 CET 2002


Arpi writes:

> I know. But this is what i want to see chanegd: separate scaling from
> decoding in mencoder. Maybe we should implement some filter queue for
> mencoder, similar thing to libao2's filter plugins.
> We could chain various filters, even multiple times if someone want.
> Then we could implement simple filters, like:
> - crop
> - expand
> - scale
> - render subtitles
> - postprocessing (note: it's now handled by decoders)
> - colorspace conversions (to allow coding fli to avi with vivo codec etc;))
> - wrapper for virtualdub filters [using the DLL stuff]
> MEncoder with such features would kick ass...
>
> I think it should go with surfaces, similar thing as planned for libvo2.
> Surface in my mind: a structure, wiht pointers to planes (yuv), containing
> visible image position and dimension, and real image dimension (stride).
> So simple filters, like expand and crop don't have top copy the image, just
> change the real image dimensions. It also should contain a flag, showing if
> writting to buffer (rendering subtitles, postprocess etc) is allowed, or we
> should copy the image first (if the image pointers point to codec's internal
> buffers)
>
> later we could append this filter layer to mplayer as well.
> and build libvo2 over it...

OK, you sure are right, this would be cool.  But I don't see this
happening soon...  Or may be I could try and see what comes out of it.
Is anybody already working on it?

> hmm. i can more like imagine users ripping dvd with audio and subtitles to
> avi, instead of someone re-encoding his avi file and text sub to another avi.
>
> hmm. maybe you're right... it depends on dvdsub are supported in mencoder :)
> i always think dvdsub==vobsub

Exactly.  The patch I sent implements DVD subtitles but not vobsub
subtitles in mencoder.

>> > - why is palette NULL? the included vobsub code requires IFO file as well.
[...]
> and where do you get the IFO palette for vobsub case from?

OK, I understand your question better.  I also get the palette for
vobsub from the IFO.  But as it is a file not on a DVD anymore, I have
to do my own parsing (I did not find anything like parsing a ifo in
libdvdread).  That's why I can't use the dvd_priv_t that is stored in
the stream.

> Ok. I'll look at it. I want to remove audio/video dependency from all the
> demuxers. In theory they don't need them

OK, tell me when I should change and use libmpdemux instead.

> maybe scaling is usefull for normal subs too. imagine -vo x11 -zoom -fs
> afair it renders subtitles after scaling.

Probably.  It will be useful for mencoder at least.

>> the VobSub file I have is around 5M.
[...]
>> Is that ok?
> imho yes

OK, I'll have a go at this.

Kim Minh.



More information about the MPlayer-dev-eng mailing list