text
stringlengths
0
17.2k
Click image to expand.
Your Project is now ready to accept video from the AJA card, and to send rendered output to the card. In the next sections, we'll hook it up and start playing video in and out.
In this process, we'll make video input from the AJA card visible in the current Level in the Unreal Editor. This process uses a Media Bundle: a kind of Asset that packages together several different types of Assets involved in the Media Framework, and that offers you control over some advanced features like lens deformation, chroma-keying, color correction, and more.
In your Content Browser, expand the Sources panel. Right-click, and choose New Folder from the context menu.
Rename your new folder AJA.
Open your new folder, right-click in the Content Browser and choose Media > Media Bundle.
Your new Asset's name is automatically selected in the Content Browser, so you can give it a descriptive name:
Type a new name, like AjaMediaBundle, and press Enter. A new folder of Media Framework Assets is automatically created next to your Media Bundle, named with the suffix _InnerAssets.
Save your new Assets by clicking the Save All button in the Content Browser.
Double-click your new Media Bundle to edit its properties. The Media Bundle is capable of playing video from any kind of media source the Engine supports, so you'll need to tell it that you want to get the video from your AJA card.
In the Media Source property, select Aja Media Source from the drop-down list:
Click image to expand.
Once you've identified the type of Media Source you want the Media Bundle to handle, you can then set up any configuration properties offered by that type of source.
You can make Unreal Engine automatically match the format and framerate of the incoming video signal. To enable automatic format detection, click the Configuration dropdown, enable Auto, and then click Apply. The engine now seamlessly handles changes and restarts automatically if the signal is temporarily lost.
Click image to expand.
The options you see may vary depending on the devices you have installed. For details on all of the properties you can set for an AJA Media Source, see the AJA Media Reference page.
If you want to apply any compensation to the incoming video to account for lens distortion, you can set up the physical properties of the lens in the Lens Parameters section.
Click image to expand.
These Lens Parameters just set up the physical properties of the lens. You'll actually activate the lens compensation later, when you edit the Material Instance used by the Media Bundle. Save your Media Bundle when you're done setting up its properties, and return to the AJA folder in the Content Browser.
Drag your AjaMediaBundle Asset from the Content Browser into the Level Viewport.
Click image to expand.
You'll see a new plane appear, showing the video currently being played over the port configured for your Media Bundle. Use the transform tools in the Viewport toolbar to move, rotate, and resize it. If your Media Bundle doesn't start playing automatically, select it, then click the Media Bundle > Request Play Media button in the Details panel.
Now, we'll see how to apply keying and compositing effects to the video stream. Back in the Media Bundle Editor, click the Open Material Editor button in the Toolbar to edit the Material Instance that this Media Bundle uses to draw its incoming video feed on to an object in the Level.
This Material Instance is saved inside the AjaMediaBundle_InnerAssets folder that was created automatically with your Media Bundle.
Click image to expand.
In the Material Instance Editor, you'll see a number of properties exposed for you to configure keying, cropping, and color correction, and to activate the correction for the lens distortion that you set up in the Media Bundle.
Click image to expand.
While you adjust the settings in the Material Instance Editor, you can see the effect of your changes on the video feed playing back in the main Level Viewport.
You may find it more convenient to see the effects of the changes you make in the preview panel of the Material Instance Editor instead. To do this, temporarily enable the IsValid setting, and set its value to 1.0.
Click the arrow at the top left of the viewport toolbar, and enable the Realtime option in the menu.
You'll be able to judge the effect of your changes more easily by changing the preview mesh to a plane or a cube. Use the controls at the bottom of the viewport:
When you're done, return the IsValid setting to its previous value.
At this point, you should have video playing over an SDI port showing up inside your Unreal Engine Level, and you should understand where to set up more advanced features like lens deformation and chroma-keying.
If you're already familiar with the Media Framework, another way you could get video into your Level is to create a new AjaMediaSource Asset in your Project, and set it up with the same source properties you set up inside the Media Bundle in the procedure above. Then, create your own MediaPlayer and MediaTexture Assets to handle the playback of that source in your Level. For details, see the Media Framework documentation. However, we recommend using the Media Bundle, as shown above, to get the best balance between ease of use and professional quality video features.
In this process, you'll set up an AJA Media Output object, and use the Media Captures panel in the Unreal Editor to output the view from selected cameras in the Level to your AJA card.
Right-click in the Content Browser, and select Media > Aja Media Output.
Click image to expand.
Name your new Asset AjaMediaOutput.
Double-click your new Asset to open it up for editing. Just like when you created your Aja Media Source, you have to set up the Configuration property to control the properties of the video feed that the Unreal Engine sends to your AJA card. Click the arrow to open the submenu, select the options that match your video setup, then click Apply in the submenu.
Click image to expand.
For details on all of the properties you can set in the AJA Media Output, see the AJA Media Reference page.Save and close your Media Output when you're done.
Now we'll place two cameras in the Level, to give us viewpoints for the output we'll send to the AJA card. In the Place Actors panel, open the Cinematic tab, and drag two instances of the Cine Camera Actor into the viewport.
Place the cameras where you want them in the Level, so that they're showing different viewpoints on the scene.
Piloting the camera is a fast and easy way to set its viewpoint exactly the way you want it. See Pilot Actors in the Viewport.
From the main menu, choose Window > Virtual Production > Media Capture. You'll use the Media Capture window to control when the Editor sends output to your AJA port, and what camera it should use in the Level.
Under the Media Viewport Capture area, find the Viewport Captures control. Click the Add (+) button to add a new capture to this list.
Expand the new entry. First, we'll add the cameras that we want to capture from. In the Locked Camera Actors control, click the Add (+) button to add a new entry.
Then, use the drop-down list to choose one of the cameras you placed in the Level.
Repeat the same steps to add the other camera to the list.
Now, set up the output that you want to capture these cameras to. Set the Media Output control to point to the new AJA Media Output Asset that you created above. You can do this by selecting it in the drop-down list, or drag your AJA Media Output Asset from the Content Browser and drop it into this slot.