Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have 2 videos I want to run synchronously besides each other.

I'm currently going to create 1 video file and span that over 2 monitors, but that requires some "video hacking" of getting everything in place correctly.

Is there an easier way to do it?

So, to clarify: 1 computer is used. 1 monitor is connected. 1 tv is connected (composite out) How do I get videofile 1 and videofile 2 to play in sync?

share|improve this question

migrated from Apr 21 '11 at 21:29

This question came from our site for professional and enthusiast programmers.

I don't know, it's mostly a Linux question. – skerit Apr 21 '11 at 19:37

You need screen and mplayer, but here is a terribly messy way to get it to work:

`screen -d -m mplayer PATH_TO_VID1` && mplayer PATH_TO_VID2
share|improve this answer
Hmm, this would start 2 mplayer instances, but that does not mean they'll play in sync. I want to make sure they're in sync. – skerit Apr 26 '11 at 13:18
If "in sync" means simply both videos starting at the same time, then the above command will work. Other then that, I have no idea. – nerdy_kid Apr 26 '11 at 20:47
up vote 0 down vote accepted

There was a way to do this with mplayer, though I'm afraid I lost the command.

The best way to do this is with VLC: it has a "videowall" feature that is built just for this.

share|improve this answer

Update: I mis-read the question. The question asks for a single computer setup, while I thought it was a two computer sync video setup.

I achieved exactly this using a 3x3 matrix of 9 computers using a mix of VLC & ssh. See What to do with a cluster of old computers running Ubuntu? for a pic.

I first tried doing the exact same thing that the other users suggested, but soon found out that running videos on sync is indeed a very difficult thing. I tried using crontabs to start videos at exactly the same time (after synchronizing clocks), but even if the command is issued at the same time, the player load times vary across computers, rendering it useless.

So the final solution I came up with was to stream the video using RTSP in VLC over a networked computer (which acts like the admin). I setup password-less ssh from admin to the two clients. And then finally, sent the commands over ssh to play the video.

VLC offers a special wall mode where you can break your video into a wall. Using that, you can specify any particular frame from the wall to be started in full-screen. So in my case, all 9 screens full-screened different portions.

I'll try to post the exact commands as soon as I can get them for you.

PS: A few recommendations : * VLC does not stream everything perfectly. I found that streaming mpg files was easiest. * Match the aspect ratio of the video with your monitors. (For instance if they're old CRTs (as in my case) with 4:3 ratio, then your video should probably be 8:3.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.