videoplayer flahes red while playing.

Hi,

I have a videoplayer which plays a video on a raw image using a render texture. The problem is that when I build the game and the video is playing the screen flashes red for whatever reason. IN the editor everything works fine…

Did anybody have this problem before and knows a solution?

thanks :slight_smile:

same here… did you tried export? sometimes works

what do you mean by export? Export what to where?

Anyone got an idea?

So far I tried multiple VideoClips with .mov and .mp4 files, 1080p and 4k resolution and different sizes/resolutions of the Render Texture and the RawImage. When my game runs at 720p or below it works fine, 1080p rarely but sometimes works correctly and every resolution higher than 1080p doesn’t work at all. The videos stutter, during stuttering the whole screen flashes red and sometimes the video seems to be playing at a slower speed than normal…

Really hope someone has an Idea…

Same issue here… not sure how to resolve this

I also have this issue.

I am having a similar issue. However, it only occurs on my new MBP 2018 and not on my older MBP. Same unity version 2017.3.0f3. If I play in editor or build for macOS, I get the red flashing during video playback.

Would upgrading to unity 2018 solve this issue?

After messing around, if I disable Metal Editor Support on my MBP 2018 the editor plays the video correctly.

I hope this helps everyone else.

If anybody still needs a fix for this: For me it helped to enable VSync in the Quality Settings. For me it limits the game to 30FPS (I think that is half of what my monitor can display) but it gets rid of the red flashes and flickering. If you don’t want the 30FPS limit you can just enable VSync via script when the video plays and disable it again when it ended.

I start my videos using a button so it would be just something like this:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Video;

public class MovieController : MonoBehaviour
{
    public VideoPlayer MyVideo;

    public void StartMyVideo ()
    {
        MyVideo.gameObject.SetActive (true);
        QualitySettings.vSyncCount = 2;
    }
}

and to stop it something like this

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Video;

public class StopVideo : MonoBehaviour
{
    public VideoPlayer MyVideo;

    public void StopMyVideo()
    {
        MyVideo.gameObject.SetActive (false);
        QualitySettings.vSyncCount = 0;
    }
}

I am having this problem in 2018.3.10f1. Tried all of the vsync settings, as well as turning off Metal and always get a red flash right as the video plays. Any help would be appreciated!

I got the solution just change your render texture colour format to R16B16G16A16_SFLOAT or anyone which have RGB values because now a days colour have RGB values but render texture is set to R or RG by default.