Ethernet Shield - sACN -> ATEM (UDP/Ethernet timing issues?)

My goal is to be able to send commands from a theatrical lighting console, through an Arduino w/ Ethernet shield, to a Black Magic video switcher that accepts ATEM protocol.

There is a robust library availble for the video switching side of the project here.

There are also many sACN libraries available. I've been trying with forkineye's E1.31 library.

I've tried a few different approaches and can't get the two to play nice together consistently. In my code, I believe my problem lies in that I'm initializing the ethernet connection to the switcher, library then seperately initializing another ethernet connection to listen for sACN packets. I'm definitely just hacking together different librarie's examples so I think there are some UDP/Ethernet timing conflicts between the two but I don't know what the actual problem is, let alone where to start looking for a solution.

I know the ethernet shield is limited to 4 socket connections but I think what I'm trying to do falls under that limit.

Is what I'm trying to do possible? Can someone point me in the right direction to be able to have the multi-directional communication I'm looking for.

Thanks!

ATEM_SACN.ino (3 KB)

I searched a few more threads about trying to combine 2 or more Libraries that utilize the Ethernet shield and confirmed my error lied within initializing Ethernet a second time. I also changed the code used for parsing the sACN data.

I've confirmed this works using an Arduino Mega w/ Ethernet Shield, Blackmagic Design ATEM Production Studio 4K Live Switcher and Chamsys MagicQ Software to send out sACN data.

New code up on github.