[MPlayer-dev-eng] New feature for subtitles

Anders Johansson ajh at watri.org.au
Mon Mar 24 01:15:35 CET 2003


Hi,

> Hello,
> I would like to add a feature to mplayer that would utilize the existing 
> subtitle system and add on top of it. I would like to scan the subtitles 
> for keywords as the movie is playing and mute the audio if certain keywords 
> are matched. Could anyone comment on the feasability of the modification? 

It shouldn't be hard to do but I am not sure you will get it included
in the cvs.

> Or perhaps give some pointers on what part of the code I could start 
> looking at? Is there any documentation for the API or structure of mplayer 
> anywere I could read to start with? Thanks ahead of time for any help.

I suggest you wirite an audio filter that does soft muting. The volume
filter can not be used cause you will have to ramp the volume up and
down to avoid click sounds. 

After that you can add hooks somwhere in the in the code that displays
the text on screen and write some type of syncronisation code to
compensate for the (variable) time delay.

> SFalcon

Good luck,
//Anders



More information about the MPlayer-dev-eng mailing list