exhibit research | technology

Projecting Petra
with the $34 video server

Image: Greg Downing
From: Molly Lenore
Date: Tue Sep 2, 2003
To: Kevin Walker
Subject: Re: a link for you


hello kevin,

I need to talk to you about syncing three computers using Director. Sound familiar? Need to do the exact same thing as Shackleton, but will will have to use three computers and a fourth for the timing because each computer will be playing 6 to 7, 1.5 GB movies. It is for the Petra exhibition. 26' panoramic views on three screens, showing Greg Downing's excellent hi-res panoramic video. Macs, hopefully G5s and we need frame-accurate sync. What do you think?

Molly Lenore
Senior Animator
American Museum of Natural History
From: Kevin Walker
Date: Wed, 3 Sep 2003
To: Molly Lenore
Subject: Re: a link for you


What I would do is to use Geoff Smith's SerialXtra. I have since used it a lot, and it is plenty fast enough. I think you could just have one playback machine sync the others, and send out the movieTime of the QT movie, and have the other 2 read that and set the movieTime to the incoming numbers. You could also use something simple like a Basic Stamp as an external clock. You would hook them up via USB, with a hub (and adapter if necessary). Of course, you can hire me to do this programming for you! I have everything I need here to test it.
From: Molly Lenore
Date: Thu Sep 4, 2003
To: Kevin Walker
Subject: Re: a link for you


I am going to talk to Mike Cosaboom about working with you to figure out the best solution for syncing 3 computers. I will e-mail you later today...

molly
From: Kevin Walker
Date: Fri Sep 5, 2003
To: Molly Lenore
Subject: the $34 video server
Attachments: There is 1 attachment


OK, I did it. Attached is a Director file which will either sync, or be synched by, another machine. I tried this out, having the Basic Stamp send frame numbers every 1/30 second to the computer. You can import all your frames into Director, or import a QT movie. You can also use it without the Stamp -- I included code to have one computer send out frame numbers to sync to.

You can use this on the PC, or in Director 8.5.1 on the Mac; the OS X version of the serial xtra uses slightly different syntax. For best performance you're best off with Director MX in OS X; I just don't have a copy of the xtra for it. You also can't just run this as-is; you'll have to hook up 2 computers via serial (crossover cable, with adapters if they're Macs), or plug a Stamp in (I included the Stamp code which you can cut and paste). You will probably have to tweak a few lines of code depending on how many frames you have, etc.

Note that I'm using the DEBUG command to send numbers out of the Stamp, not one of the pins -- the Board of Education is handy for this.) With a PIC chip I guess this could be the $5 video server. (OK, it's not really a $34 video server, since really the computers are serving up the video, rather a $34 synchronizer.)

If you use one playback machine to do the syncing, you would hook up an adapter to each of the 2 USB ports, and address them individually with separate instances of the serial xtra; I think you can initiate multiple instances. If not, you can send out one signal and split it using a USB hub.

I'm psyched to know if this will actually work. Let me know.

kevin

The Director program is simple. Here is the entire movie script:



global gSerialObj

on startMovie
   -- INITIALIZE SERIAL XTRA    gSerialObj=0
   gSerialObj = new(xtra "SerialXtra", "COM1") -- Change this depending on your serial port or adapter
   preload -- Preload all the frames for smooth playback into RAM; could take a while depending on how big your video is
end

on stopMovie
   --FLUSH SERIAL XTRA
       if objectp(gSerialObj) then
       flushInputBuffer(gSerialObj)
       gSerialObj = 0
   end if
end

-- -- USE THIS ONE TO SEND
--on exitFrame
-- if gSerialObj<>0 then writeString(gSerialObj, the frame) -- Sends out the current frame number every step frame
--end

-- -- USE THIS ONE TO RECEIVE
on exitFrame
   -- MODIFY AS NEEDED; THIS WAS FOR INPUT FROM THE STAMP, WHICH WAS SENDING 001 TO 300 PLUS RETURN, EVERY 1/30 SECOND
   if gSerialObj<>0 and charsAvailable(gSerialObj)>3 then go frame value(readString(gSerialObj).char[1..3]) -- Use this one for imported frames
   -if gSerialObj<>0 and charsAvailable(gSerialObj)>3 then sprite(1).movietime = value(readString(gSerialObj).char[1..3]) * 2 -- Use this one for Quicktime
   go the frame
end


