Network Device Interface (NDI) is a royalty-free software developed to facilitate near real-time and ultra-low latency video communication over internet protocol (IP) in a frame-accurate manner without compromising quality. This technology benefits media companies building live production workflows by enabling communication between production systems like graphics, mixers, switching that leverage the IP-based networks.

NDI uses multicast domain name system (mDNS) for video discovery. The mDNS service sends an IP multicast message that asks the host to identify itself. The target machine then multicasts a message that includes its own IP address. This multicast message is seen by all NDI receiving machines.

In this post, we take you through the steps to configure NDI traffic within a virtual private cloud (VPC) using AWS Transit Gateway, which connects VPCs and on-premises networks through a central hub. This process helps build live production on AWS.

Schematic view

Architecture for NDI on AWS

Step 1: Create VPC

Create a simple VPC using the AWS CloudFormation VPC template. AWS CloudFormation lets you model, provision, and manage AWS and third-party resources by treating infrastructure as code. The template creates VPCs with two public subnets and two private subnets along with VPC components like internet gateway and NAT gateway. However, this blog limits the NDI traffic activation to two public subnets within the VPC.

Step 2: Create Transit Gateway

For this step, use the console for Amazon VPC, a service that gives you complete control over your virtual networking environment.

  1. Open the Amazon VPC console.
  2. In the Region selector, choose the Region of your choice.
  3. On the navigation pane, choose Transit Gateways.
  4. Choose Create Transit Gateway.
  5. For Name tag, enter a name for the transit gateway. We used NDI Transit Gateway.
  6. For Description, enter description of your choice. We used NDI Transit Gateway.
  7. Select the check box against Multicast support, under section Configure the Transit gateway.
  8. Keep other configuration as default and choose Create Transit Gateway.
  9. After you see the message Create Transit Gateway request succeeded, choose Close.
  10. Check if the state of transit gateway is available.

Create transit gateway configuration to activate NDI traffic

State of the transit gateway

Step 3: Attach Transit Gateway with VPC

  1. On the navigation pane, choose Transit Gateway Attachments.
  2. Choose Create Transit Gateway Attachment.
  3. For Transit Gateway ID, choose the transit gateway to use for the attachment.
  4. For Attachment type, choose VPC.
  5. For Attachment name tag, enter a name for the attachment.
  6. For VPC ID, choose the VPC to attach to the transit gateway.
  7. For Subnet IDs, select one subnet for each Availability Zone to be used by the transit gateway to route traffic. You must select at least one subnet. You can select only one subnet per Availability Zone.
  8. Choose Create attachment.
  9. Check if the attachment state is available.

Attach VPC with Transit Gateway

Attachment Status

Step 4: Create Transit Gateway Multicast

  1. On the navigation pane, choose Transit Gateway Multicast.
  2. For Name tag, enter a name to identify the domain. Say NDI multicast domain.
  3. For Transit Gateway ID, choose the transit gateway that processes the multicast traffic.
  4. To manually add sources, set the IGMPv2 support attribute to enable.
  5. Choose Create Transit Gateway Multicast Domain.
  6. Check if the transit gateway multicast domain state is available.
Create Multicast Domain with IGMPv2 support

Create Multicast Domain with IGMPv2 support

Multicast Domain status

Step 5: Associate subnets with multicast domain

  1. On the navigation pane, choose Transit Gateway Multicast.
  2. Select the multicast domain, and then choose Actions, Create association.
  3. For Transit Gateway ID, select the transit gateway attachment.
  4. For Choose subnets to associate, select the subnets to include in the multicast domain.
  5. Choose Create association.

Subnet association with Multicast Domain

Successful association of subnet with multicast domain

Step 6: Create two Windows instances on Amazon Elastic Compute Cloud (Amazon EC2)

For this step, use Amazon EC2 G3 Instances, which are Amazon EC2 GPU graphics instances, and Amazon EC2 G4 Instances, which are cost-effective, versatile GPU instances (use Amazon EC2 G4dn Instances).

  1. Launch two Windows Server instances in a VPC that each map to different public subnets—use Amazon EC2 G3 Instances or Amazon EC2 G4dn Instances.
  2. Configure the security group to use inbound rules allowing all traffic for VPC Classless Inter-Domain Routing.
  3. Login to both the instances using valid credentials.

Step 7: Install necessary drivers and software on the Amazon EC2 instances.

  1. Install NVIDIA drivers by following the instructions.
  2. Install OBS Studio on both the instances.
  3. Install OBS-NDI plugin on both the instances.
  4. Install NDI Tools on both the instances.

Step 8: Add Amazon EC2 instances as a group member in multicast domain

  1. On the navigation pane, choose Transit Gateway Multicast.
  2. Select the multicast domain, and then choose Actions, Add Member.
  3. For Group IP address, enter 0.0.251.
  4. Under Choose network interfaces, select the multicast network interfaces. (Network interfaces of two Amazon EC2 instances created will be listed.)
  5. Choose Add members.

Adding group members in multicast domain

Step 9: Test NDI traffic

Configuring NDI on first instance

  1. Log in to one Amazon EC2 instance using valid credentials. We suggest naming it NDI-Host1.
  2. Activate NDI output in OBS Studio.
    1. Open OBS application.
    2. Select Tools, and choose NDI Output settings.
    3. Select Main Output—for Main Output name enter name of your choice. We used OBS-Output1.

OBS NDI output configuration

Configuring NDI on second instance

  1. Log in to the second Amazon EC2 instance using valid credentials. We name it as NDI-Host2.
  2. Activate NDI output in OBS Studio.
    1. Open OBS application.
    2. Select Tools, and choose NDI Output settings.
    3. Select Main Output—for Main Output name enter name of your choice. We used OBS-Output2.

NDI output configuration

Check Video Sharing between instances.

  1. Open the NDI Studio Monitor application under NDI Tools in both Amazon EC2 instances using the Start button.NDI Studio Monitor Launch option
  2. The NDI Studio Monitor discovers both NDI outputs generated by both instances.NDI stream selection and switching in NDI-HOST 1 and 2
  3. Select NDI-HOST2 > OBS-Output2 in NDI-HOST1 Instance.
  4. Select NDI-HOST1 > OBS-Output1 in NDI-HOST2 Instance.
  5. Video is shared between two instances using NDI.Playing NDI output across instances

Conclusion

In this post, we showed you how to use AWS Transit Gateway to configure NDI traffic within a VPC that facilitates communication between NDI-activated video processing software within IP network–based live video production.

Remember to stop the EC2 Instances when you are not using them. This stops the instance from incurring costs when not in use. To delete the instance permanently, terminate the instance.

To learn more about setting up a transit gateway Connect attachment using VPC as transport, please see our documentation.