4.13.0 preview 3 packaging - Could not find a native player for file [...]

Hey guys,

I’m wondering if this is a known issue or if I’m doing something wrong.

When I go to package my project, I’m getting this error:

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

I tried with mp4 file and wmv and they both throw the same error.

I was trying to get to the Media Framework Technical Reference but that page seems to be down and I can’t see where the issue is happening. Technical reference is supposed to be here

I noticed a ‘default player’ option though I don’t know what I should be putting in there.

Everything works fine in the editor, it’s just failing on package.

Thanks for any and all help,
-ozzadar

Hello,

What does your media player setup look like? I’ve tested this with a simple media player that plays a video on Begin Play, and deliberately left the Native Player section blank and it seems to package without error.

Could you also provide the full output log please?

Sure.

I’ve put the file in Content/Movies (as mentioned, i tried both an mp4 and a wmv).
RIght Clicked in editor-> create new FileMediaSource. Browsed to file.
Media Texture created on top of it.

Could it be an issue with using it in C++ code?

ATutorialVideoWindow::ATutorialVideoWindow()
{
	
	tutorial_texture = ConstructorHelpers::FObjectFinder<UMediaTexture>(TEXT("MediaTexture'/Game/Movies/tutorial_player_Video.tutorial_player_Video'")).Object;
	media_player = ConstructorHelpers::FObjectFinder<UMediaPlayer>(TEXT("MediaPlayer'/Game/Movies/tutorial_player.tutorial_player'")).Object;
	mediaSource = ConstructorHelpers::FObjectFinder<UFileMediaSource>(TEXT("FileMediaSource'/Game/Movies/TutorialVideo.TutorialVideo'")).Object;
	media_player->OpenSource(mediaSource);

}

It’s in the Cooking phase that it poops out.

Though here is the full log: link text

Thanks :slight_smile:

::EDIT:: As a small update, I just built from source from the 4.13 branch on github and experienced the same result.

::EDIT 2::
Just noticed on hot reloads im getting this error:

LogWmfMedia:Error: Failed to set topology in media session (A stream descriptor was set on a source stream node but it was not selected on the presentation descriptor.)

Any idea what this means?

This seems like it could be the culprit; though I am unsure what this means

In your media file, have you set a Native Player or have you left the field blank?

Heres the screenshot of the assets

I’ve been doing some testing and it’s definitely the C++ code. I think when creating a filemediasource from c++ it’s not setting a default native player ?

Commenting line by line, it’s when Im calling

media_player->OpenSource(mediaSource);

where it’s generating the error.

So after some looking into it, I think that something is iffy with the C++ cooking of media players.

When I look into the WmfMediaFactory it declares its name as WmfMedia, which I then force set on the media player:

media_player->DesiredPlayerName = FName("WmfMedia");

When I go to cook that it comes up saying

LogMediaAssets:Error: Could not find desired player WmfMedia for file [...]

which indicates to me that the Media modules aren’t being referenced when cooking from C++ content.

I’ve added ‘Media’ and/or ‘WmfMedia’ to my projects Public/PrivateDependencyModules with no luck.

I’ll implement this in a Blueprint actor for now to get the ball rolling; hopefully we can figure this out eventually :slight_smile:

Thanks for continuing to look into it. I’m doing the same on my end. Would you be able to provide the full code for the relevant class(es) so that I can compare what we have?

Sure, really only two files directly linked to it (.h and .cpp attached):

files

You can use a basic plane mesh instead of the procedural one Im using in AUIComponent.

  1. The DefaultPlayer and PlatformPlayers fields on the MediaSource assets are not implemented yet.

  2. You do not need to set a DesiredPlayerName on the MediaPlayer. If you leave it empty, the MediaPlayer will try to find a suitable player plug-in automatically. In 99% of use cases you should leave empty. Only set it if you absolutely have a reason to enforce a particular native player.

  3. If the MediaPlayer cannot find a player (as your error message suggests), then that means that the WmfMedia plug-in hasn’t been loaded in your packaged game. Please verify that the WmfMedia plug-in is enabled in your project, and that it is actually in your packaged build.

Please attach the log file of your packaged build.

It packages fine when i remove the media_player->OpenSource() line from C++.

I had the same class implemented in blueprints in the exact same fashion and it worked flawlessly. It’s some iffyness on the C++ side.

I also manually added the Media, MediaAssets plugins in my c++ dependency modules in my .cs file and it didn’t do the trick.