-- HERE IS THE COMPLETE STAMP PROGRAM:
--x var word
--loop
-- for x=1 to 300 'ADD YOUR NUMBER OF FRAMES HERE
-- DEBUG dec3 x,cr 'DEC3 MEANS SEND 3 CHARACTERS EVERY TIME
-- pause 33 'WAIT 33 MILLISECONDS (FOR 30 FPS)
-- next
--goto loop

From: Michael Cosaboom
Date: Mon Sep 8, 2003
To: kevin@exhibitresearch.com
Subject: QT sync


Hi Kevin,

Dee and I are going to sit down with your code tomorrow morning, so this is really just a heads-up. If we get this to work our setup will be as follows: 3 Macs running OS X connected via Keyspan/serial crossover cables and the Serial Xtra for OS X. I don't think we have time to mess around with the Basic Stamp as Joey and Dee are head-down right now with another project. Dee thinks that she can update your code syntax for the new version of the serial xtra. Can you think of other issues that we might have to deal with operating under OS X?

The only other thing I can think of right away is that each Mac will be playing a series of 4-6 QT movies, not a single large movie. Do you think this poses a problem?

Again thanks for your help. Best regards, Mike

--
Michael Cosaboom
Sysadmin, Exhibition Department
American Museum of Natural History
From: Kevin Walker
Date: Mon Sep 8, 2003
To: Michael Cosaboom
Subject: Re: QT sync


Serial Xtra on OSX is the same, the syntax is just a little different. If you haven't already, you'll need to get an unlock key from Geoff. Keyspan sells an adapter with 2 (Mac-style) serial ports, or a 4-port (PC-style) adapter. One thing to watch out for, though, is that the Keyspan adapters sometimes need to be unplugged and plugged back in to reset them -- obviously not an option in an exhibit (and a pain during development). You might be OK since your exhibit will (theoretically) start up and just keep running without any interaction or anything. I ran across this problem in an installation, and Steve Godun recommended this to me.

It fixed the problem and worked like a charm. However, it installs in a modem port, and there's only one of those, and you need two. So maybe you can split the signal...?

Director MX in OSX should handle big files better. Do these movies run one in sequence, and always the same sequence? If so, copy and paste them into a linked QT in QT Player Pro ("Save Normally, Allowing Dependencies"). This should allow you to workaround the filesize limit. If the sequence changes, or there's some interactive way of changing movies, be prepared for a delay when switching. To save time and your sanity, you might work out the programming using smaller placeholder movies first.

The only other potential problem I could see is sending out a constant stream of serial stuff while the processor is chunking on these giant files -- decoding big QT can be a bit taxing. If you can load all the frames into the score, you can do the writeString on each exitFrame. Could be the world's largest Director file! But at least if it crashes in OSX, it shouldn't bring down the whole system...

Let me know what happens, and good luck!
From: Michael Cosaboom
Date: Tue Sep 9, 2003
To: Kevin Walker
Subject: Re: QT sync


Hi Kevin,

Thanks a lot for sending the suggestions and info. I'm happy to report that our initial experiments have been successful and now it's just a matter of fine tuning.

Dee took your script home and came back in this morning with her own take on it. We'll send you a copy of that movie for your consideration once it's done. We may end up going with your Basic Stamp suggestion in the final iteration, but for now we're doing it as follows: All three Macs are running Director MX movies, the serial xtra, and have Keyspan USA-19 adapters (the PDA adapter with 9 pin serial connector) attached. Joey made a null modem cable which splits the signal so that one input gets split into two on the other side. One Director movie is the sender and tells the others when to start the movie, and the other two are receivers. There's no communication back from the receivers to the sender, and they are only listening for a signal from the sender after the movie ends, cutting down on the serial i/o. All the movies are identical in our test now, and they will have the identical number of frames in the final version. It seems to be working pretty well. Not always exactly in sync, but very close and it doesn't seem to be building up over time. So basically we're pretty thrilled.

Also it looks like we're going to use G5s for this. We got the first one today and it's pretty sweet.

Thanks again for your help.

Regards, Mike
From: Kevin Walker
Date: Mon, 15 Sep 2003
To: Molly Lenore

Subject:

Any progress with the $34 video server? When does your exhibition open?
From: Molly Lenore
Date: Mon Sep 15, 2003
To: Kevin Walker
Subject: Re:


Well, funny you should ask. Dee is setting everything up. We are going to do a test tomorrow with 5 QTs, each with 2000 to 4000 frames. The movies range from 2 to 4 gigs a piece. We tested the set up with 4 gig Qt and it worked very well, next step is a play list.

The exhibit opens around Oct. 18.

molly

Kevin Walker