NDI with Unreal Engine

stev_fun

New member
Hey All, I figured i should start a thread because we have this new fancy integration! This thread is intended for Unreal developers blueprints or C++, using NDI. personally am not a developer, but a content creator. However, ill need your help to make sure that all the juicy stuff is possible.

I was thinking about separate topics, but until there is enough momentum i guess it can all live here.

My first question question is regarding NDI SDK for Unreal Engine. Im inside a blueprint actor and i have my NDI Finder component finding the feeds... How would i go about changing the NDItexture2D stream name so it assigns each NDI receiver actor a different input source?

Grateful for the future!

Thanks
 

Attachments

  • NDI signal distribution.png
    NDI signal distribution.png
    195 KB · Views: 771

Saxanth

New member
After spending a few days looking at a simular solution. I have come to the conculsion that it doesn't look like NDI Receivers should change the Texture at runtime, but change the source connection.

As it seems the documentation is available, it's very sparse and only really includes simple stuff. I hope that NewTek will create more tutorials, or have a creation series on how this all works. Otherwise I will probably make video tutorials on how to do this myself (atleast my understanding of it) so the community has resources to lookup.

Someone at newtek, do you think that documentation will include lower level concepts for for more advanced features of the plugin, or video tutorials ??
 
Last edited:

stev_fun

New member
Hey,

Saxanth, it looks like we are some of the first to be interested here. Im making headway and agree with your conclusion. I have contacted the developers and in talks about the documentation being updated.

I have also found a solution that requires a separate blueprint actor for each unique feed, that includes its own unique assets to function. Changing out a stream feed is easy enough externally.
 

Saxanth

New member
Yeah. I happened to notice it when trying to download the latest 4.5 sdk... I guess they sent out an email about it, but kinda tossed it aside. I thought it was just a copy and paste job from previous NDI releases (when including UE support).

It works really well out of the box, so I'm kinda happy about that. I wish NewTek would have given this more visibility, it's really awesome to be able to use Unreal Engine and NDI together. Hopefully they continue supporting it with different versions of the engine. Well I guess the silver lining is that it seems like we are the first to play around and find issues and help make the plugin better :D
 

tekifuta

New member
Plugin is currently incompatible with UE 4.25, to make it compatible do the following manual code changes until NewTek updates the SDK.

- NDI SDK for Unreal Engine\NDIExamples\Plugins\NDIIOPlugin\Source\Core\Public\Actors\NDIReceiveActor.h

Line 92
Code:
virtual void PreEditChange(UProperty* InProperty) override;

Replace with
Code:
virtual void PreEditChange(FProperty* InProperty) override;

- NDI SDK for Unreal Engine\NDIExamples\Plugins\NDIIOPlugin\Source\Core\Classes\Actors\NDIReceiveActor.cpp

Line 194
Code:
void ANDIReceiveActor::PreEditChange(UProperty* InProperty)

Replace with
Code:
void ANDIReceiveActor::PreEditChange(FProperty* InProperty)

- NDI SDK for Unreal Engine\NDIExamples\Plugins\NDIIOPlugin\Source\Core\Classes\Objects\Media\NDIMediaReceiver.cpp

Comment Line 478
Code:
//TShaderMap<FGlobalShaderType>* ShaderMap = GetGlobalShaderMap(GMaxRHIFeatureLevel);

Line 482-483
Code:
TShaderMapRef<FMediaShadersVS> VertexShader(ShaderMap);
TShaderMapRef<FRGBConvertPS> ConvertShader(ShaderMap);

Replace with
Code:
TShaderMapRef<FMediaShadersVS> VertexShader(GetGlobalShaderMap(GMaxRHIFeatureLevel));
TShaderMapRef<FRGBConvertPS> ConvertShader(GetGlobalShaderMap(GMaxRHIFeatureLevel));

Line 487-488
Code:
GraphicsPSOInit.BoundShaderState.VertexShaderRHI = GETSAFERHISHADER_VERTEX(*VertexShader);
GraphicsPSOInit.BoundShaderState.PixelShaderRHI = GETSAFERHISHADER_PIXEL(*ConvertShader);

Replace with
Code:
GraphicsPSOInit.BoundShaderState.VertexShaderRHI = VertexShader.GetVertexShader();
GraphicsPSOInit.BoundShaderState.PixelShaderRHI = ConvertShader.GetPixelShader();

