Upgrading Media Framework Content to 4.18

Choose your OS:

In Unreal Engine 4.18, the Media Framework system received an update to the asset types and playback methods. This means that if you have existing Media Framework content in your project, you have to update your content. Your project will still load, but because the workflow is slightly different now, playback will no longer work with existing 4.18 content until you have performed the updates.

Media Player Changes

The Media Player asset has undergone some changes including how Media Textures are referenced and Sound is applied.

Media Sound Component

When creating a Media Player asset, the Create Media Player no longer presents the option to create a SoundWave asset for audio.

Pre418_Create.png

418_Create.png

Previous Engine Versions: Create Sound Wave and Media Texture

Engine Version 4.18: Create Media Texture Only

You can still enable the Video output Media Texture asset to automatically create and associate a Media Texture asset with the Media Player you are creating.

In order to associate Sound with a Media Player, however, you will need to use a Media Sound Component attached to your Actor or Blueprint.

MediaSoundComponent.png

In the image above, we have a Static Mesh in the level that we have added a Media Sound Component to and specified the associated Media Player.

If your project uses Sound Wave assets for Media, you will need to manually delete them and add a Media Sound Component and associated Media Player.

Media Texture Reference

Media Players also reference Media Textures differently as the Media Texture now points to a Media Player (instead of a Media Player pointing to a Media Texture).

Below, an image of the pre-4.18 Media Player:

Pre418_Player.png

The Output section has been removed and no longer requires an associated Sound Wave or Video Texture.

Below, an image of the 4.18 Media Player:

418_Player.png

This has been replaced with options for controlling the View Settings for 360 videos (which is currently still in development).

Sound Waves have been replaced with the aforementioned Media Sound Component while the Video Texture (Media Texture asset) now points to an associated Media Player.

MediaTexture.png

Above, a Media Texture asset points to an associated Media Player to play back video.

Updating Materials to 4.18

If your pre-4.18 project uses Media Textures inside a Material, you may need to update your Material and change the Sampler Type to the new External type.

TextureSamplerUpdate.png

Materials still use a Texture Sampler and Media Texture, however, the Texture Sampler must be set to External.

Media Textures implement a new texture API called External Textures that on some platforms, provides a more optimal way of video playback. For example on Windows, the video frame data is decoded from the file before being copied to the CPU memory buffer. Once in the CPU memory buffer, it is then uploaded to the GPU into a UTexture where the Texture is sampled within a Material.

Some decoders can bypass this transfer of data and have the ability to decode video on the GPU directly. For example, on Android and iOS devices the video decoders will decode the compressed video on the GPU so the video frames are already on the GPU allowing for much more efficient video playback.