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

Arpi arpi at thot.banki.hu
Fri Jan 4 04:06:34 CET 2002


Hi,

> > 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?
Not yet. It's at top of TODO list, I wanted to get something work before the
0.60 release. Unfortunatelly I ran out of time, and i'm busy this and next
week with some commercial stuff. (yes, i have to earn some money sometimes :))

So, if you're interested, and have time, let's see what can you do with it :)
I have no real code yet, just ideas, written above in prev mail.
About the struct, i think something like this would be ok:

typedef struct {
   char readonly;  // if set (1), we should copy it before modifying
   int width,height;  // dimension of stored image (playes[0])
   uint8_t* planes[3]; // same as in dec_video.c
   int stride[3];  // bytes/line of image planes
   uint32_t* palette; // for 8bpp stuff. maybe could be at planes[1]
   int img_fmt;   // see libvo/imgfmt.h. maybe also add bpp field for easier work
   int w,h,x,y;   // dimentsion and position of effective (visible) image
} mp_video_surface_t;

we should decide yet another thing:
do we allow w,h/x,y to be outside of the stored image dimenstions (for
expand filter), or it must be x,y >0 and w,h <= width,height ?
(in first case all filters should care of this special case, in second case
it requires one more memcpy of image)
i think the second is easier (->faster) to implement now.

filters may use similar API to libvo2/libao2 (init, control, start, convert,
uninit) or something simpler.

> > 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.
ok. then forget my comment :)

> >> > - 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, so vobsub.c does have the ifo parser.

> > 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.
Ok

> > 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.
ok


A'rpi / Astral & ESP-team

--
mailto:arpi at thot.banki.hu
http://esp-team.scene.hu



More information about the MPlayer-dev-eng mailing list