DIY replacement for piCaptureSd1 / frame buffer / frame synchroniser

Hi, I have been thinking about how I might sync up four different analog (composite or VGA) video signals. I don’t need to restore sync, I simply want to get signals in sync so I can then mix or manipulate them without scrolling or other unwanted glitches. I believe this is called a frame synchroniser rather than a TBC, though most TBCs will also do this.

I would reach for d_e_t_o_u_r but the piCaptureSd1 is no longer being made.

Right now, I am using a Videonics MX1 mixer for getting things in sync, but I would like to get things in sync up front to be able to mix with a dirty mixer, or to mix the green signal with the red of a different signal, or use one signal as a modulator of another, etc. There’s a lot of workflows or configurations where I imagine things being easier / cheaper if I had all the signals in sync at their source rather than at the final mixing stage.

So I am wondering what would be needed to replace the piCaptureSd1 or otherwise build a frame synchroniser with widely available DIY microcontroller boards like Teensy or similar. My goal is to keep this to a budget of less than $100 per channel, and to house it in a small enclosure. I know I could search eBay for 4 TBCs and get them on a common genlock, but this is a larger and more complicated hardware setup than I want and is also probably beyond my budget.

Any suggestions / links / docs / videos / whatever to help point me in the right direction would be very appreciated! Thanks in advance!

Also: I can write code and solder.

1 Like

hi @bill_fisher - sounds like a fun project!

this sounds like maybe a video switcher could do this for you ? heres an example of the kind of thing i mean (can get vga ones aswell) - usually you can pick them up pretty cheap on second hand markets… not 100% sure but im assuming could pass each input directly to the output and then all of those outputs would be in sync with eachoter (im guessing this is how the switcher is able switch cleanly…)

the detour project (well prototype it never really became more than a proof of concept) never synced multiple input signals together - it just took frames from a single input feed (piCaptureSd1 was one way to input but also those cheap-usb-easycap-cards would do it too or even hdmi-usb-capture cards) and stored them in raspberry_pi’s memory so you could loop over those frames forward/backwards/at different speeds and jump between them quickly kind of like video finger drumming…

i personally cant think of a way you could do this easily and cheaply with micro-controllers - you would probably need to start looking down the FPGA rabbit hole to get closer to this goal in diy

synchronizing external video signals is a hard problem - which is why old video mixers are still so useful for their tbc’s (and also why older cameras had gen-lock inputs - to avoid needing to do this) lzx has the tbc2 module but this will be more than your stated price-range…

i think looking into a video-switcher could be ur best starting point but also curious what else you might find !

1 Like

Wow, that Extron unit looks like it might actually do the trick. I will check it out in more depth, but thanks a ton for letting me know that units like this exist!

I keep hearing that FPGAs are the only way to do frame synchronization – why is that?

Teensy 4.1 operates at 600 Mhz, or 912 Mhz overclocked, which seems like it could be fast enough. But maybe it’s a matter of writing to memory fast enough?

i dont think its the only way - but i guess its because if you wanted to use (for example) a teensy to sync two composite video signals you would need to build a circuit that had two external video encoder and two external video decoder ic’s… the generic adc’s/dac’s you can get with those kinds of boards usually dont have the resolution or speed to handle composite video (especially with colour subcarriers) directly

(there is a v cool example of using the built-in dac of esp32 to generate colour composite video… but its all a bit hacky unless you have specific chips for handling it or can make em with fpgas…)

i guess the general approach would be to store the two converted data streams coming off the decoders into memory for long enough that you have a whole frame for each → then encode them both back to composite in sync with each other…

1 Like

Looking at the manual for the Extron switcher, I don’t see that it actually does frame sync. Rather, it will simply switch on the sync pulse.

Yeah, that general approach of buffering a full frame or two was what I was thinking. No encoding or decoding should be necessary, though it would need to detect the VSYNC correctly, maybe with something like this: DIY Circuit Snippets with the LMH1980: Frame Sync Extractor, Trisync/Csync Regenerator, Interlaced Detector, Activity Detector - DIY - LZX Community

But you may be right about the speed of the ADC/DAC.

The maximum speed of the i2c bus is 1Mhz (due to the Wire library, though in theory i2c can be faster), so simply connecting a faster ADC/DAC via i2c will not work.

SPI can reach speeds of 100Mhz, so some fast converters communicating with the Teensy over SPI might be able to achieve the speed necessary.

i just tested this idea on my extron switcher and yes - sadly the outputs are not in sync ! ahwell…

do you know about the trick with MX-1 to get dual tbc - two separate but synchronized outputs ? for two sources atleast this is a good option! if you already have

1 Like

Ah yeah, using the preview output! I had forgotten about that possibility as I’m almost always using the preview to see the “menu” screen. Sounds like a workflow I would need to practice to do it in a live performance, but it could give me great results. Thanks for the reminder!

One more reason why I need even more video mults in my system, as I’d want to monitor the preview as I do normally but then be able to bring that signal back into the system as well. With audio or CV I often split passively, but I’m finding that I need to build a large number of powered video mults to have the same kind of creative workflow with my video work.

There are many options for mults out there… but if ya want a lil diy business card sized one that can run on usb power (5v) should check out _bisect_ – underscores

1 Like