[MPlayer-users] Re: video out on two screens

Andrey Khavryuchenko akhavr at kds.com.ua
Wed Dec 1 17:37:30 CET 2004


"RD" == Reimar Döffinger wrote:

 >> I need to show a video on two screens simultaneusly: one on TV fullscreen
 >> and other copy - in the monitor window.  Till now I've found none measures
 >> to do this as is.
 >> So, questions:
 >> 1. Is there a way to do this in default distribution?

 RD> If you're using linux or BSD or any real OS that deserves the name, yes.
 RD> ;-). Explanation is below.

Ouch!  Sorry, sure it has name ;)  Linux 2.4.27 (though by 'default
distribution' I've meant the mplayer tarball)

 >> 2. If not - where I can find a documentation regarding creating my vo
 >> module which would stream into two x11 (or x11 and xv) vo modules?

 RD> I don't think you will have much fun with that approach - at least
 RD> creating two instances of the same vo currently is not possible.

Digging now the sources to be sure...

 >> 2.1 How can I attach my module into main module - currently I can't find a
 >> way to do this, judging from the source code.

 RD> Don't know what exactly you mean by "attach". You would need to create
 RD> a either a vo (in libvo subdir) or vf (in libmpcodecs subdir). The
 RD> functions those modules use are described somewhere in DOCS/tech.

Exactly what I'm doing right now.

 RD> My solution to this is:

 RD> In one console do:

 RD> mkfifo stream.yuv
 RD> mkfifo mp1
 RD> mkfifo mp2
 RD> mplayer -vo yuv4mpeg <file>

 RD> This mplayer instance decodes (and unless you make it use -ao pcm and
 RD> feed the sound via another fifo to one of the other MPlayer instances
 RD> will also play the sound)

 RD> And in another one:

 RD> cat stream.yuv | tee mp1 mp2 > /dev/null

 RD> And in yet two more (these will display the video):

 RD> mplayer mp1

 RD> and

 RD> mplayer mp2


 RD> Probably audio and video will be out of sync like this, in that case you
 RD> should have a look at the -ao pcm option and use -audiofile with one
 RD> of the mplayer instances that do the displaying. 

That's exactly what I've to do - be sure that audio and video will be in
sync in both instances.

 RD> In case you happen to make this idea in a nice, well-working script or
 RD> something, please post it here, I'm sure there are others who will be
 RD> interested.

Ok, I'll try it out.


Andrey V Khavryuchenko            http://www.kds.com.ua/
Silver Bullet Software Solutions  http://www.kds.com.ua/training/

More information about the MPlayer-users mailing list