Take the 2-minute tour ×

I have two (or more) video files that I want to play side by side. I could do that simply by opening them in two seperate windows, but that would also seperate all the controls (play/pause/forward/...). I want to play them in a synchronized fashion so that pause/forwarding/... works on both videos simultaneously so that they always stay at the same timecode and they don't go out of sync. How would I accomplish that in Linux?

This is needed for viewing only, so compositing them into a new video file first should be avoided if possible, but if there isn't an easy way to do that, I welcome answers doing it with composition as well.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Describing Florian's solutions:

If your want play 3 videos:

1) make 3 pipes

$ mkfifo cmds1 cmds2 cmds3

2) run 3 mplayers reading commands from pipes

$ mplayer -slave -input file=cmds1 -quiet file1.mp4
$ mplayer -slave -input file=cmds2 -quiet file2.mp4
$ mplayer -slave -input file=cmds3 -quiet file3.mp4

3) use tee to write to pipes simultaneously.

$ tee cmds1 cmds2 > cmds3

4) now enter commands like pause, ...


share|improve this answer

Maybe it could be done writing a simple frontend driving two MPlayer instances in slave mode, see -slave in the mplayer manpage

share|improve this answer

Your Answer