Don’t have logs for you (as I couldn’t halt development for this), but that’s the behaviour I’m experiencing.

Packages fine and finds the Media plugins fine when doing things in blueprints; fails on packaging when doing things in C++.

Hey ozzadar,

Sorry for the delay. I’ve been able to reproduce the issue and have entered a bug report: Unreal Engine Issues and Bug Tracker (UE-35945)

Thanks for your report.

Have a great day!

LogWmfMedia:Error: Failed to set topology in media session (A stream
descriptor was set on a source stream node but it was not selected on the
presentation descriptor.)

This means that your file contains multiple audio and/or video tracks. This is not supported until 4.14. Please make sure you have at most one video and one audio track for now.

The DefaultPlayer and PlatformPlayers fields are not implemented yet and have no effect.

You are opening media in ATutorialVideoWindow::ATutorialVideoWindow. This is very bad, because this code will be executed whenever an instance of ATutorialVideoWindow is created. You must know that the UObject sub-system will always create at least one instance of your class, the Class Default Object (CDO). This is why you’re seeing the error during the cooking.

Do not open media (or perform any other game relevant tasks) in UObject constructors. You are probably looking to implement BeginPlay() instead.

Please always post complete error messages and Engine version number, otherwise it’s impossible to say what’s happening. In your case, either AvfMedia is not enabled, or the file extension of your file is not supported. You can find the list of supported file extensions in AvfMediaFactoryModule.cpp, StartupModule(). In 4.14 it currently is:

		SupportedFileExtensions.Add(TEXT("3g2"));
		SupportedFileExtensions.Add(TEXT("3gp"));
		SupportedFileExtensions.Add(TEXT("3gp2"));
		SupportedFileExtensions.Add(TEXT("3gpp"));
		SupportedFileExtensions.Add(TEXT("ac3"));
		SupportedFileExtensions.Add(TEXT("aif"));
		SupportedFileExtensions.Add(TEXT("aifc"));
		SupportedFileExtensions.Add(TEXT("aiff"));
		SupportedFileExtensions.Add(TEXT("amr"));
		SupportedFileExtensions.Add(TEXT("au"));
		SupportedFileExtensions.Add(TEXT("bwf"));
		SupportedFileExtensions.Add(TEXT("caf"));
		SupportedFileExtensions.Add(TEXT("cdda"));
		SupportedFileExtensions.Add(TEXT("m4a"));
		SupportedFileExtensions.Add(TEXT("m4v"));
		SupportedFileExtensions.Add(TEXT("mov"));
		SupportedFileExtensions.Add(TEXT("mp3"));
		SupportedFileExtensions.Add(TEXT("mp4"));
		SupportedFileExtensions.Add(TEXT("qt"));
		SupportedFileExtensions.Add(TEXT("sdv"));
		SupportedFileExtensions.Add(TEXT("snd"));
		SupportedFileExtensions.Add(TEXT("wav"));
		SupportedFileExtensions.Add(TEXT("wave"));

@gmpreussner what about mac os?
I left Default Player empty and AVF Media Player is among Media Players. But playback fails:

Could not find a native player for …
How to fix this?

@gmpreussner thanks!
So the error message:

LogMediaAssets:Error: Could not find a native player for http://cdn.tfuteam.com/stream_stuff/videoplayback.mp4

Engine version number is 4.13.1-0+UE4.

AvfMedia is enabled under the plugins setting → Media Players.

For 4.13 the list of supported formats is:

		// supported file extensions
		SupportedFileExtensions.Add(TEXT("m4v"));
		SupportedFileExtensions.Add(TEXT("mov"));
		SupportedFileExtensions.Add(TEXT("mp4"));

But it fails. What’s wrong?

@gmpreussner I updated to 4.14 (the latest version) and recreated the sample project, according to the tutorial.
I’ve tried with player set to auto, and error is the same:

LogMediaAssets:Error: Could not find a native player for http:\\file.pm4

Then I’ve tried to set manually default player for mac to AvfMedia.
Now the error message is is:

LogAvfMedia:Warning: Failed to load video tracks. [The operation couldn’t be completed. (OSStatus error -12936.)]

I’ve tried both mp4 and mov. No luck.
And I also get a weird crash, when I push Stop button. The Editor crashes with the log:
THE LOG

It looks like a Unreal bug. What I’m doing wrong?

@gmpreussner tried to debug it. No luck. Any clues where to look at?