[MPlayer-users] marquee feature request

Reimar Döffinger Reimar.Doeffinger at gmx.de
Wed Jan 6 16:57:36 CET 2010


On Tue, Jan 05, 2010 at 05:41:34PM +0100, Kovács Zoltán wrote:
> Looped playlists are welcome to be supported as well, i.e. on restarting the
> playlist the marquee should not be restarted. On starting the marquee the
> scrolled text should come faded in and on stopping the marquee should be
> faded out. If the background of the movie definitely changes, then the text
> color of the marquee should be automatically tuned to the background color
> of the movie (calculated by some kind of average of the appearing set of
> colors). E.g. on white background black text should be displayed, but on
> black background white text should go.

This definitely needs to be specified more clearly, the average certainly
would be a bad idea, also you completely missed to specify how the text
colour should relate to the detected "background colour", in particular
you don't want just the inverted colour, because that would give gray
writing on a gray background and pink on a green background (*shudder*).
And what if the background colour changes right in the middle or you have a
checkerboard pattern?
Usually the solution is to use white text with a black border or to overlay
a partially transparent white bar and use black text.
You also did not say whether it must be rendered on the video frames, can
be a separate overlay or whatever. In the later case just overlaying a partially
transparent window without giving it any relation to MPlayer could be a simpler
solution.

> My suggested syntax is as follows:
> 
> --marqueefile [file]         The name of the text file which contains the
> marquee
> --marqueefont [font]         The X11 or trutype name of the used font
> --marquefontscale [percent]  Scaling ratio for the used font
> --marqueemovies [list]       Comma separated list of the movies which must
> be captioned using marquee
> --marqueespeed [percent]     Speed of the marquee
> --marqueypos [ypos]          Vertical position of the marquee
> 
> More marquees should be supported for a given run. For my purpose there
> should be 2 marquees: one for bottom and one for top. The different marquees
> could be defined using multiple parameters. For example:
> 
> mplayer -geometry 640x480 -playlist playlist.txt -loop 0\
>  --marqueefile marquee1.txt --marqueefont "-dejavu-dejavu
> sans-bold-r-condensed-*-30-*-*-*-*-*-iso8859-2" \
>  --marqueefontscale 100 --marqueemovies 1,2,3,6,7,8 --marqueespeed 50
> --marqueeypos 0\
>  --marqueefile marquee2.txt --marqueefont "-dejavu-dejavu
> sans-bold-r-condensed-*-40-*-*-*-*-*-iso8859-2" \
>  --marqueefontscale 100 --marqueemovies 1,2,3,4,5,6,7,8 --marqueespeed 100
> --marqueeypos 440

Not unless you want to rewrite all argument parsing for no gain.
First, if you insist on the background detection you need to have access to
the image anyway, so a video filter would be a better option and you the
should use options for the video filter instead of spamming the global
option list, avoiding also the other issues with your suggested syntax:
- MPlayer does not use -- options, it only uses -, this introduces inconsistency
  for no gain
- If you put the marquee options in a config file there is no way to disable that from the
  commandline, since additional marquee options will only add a new one.
- above is the reason why an option given twice will override the previous
  value, not do something else (ok, I admit -vf-add is an exception).

Uh, and no I am not volunteering to implement anything (paid or not).


More information about the MPlayer-users mailing list