No sound in shipping build when playing video in Media Player

I have no sound in shipping build x32 when playing video file in Media Player. Video stream looks fine, but with no sound. Video have sound only when playing in editor. Development x64 build also have no sound too.
All tested in 4.6.1

Hello h2o,

When attempting to play the sound for your Media Player asset, have you made sure to create an Audio Media Asset?

Keep in mind the Media Player feature is still in early development and is not quite production ready, so you may experience some undesired results.

The documentation’s page for Media Framework can be found at the link provided. It gives you some helpful information on the current status of this feature as well as ways to implement it into your game.

Media Framework Documentation

Audio Media Asset Information

If you have exhausted all of your options, and still are unable to get the sound working for your Media Player Asset, let me know and we can investigate further.

Cheers,

Tnx for answer. As I said earlier - it works fine when I am playing in editor. Issue hapens only with cooked build

I can confirm that audio only works in the editor, it does not work after the projects gets built. Is it possible to provide a timeline for a bugfix?

AndrewHurley, did you try to build shipping project and test audio there?

Hi Andrew,

Any hint about where we should look to fix this?

The solution involves some C++.

MediaSoundWave.h :

Under “virtual void Serialize( FArchive& Ar ) override;”, add this declaration:

virtual void PostLoad() override;

In MediaSoundWave.cpp, add the function:

void UMediaSoundWave::PostLoad()
{
InitializeTrack();
Super::PostLoad();
}

And modifiy also HandleMediaPlayerMediaChanged, at the end of the file:

void UMediaSoundWave::HandleMediaPlayerMediaChanged()
{
PostLoad();
}

Hope this help,

Thanks 3dids, we fixed this in the Master branch. Our fix is similar. It did not make it into 4.7, but it will be in 4.8:

void UMediaSoundWave::PostLoad()
{
	Super::PostLoad();

	if (!HasAnyFlags(RF_ClassDefaultObject) && !GIsBuildMachine)
	{
		InitializeTrack();
	}
}


void UMediaSoundWave::HandleMediaPlayerMediaChanged()
{
	InitializeTrack();
}

This will also fix the cooking of media sound waves in packaged builds.

It is great.
After add the code ,my sound is ok now. Btw,the version of ue is 4.7.3.

Sorry for bumping this post, but I am facing a similar problem in 4.10.2 build, this piece of code is already present in this build and I can’t find any other solution. I have tried working with different format files, but to no success. In the end I am currently splitting my file into a video file and an audio file and triggering them together, but this causes sync issues. Any Suggestions on what I should do to get the Media Sound Wave working in packaged build?

P.S. Everything works fine in the editor.

Hey all,

This issue is still occurring in all major releases and still being investigated. It has been backlogged as of late, and the bug number associated with the issue is UE-12185. I have increased community interest on the report to get a more traction on the issue, but currently resources are dedicated elsewhere.

Once it has been addressed and officially fixed, it will be integrated into a major full release or hotfix. We will then update the release notes to reflect the integration and add it to the list of known and fixed issues. This is why I have provided the bug number so you can search to see if the issue has been fixed within the relative release.

Cheers,

Hi,

Would like to express interest in seeing a fix for this, we’re also seeing the issue in shipping builds for 4.10.

Thanks :slight_smile:

We’re working on a fix right now. Won’t be in until 4.12 though.

Cool good to know! Thanks for the update.

Can confirm this issue is still present, the audio file is working in the editor but not in the packaged build. 32 and 64bit

Please see Max P. comment below my answer. He responds and says this is expected to be fixed in 4.12.

Thanks,

I just installed 14.12 to check if the issue was fixed but now the audio won’t play even in the editor. It works in the editor at least in 14.10 release.

This issue is still marked as unresolved. Once the issue has been addressed by our engineers, the fix will be added to the release notes for fixed issues within an upcoming full engine or hotfix release.

Let me know if you have further questions or need additional assistance.

Thanks,

I’m currently on 4.13.2 and the issue still remains. I tried the fix posted by gmpreussner here but InitializeTrack() doesn’t seem to exist anymore. Is there another workaround that I can use?

The issue has moved to a Backlogged state currently. You can see this by going to the link I have updated in my answer.

I can inquire as to to the workaround and see if we can figure out an alternative solution.

Thank you,