[MPlayer-users] Mplayer with Stereoscopic using Vdpau

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat Nov 27 08:45:14 CET 2010


On Fri, Nov 26, 2010 at 05:20:54PM +0000, Muzer wrote:
> On 26/11/10 17:20, Reimar Döffinger wrote:
> > For what I can tell, each eye goes to a separate X11 screen.
> > So I expect it is only useful if you have something that generates a
> > 3D image out of two separate video inputs, which I would guess is not
> > any consumer-level hardware...
> 
> Hmm - I know of 3D monitors that work by having two inputs, but they
> work with special pre-rendered input (I don't know the details) rather
> than just having one eye per screen. Does anyone know if there is a
> monitor that can do the latter? (I obviously will only buy it if this
> gets into the mainline - but if it does, I want to know what to get, heh)

Just to clarify: as long as you do not care about HW accelerated decoding
there are already solutions:
-vo gl can convert side-by-side to anaglyph or use quadbuffer OpenGL to
render it (latter needs a Quadro or FireGL, i.e. "professional" card).
-vf stereo3d can convert all kinds of formats between each other
(note: conversion _from_ anaglyph will result only in a mess though,
anaglyph mode loses a lot of information permanently - in my case enough
that my brain is not able to make any sense at all out of anaglyph coded
3D so I consider it as a method to encode headaches but not 3D images).

Side-by-side or top-bottom 3D can be displayed with separate video signals
by using a xinerama setup, though either the graphics card must be able
to handle 4096x4096 textures or you have to use -vo gl2 (which I would
not recommend for anything else).

The most maintainable way of getting hardware acceleration into this is to use
the readback interface and handle the hardware decoding completely within FFmpeg.

Concerning this modification: I think the approach is too much maintainance effort
considering it would benefit only rather few users. It should be possible to
get almost the same functionality with a far lower maintainance effort by
using a Xinerama setup and rendering the alternating frames left-right or
top-bottom, using the vdp_video_mixer_render function to place them differently
in the output surface.
Since the output surface to my knowledge may be at least up to 4k x 4k there
should be no max resolution issue with that.
Of course there still would be a lot of small issues, like maybe only updating
the output once both eyes were rendered, deinterlacing is likely to have issues,
and of course this format (one frame per eye) will always have a high risk
that the two outputs will get swapped at some point, particularly seeking in
combination with variable frame-rate is nearly impossible to get right.


More information about the MPlayer-users mailing list