[MPlayer-dev-eng] Passing parameters to video/audio output drivers

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon Sep 19 22:28:44 CEST 2011

On Mon, Sep 19, 2011 at 01:23:37PM -0600, Deron Kazmaier wrote:
> First, as I understand it the video output mode is selected using
> the width and height based on the width and height of the video
> data. It will fail if the width and height do not match. I can
> select the next size up, but is there someway for the decklink
> driver to cause a scale/crop/pad for mplayer etal to fill out the
> data or does it need to do that itself? I know the user can scale
> it, but is it recommended to do this automatically since it is
> required?

There is no code for that there yet. I worked on it several years back
(for vo_x11) but it was never finished and the code got lost.
You could do the scaling in the vo like vo_x11, but IMO it's not
a good idea.

> Second, that same code does not try and match the fps. It was just
> picking the first fps option that matched the width/height. Can I
> get the fps of the video data in the config call of the video
> driver?

vo_fps, but is unreliable and generally a bad idea to rely on.
Also I'd expect anyone using the decklink stuff wants a very specific
output frame rate, which does not necessarily have anything to do
with the frame rate of the input.

> Again, if it does not match an available output, can I
> request it be scaled up?

Just draw the frame twice, or not at all?

> Lastly (well for the video driver for now), I need to select from
> multiple output devices. I happen to have 2, but each device can
> have multiple outputs itself. What is the proper way to pass
> parameters like this to the driver?

preinit gets a string as parameter.

> If some existing drivers do these things, I'm happy to go look
> there, just which drivers to go look at?

vo_gl is one of the more maintained ones.

More information about the MPlayer-dev-eng mailing list