Crash on video play with electra player plugin enabled

Ever since i upgraded to 5.4, when a video plays the engine crashes
here is the crash report:

UECC-Windows-13396B1D41AFE7550831248AD2F728F0_0001.rar (220.4 KB)

Hi,
I faced same issue and maybe found a solution.
In your log, it is saying : Unexpected MPEG color primaries value!
I’ve re-encode with handbrake and a different codec and worked for me, here are the settings i’ve used

CODEC : H.264 (NVEnc) file in .mp4 format
Color Space : BT.709 → you’ll find this in the filter tab and this is probably the thing that solve the mpeg color primaies value issue.

Tell me if it worked for you and apply solved if it’s ok
Thanks

1 Like

Just had the same error with Unreal Engine 5.4 and exported project.

The file is in MP4 codec, other MP4 play fine.
Need ElectraPlayer to play *.mpd files.

The code

#include "HAL/Platform.h"
#include "ColorManagementDefines.h"

namespace ElectraColorimetryUtils
{
	static constexpr uint8 DefaultMPEGColorPrimaries = 1;
	static constexpr uint8 DefaultMPEGMatrixCoefficients = 1;
	static constexpr uint8 DefaultMPEGTransferCharacteristics = 1;

	UE::Color::EColorSpace TranslateMPEGColorPrimaries(uint8 InPrimaries)
	{
		switch (InPrimaries)
		{
			case 1:				// Rec709
			case 2:				// unknown
				return UE::Color::EColorSpace::sRGB;
			case 9:				// Rec2020
				return UE::Color::EColorSpace::Rec2020;
			default:
				check(!"Unexpected MPEG color primaries value!");
		}
		return UE::Color::EColorSpace::sRGB;

Submitted an Error Report

Thank you very much. Your solution works!

This Fixed things for me as well. Cheers mate.

This isnt a fix… the colours of the video are touched (washed out) can someone confirm if on 5.6 it works.
This isnt a fix… the colours of the video are touched (washed out) can someone confirm if on 5.6 it works.

Edit: I found the solution. in HandBrake colorspace custom put primaries=bt709:transfer=bt709:matrix=bt709:range=limited

Why my video are washed out after hb? i did a test video with sharex and it use bt.601 by default
Why another video are saturated after hb? a double transform using bt.709

For both cases it Works!!. keeps the video color intact.