- NDI SDK for Unreal Engine\NDIExamples\Plugins\NDIIOPlugin\Source\Core\Classes\Objects\Media\NDIMediaSender.cpp

Comment Line 258
Code:
//TShaderMap<FGlobalShaderType>* ShaderMap = GetGlobalShaderMap(GMaxRHIFeatureLevel);

Line 262-263
Code:
TShaderMapRef<FMediaShadersVS> VertexShader(ShaderMap);
TShaderMapRef<FRGBConvertPS> ConvertShader(ShaderMap);

Replace with
Code:
TShaderMapRef<FMediaShadersVS> VertexShader(GetGlobalShaderMap(GMaxRHIFeatureLevel));
TShaderMapRef<FRGBConvertPS> ConvertShader(GetGlobalShaderMap(GMaxRHIFeatureLevel));

Line 267-268
Code:
GraphicsPSOInit.BoundShaderState.VertexShaderRHI = GETSAFERHISHADER_VERTEX(*VertexShader);
GraphicsPSOInit.BoundShaderState.PixelShaderRHI = GETSAFERHISHADER_PIXEL(*ConvertShader);

Replace with
Code:
GraphicsPSOInit.BoundShaderState.VertexShaderRHI = VertexShader.GetVertexShader();
GraphicsPSOInit.BoundShaderState.PixelShaderRHI = ConvertShader.GetPixelShader();
 
Last edited:

roadlights

New member
Voicing support that there is additional interest for this being updated for 4.25 as soon as possible so it is not necessary to go through the manual procedure in the previous post.
 

tekifuta

New member
Thanks for posting this!

How does one update/rebuild the NDIIO and NDIIOEditor?

Have your project with the "NDIIOPlugin" plugin ready.

Install Visual Studio 2019 v16.5 (Just download the latest community edition).

During the install enable the Workload "Game development with C++".
Make sure the following is also enabled under "Individual Components" tab:
  • Windows SDK 10.0.18362
  • .NET Framework 4.6.2 Targeting Pack
  • .NET Framework 4.6.2 SDK

Launch the .uproject and it should recompile automatically.

Or right click the .uproject, select "Generate Visual Studio project files".
Open the project Visual Studio solution ".sln" that was just generated.
Right click your project name in the Solution Explorer window inside the "Games" folder.
Select "Set as Startup Project".
Set the solution configuration to "Development Editor" and "Win64".
Press F5 to rebuild anything that has changed and to Start Debugging immediately.

I suggest to do the code changes above inside Visual Studio itself.
 

ckgentry

New member

Thank you so much for taking the time to write out the steps...

I made the code changes in notepad++

After adding the missing modules to my pre existing Visual Studio 2019 install, I re-ran the 4.25 file with the edited NDI code and still received the same "... could not be compiled. Try rebuilding from source manually." error.

I followed the 2nd part of your instructions and when right clicking the proj. file and selecting "Generate Visual Studio project files", I get a "This project does not have any source code..." error. Added C++ in the game engine and then tried generating VS files again and got a bunch of errors.

Clearly in over my head at this point. I'll just have to be patient and wait for the SDK update. Thanks again.
 

tekifuta

New member
Official 4.25 SDK has a broken functionality for me.
You can no longer do a "Start Broadcasting" for a NDI Broadcast Actor.

This was working in 4.24, now it's not:





 
Last edited:

jashthereen

New member
Hey - has anyone had an issue exporting sound via NDI from Unreal? Right now the description for Media Sender specifies it sends both video / audio once broadcasted. I'm using Broadcast actors to output my feed to streaming softwares like OBS and Streamlabs, but have confirmed on all instances that it is just the video that goes through.

Furthermore, the manual details NDI Sound Wave as a feature responsible for bringing in sound via the receiver, but utilizing this doesn't help the sound go out with the output either.

A fix for this would be greatly appreciated !
 

Slamecka

New member
Looks like there was a new update with the email link, now shows different versions.

https://i.gyazo.com/5728fa7ce16ab500fc636f8754d97fa2.png

So they might be keeping upto date after all.

Appears the link for the NDI SDK for Unreal Engine 4.25 is no longer active. The link to 4.24 is active however there's just a 'Coming Soon' banner where the link for 4.25 previously was. Perhaps it was posted prematurely... e.g. missing the NDI Media Sender and Receiver assets. Hope to see an update soon.
 

rajsachdev

