If you’re not interested in the Vixid mixer or 3L, then I apologize for my posts over the last couple of weeks, but after a year of touring and creating on someone else’s schedule, I’m very excited to be able to set my own agenda and focus on the things I’m interested in.

Security Cameras setup for Bullet Time

Disclaimers aside, I’ve been working with my cheapie security cameras, feeding them power and conducting their video to somewhere it can be useful. Once wired, the challenge was to get the correct doses of midi to the Vixid, and thus motivate it to output The Crazy.

But now The Crazy is out of the box, so I’ll show you what it looks like, then explain how it came to be.

In putting together this effect I tried both Ableton Live and VDMX to no avail. Both programs were able to send the correct values over the right midi channels, but the VJX control I’m trying to achieve requires sending of distinct CC messages for very precise, quick switching. If I’m aiming for “proper” one-camera-per-frame bullet time, that’s one input every 40 milliseconds. To use 8 cameras I also have to switch inputs for each layer. This switching causes a 2-3 frame freeze on the input – as it puts the video stream in sync – so layer inputs need to be switched when that layer isn’t “active” and currently visible.

These constraints led me to Max/MSP, mostly because I had a review copy already installed on my machine. I’d read through some of the tutorials, but never actually attempted to program anything with Max. So this afternoon was spent traipsing through documentation, patching, and testing. After several near-misses and a realization that I wouldn’t be able to achieve an elegant solution without wasting time studying, I went back and created a brute-force solution using the modules I understood.

(Possibly NSFW due to excessively hacky code)

vixid sequence manual 16.jpg

I know, it’s frightening, but it’s my first, and it most definitely works. The controls being sent go like this:

Put Track 1 on top, Select Input 1 on Track 4.
Put Track 2 on top, Select Input 2 on Track 1.
Put Track 3 on top, Select Input 2 on Track 2.
Put Track 4 on top, Select Input 2 on Track 3.
Put Track 1 on top, Select Input 2 on Track 4.
Put Track 2 on top, Select Input 1 on Track 1.
Put Track 3 on top, Select Input 1 on Track 2.
Put Track 4 on top, Select Input 1 on Track 3.
(To learn how the VJX Tracks and Inputs work, watch Vixid101)

The input switching happens immediately after the track has been hidden. This is to give as much time as possible for the new input to sync. The top slider is used to set the metronome time, which controls the interval between messages. For initial setup and coding I put cards numbered 1-8 in front of the cameras, so I could quickly see if things were happening in the correct order. Decreasing the metronome time to output a blur of images, I recorded the video through my Blackmagic Intensity Pro so I could step through frame by frame.


(Download the original file to be able to step through frame-by-frame)

At this stage, the fastest consistent switching I can achieve is around 100ms (3 frames) per camera. Below this speed I start to get duplicate frames, skipped inputs and other unfortunate glitches. I’m not sure if this is due to latency in Max, the midi coming from my battered BCR2000, or the security cameras’ dodgy signals, but I have it on good authority that the VJX should technically be able to do frame-by-frame switching, so we’ll see what happens with some more decent gear, setup time, and patching prowess.

