When attempting to use a media player asset in code, packaging will fail with the error message shown below.

Could not find a native player for [...]4.13/Content/Movies/Tutorial.wmv

This occurs even if the Desired Player Name is set, and after ensuring the plugins are included.

Steps to Reproduce
  1. Open the editor
  2. Import a video
  3. Create a new media player and media texture
  4. Create a new Actor in C++
  5. Copy the following code into the .h
    class UMediaPlayer* TestMP;
    class UMediaTexture* TestMT;
    class UFileMediaSource* SourceFile;
  6. Copy the following code into the .cpp
    #include "MyProject2.h"
    #include "Runtime/MediaAssets/Public/MediaPlayer.h"
    #include "Runtime/MediaAssets/Public/MediaTexture.h"
    #include "Runtime/MediaAssets/Public/FileMediaSource.h"
    #include "MyActor.h"
    // Sets default values
     	// Set this actor to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
    	PrimaryActorTick.bCanEverTick = true;
    	static ConstructorHelpers::FObjectFinder<UMediaPlayer> MPAsset(TEXT("MediaPlayer'/Game/FirstPersonBP/TestMP.TestMP'"));
    	if (MPAsset.Succeeded())
    		TestMP = MPAsset.Object;
    	static ConstructorHelpers::FObjectFinder<UMediaTexture> MTAsset(TEXT("MediaTexture'/Game/FirstPersonBP/TestMP_Video.TestMP_Video'"));
    	if (MTAsset.Succeeded())
    		TestMT = MTAsset.Object;
    	static ConstructorHelpers::FObjectFinder<UFileMediaSource> MSAsset(TEXT("FileMediaSource'/Game/FirstPersonBP/Unreal_MP4_TestVideo.Unreal_MP4_TestVideo'"));
    	if (MSAsset.Succeeded())
    		SourceFile = MSAsset.Object;
    	TestMP->DesiredPlayerName = FName("WMFMedia");
  7. Compile
  8. Drag the media texture onto an asset in the level
  9. Drag your actor into the level
  10. Attempt to package the project for Win64

Result: Notice that you'll get an error message along these lines:

Could not find a native player for [...]4.13/Content/Movies/Tutorial.wmv

Expected: Packaging would complete.

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

Login to Vote

By Design
ComponentMedia Framework
Affects Versions4.13
CreatedSep 13, 2016
ResolvedSep 13, 2016
UpdatedMay 2, 2018