New member
Hey - has anyone had an issue exporting sound via NDI from Unreal? Right now the description for Media Sender specifies it sends both video / audio once broadcasted. I'm using Broadcast actors to output my feed to streaming softwares like OBS and Streamlabs, but have confirmed on all instances that it is just the video that goes through.

Furthermore, the manual details NDI Sound Wave as a feature responsible for bringing in sound via the receiver, but utilizing this doesn't help the sound go out with the output either.

A fix for this would be greatly appreciated !


Confirming that am facing the same problem, any solution NEWTEK?
 

rajsachdev

New member
Plugin is currently incompatible with UE 4.25, to make it compatible do the following manual code changes until NewTek updates the SDK.

- NDI SDK for Unreal Engine\NDIExamples\Plugins\NDIIOPlugin\Source\Core\Public\Actors\NDIReceiveActor.h

Line 92
Code:
virtual void PreEditChange(UProperty* InProperty) override;

Replace with
Code:
virtual void PreEditChange(FProperty* InProperty) override;

- NDI SDK for Unreal Engine\NDIExamples\Plugins\NDIIOPlugin\Source\Core\Classes\Actors\NDIReceiveActor.cpp

Line 194
Code:
void ANDIReceiveActor::PreEditChange(UProperty* InProperty)

Replace with
Code:
void ANDIReceiveActor::PreEditChange(FProperty* InProperty)

- NDI SDK for Unreal Engine\NDIExamples\Plugins\NDIIOPlugin\Source\Core\Classes\Objects\Media\NDIMediaReceiver.cpp

Comment Line 478
Code:
//TShaderMap<FGlobalShaderType>* ShaderMap = GetGlobalShaderMap(GMaxRHIFeatureLevel);

Line 482-483
Code:
TShaderMapRef<FMediaShadersVS> VertexShader(ShaderMap);
TShaderMapRef<FRGBConvertPS> ConvertShader(ShaderMap);

Replace with
Code:
TShaderMapRef<FMediaShadersVS> VertexShader(GetGlobalShaderMap(GMaxRHIFeatureLevel));
TShaderMapRef<FRGBConvertPS> ConvertShader(GetGlobalShaderMap(GMaxRHIFeatureLevel));

Line 487-488
Code:
GraphicsPSOInit.BoundShaderState.VertexShaderRHI = GETSAFERHISHADER_VERTEX(*VertexShader);
GraphicsPSOInit.BoundShaderState.PixelShaderRHI = GETSAFERHISHADER_PIXEL(*ConvertShader);

Replace with
Code:
GraphicsPSOInit.BoundShaderState.VertexShaderRHI = VertexShader.GetVertexShader();
GraphicsPSOInit.BoundShaderState.PixelShaderRHI = ConvertShader.GetPixelShader();

- NDI SDK for Unreal Engine\NDIExamples\Plugins\NDIIOPlugin\Source\Core\Classes\Objects\Media\NDIMediaSender.cpp

Comment Line 258
Code:
//TShaderMap<FGlobalShaderType>* ShaderMap = GetGlobalShaderMap(GMaxRHIFeatureLevel);

Line 262-263
Code:
TShaderMapRef<FMediaShadersVS> VertexShader(ShaderMap);
TShaderMapRef<FRGBConvertPS> ConvertShader(ShaderMap);

Replace with
Code:
TShaderMapRef<FMediaShadersVS> VertexShader(GetGlobalShaderMap(GMaxRHIFeatureLevel));
TShaderMapRef<FRGBConvertPS> ConvertShader(GetGlobalShaderMap(GMaxRHIFeatureLevel));

Line 267-268
Code:
GraphicsPSOInit.BoundShaderState.VertexShaderRHI = GETSAFERHISHADER_VERTEX(*VertexShader);
GraphicsPSOInit.BoundShaderState.PixelShaderRHI = GETSAFERHISHADER_PIXEL(*ConvertShader);

Replace with
Code:
GraphicsPSOInit.BoundShaderState.VertexShaderRHI = VertexShader.GetVertexShader();
GraphicsPSOInit.BoundShaderState.PixelShaderRHI = ConvertShader.GetPixelShader();



Thanks. Got it working in 4.25 (tested the receiver part), as for the missing NDI Media Sender and Receiver assets, just copied the assets I had made from 4.24 folder and pasted them into 4.25 folder.
 
Top Bottom