Roughness aside, this really is a powerful technique, both for live and studio use, and it’s not just relevant to Vixid-owners. The Edirol V8 – while considerably less flexible – has midi capabilities, and should be able to achieve something similar. I’ll be trying some more variations on this theme, and expanding to the full 16 cameras as well.

  • http://abstrakt.vade.info vade

    Very NSFW! Clean those patchcoords up! Otherwise, looks good :) Im curious about the 100ms latency. Max should not have that issue at all internally. How are you adjusting the latency? Adjusting the metros interval?

    Id be surprised if it could do frame by frame syncing. This is because your cameras are not genlocked together, and therefor have timing that is off by as much as one whole frame, which means the vixid is probably using some internal re-syncing system (like a tbc) to correct all of the signals, so you dont get tearing on switching. This means, your minimal frame offset will be 2, more like 3 with processing overhead, and since you are switching between more than two sources, 3 sounds just about right (to me).

    It looks great though!

  • http://www.plus2.fr FANF

    AWESOME !

    I'm afraid breaking that 40 ms barrier is gonna be a tough job !

    Unless… you use an external switcher controlled via RS-232 for ex…
    A 4inx4outs might do the job.

    Good luck with Max + serial protocol though :p

  • http://www.jaymis.com Jaymis

    @Vade: I probably wasn't clear, there isn't a 100ms latency internally, I can get it sending commands much faster than that (yes, by adjusting the metro interval), but much beyond it and things start getting complicated.

    The Vixid has all 4 active layers corrected at all times, so switching between those is instant, and I can get very close to frame-by-frame syncing if using just 4 layers, but when I take it up to 8 the layers have to switch inputs and then TBC comes into play and it gets slower.

    @FANF – I don't believe breaking 40ms is possible, as at 25FPS 40ms is 1 frame. Can't switch video faster than that!

  • massta

    Is there a way to import all 8 signals into a pc using one firewire? Now that would be really cool.

  • http://www.jaymis.com Jaymis

    @Massta: Not to my knowledge. There are some "security camera" capture devices which show 4 or more inputs at once (as mentioned here), which would allow you to virtually pan the image around for a similar effect, but this would be very low resolution. I strongly doubt that there is anything which would allow this functionality through firewire at an even remotely affordable price (if such a thing does exist at all).

  • cat

    I have a spectra8 capture card that I've done 4 camera switching with (it can capture 4 streams at the same time) what I havent tried is using 8 cameras using a breakout card with it that allows you to capture 8 cameras at 12.5 fps, I use vvvv for the task by the way…
    I've tried an 8×8 matrix and you have sync roll issues there too unless the sources are sync's already.
    You could maybe try and give yourself more time for switching by switching inputs as soon as you've shown that particular channel, or are you doing that already?
    @massta, check out ptgrey.com, they make firewire cameras and have a demo using an array of 30(?) using firewire800 that does realtime bullet time, not a cheap solution, but what do you expect!

  • http://www.plus2.fr FANF

    "You could maybe try and give yourself more time for switching by switching inputs as soon as you’ve shown that particular channel, or are you doing that already?"

    That sounds logic… 4 channels, 3f delay overhead delay…
    A1= track 1 input 1
    0 = first frame

    When going displaying B1 you switch A1 to A2 etc…
    Doesn't that do it?

    A1 B1 C1 D1
    0 1 2 3

    A2 B2 C2 D2
    4 5 6 7

    A3 B3 C3 D3
    8 9 10 11

    A4 B4 C4 D4
    12 13 14 15

    I'll try that on one row when i get the chance ;)

    I was thinking… how is your camera power connected ?
    Maybe if you switch them on all at the same time, you could achieve sync…
    i have a kramer switcher that has contact control you could interface with an arduino, for example…
    If all sources are synced, I guess that could work, no ?

  • http://www.jaymis.com Jaymis

    @FANF: Already there on the switching.

    Put Track 1 on top, Select Input 1 on Track 4.
    Put Track 2 on top, Select Input 2 on Track 1.
    Put Track 3 on top, Select Input 2 on Track 2.
    Put Track 4 on top, Select Input 2 on Track 3.
    Put Track 1 on top, Select Input 2 on Track 4.
    Put Track 2 on top, Select Input 1 on Track 1.
    Put Track 3 on top, Select Input 1 on Track 2.
    Put Track 4 on top, Select Input 1 on Track 3.

    I don't currently have anything switching them all on at the same time (they're powered from 4 separate adapters), but I doubt that it would help very much. Keep in mind that these are very cheap cameras, they seem to warm up slowly, at different rates. I'd say their signal will be generally a bit wobbly, but that's part of the aesthetic that I'm working on!

  • http://www.plus2.fr FANF

    Guess you're right about the cameras…

    What i don't get is, when switching from T1 to T2, at that exact same time, you sw input on T1 from in1 to in2.
    Ok.
    That should give you a 120 ms (3f) overhead.
    Is that not enough ?

    Have you tried changing your midi cable to a shorter one ?

    I'm not sure this is relevant, but maybe trying this might help:
    in your patch, get rid of the part under the gate object.

    on each outlet of the gate, 2 bangs, but as a message; no GUI: "bang", not the circle. (so as to limit CPU usage)

    1 of these bangs will be for input sw, the other for layer sw.
    Of each of those, you plug the outlet to an appropriate message in the form of "20 64 1"
    Then plug each individual message to one single ctlout.

    I'd gladly try that myself, but i'm lacking 8 sources for the test :(

    Anyway, I think this is a GREAT idea you got there, mr !
    imagine those cameras mounted on an arc, you could adjust the curve of it with a string and a little wheel, like a bow, the whole thing mounted on a crane with a travelling moving forward, sideways, all remote controlled, and a bumper sticker too…

  • http://www.jaymis.com Jaymis

    I'm not actually switching input at exactly the same time. The patch you're seeing has 16 steps, so the first step shows the camera, the second step switches input.

    I'm already using a relatively short midi cable.

    On the patch I'm using the circle "bangs" just so I can see that the switching is happening in the correct order. It's using very little CPU, so I don't think that would be an issue.

    Mounting in an arc and moving around is the next step. It's definitely lots of fun!

    The hardest part is choosing the bumper sticker though.

  • cat

    http://www.ptgrey.com/newsletters/may2008.html
    Heres a link to point greys bullet time demo

  • http://sleepytom.co.uk sleepytom

    Ha – i had that idea years ago – i've done it using an extron 16×16 matrix controlled via rs232 output from VVVV. the secret is to use cameras with genlock and a switcher with vertical interleave switching. The vixid really isn't the right tool for this job as it simply cannot switch fast enough (well it can, but i think you'll find that it cannot process the midi data quickly enough to handle the switching and the layer order commands, you'll get buffer over flows and inconsistent switching times / stacked commands which will limit how fast you can go)

    the tests i've done with my extron setup were looking quite promising – i have a 360 surround installation piece in mind for the setup eventually but haven't ever had the opportunity to exhibit such a piece so haven't got past some basic tests – TBH i've not looked at it for years but this might inspire me to get back into the whole scene…

  • http://www.vixid.com Vince

    Actually, the technical capabilities of the VJX are:
    - Switching between layers happens instantly, since the 4 tracks are synchronized by the 4 internal TBC (and this is why the 4 tracks can be mixed and blended all together). Having 4 synchronized tracks make the VJX16-4 more suited for this task than a traditional two tracks (A-B) mixer.
    - Switching inputs can take a little longer. It usually takes about 2-3 frames, and depends on the quality of the incoming video signal (understand the accuracy of the synch pulses). Switching inputs just as soon as a track is no more visible will help.
    - The MIDI data are processed quick enough to be interpreted at the frame rate, and the MIDI buffers are sized accordingly. For this application, only two MIDI messages need to be transmitted for each frame, which won't be a problem. Due to the MIDI transmission speed, it should be possible to send (at least) 40 MIDI messages per frame (this is worst case).

    Can't wait for the next step of Jaymis' project to see where it goes!

  • http://sleepytom.co.uk sleepytom

    yeah makes sense :)

    still the potential for 3 frames delay on input switching could easily cause errors with this setup, this would be worse with very cheap cameras such as the pictured spycams. It's a shame the vixid doesn't have genlock input and the ability to bypass the TBC for use with synchronised video sources, this would get round the potential errors and have the advantage of reducing the input>output delay by at least one frame.

    the vixid isn't the right tool for my installation idea anyway as i need more outputs to create the effect i'm after – but it is interesting to see someone else working on a similar idea.

    does the vixid have a strobe effect? if you strobed the inputs then you could switch at a slower rate whist maintaining the frozen time effect, this might actually look better than doing 1 frame per camera angle which is a bit of a fast pan imho.

  • http://www.jaymis.com Jaymis

    VJX does have Strobe, but I'm not actually maintaining the frozen time effect anyway, so it's not actual time slice.

    I think the next thing I'm going to try will be using fast fades between layers, to give a smoother feel. Morph rather than cut.

    I'm also working on some off-mixer circuitry to up the camera count from 8 to 16, hope to have that happening soon.

  • http://sleepytom.co.uk sleepytom

    vixid has 16 inputs so you could plug 16 cameras directly in without the need for extra circuitry could you not

  • http://www.jaymis.com Jaymis

    It does, but 8 of those inputs are S-Video, and the mini cameras send composite. If they were more expensive cameras this obviously wouldn't be an issue, but the off-camera switching is an interesting exercise anyway, as it takes the potential from 16 to basically limitless inputs.