Log in or register to post comments

White Frames when Video starts to Play

March 15, 2019 - 10:21am #1

Hi there,

in my testproject, a video with an alpha channel (webM - transcoded in Unity to VP8) and material "mobile/particles/alpha blended" starts to play as soon as the image target has been found. But the first frames of the video are always white after the tracker has been found. Searching the forums, i found older threads (2014/15) with similar problems, but i could not find a solution for my purpose. Could somebody help me with this issue.

Thanks in advance,

chrispi

White Frames when Video starts to Play

December 3, 2020 - 7:43am #9

Hi @sharonj731,

Yes, unfortunately with the move to PackageManager this is not possible anymore.

However, please note that you can still inherit from the class.

Hope it helps.

Vuforia Engine Support

White Frames when Video starts to Play

November 27, 2020 - 5:17pm #8

Now, 7 years later, you can't edit the DefaultTrackableEventHandler because it gets overwritten every time you close and re-open Unity.  Have to do this in the inspector.

White Frames when Video starts to Play

November 27, 2020 - 4:48pm #7

THE FOLLOWING WORKS FOR GETTING RID OF WHITE VIDEO PLANE FLASH AT BEGINNING OF PLAYBACK:

I'm using Vuforia 9.3.3 with Unity 2019.3.Of6 and the following works:

I'm using WebM video file with transparency, VP8 Codec.  

 

If you update the DefaultTrackableEventHandler, it NOW gets defaulted back to the original code every time you close and re-open Unity!!!

Therefore, you need to select settings in the ImageTarget's Inspector as follows....  (SEE ATTACHED IMAGE):

On the ImageTarget in the Inspector I set the DefaultTrackableEventHandler settings to:

 

Consider target as visible if it's status is: TRACKED

Event Handler:

OnTargetFound: (1 event)

Runtime Only / Video_plane / VideoPlayer.Play

 

OnTargetLost (3 events)

Runtime Only / Video_plane / VideoPlayer Stop

Runtime Only / Video_plane / VideoPlayer Play

Runtime Only / Video_plane / VideoPlayer Pause

This got rid of the white flash of the blank of the video plane at beginning of video playback in the scene.

OnTargetLost appears to apply to before the target is ever found.

AttachmentSize
Image icon image.JPG39.56 KB

White Frames when Video starts to Play

October 24, 2019 - 3:50pm #6

Just tweak the materialVideo.

In the shader (unlit transparent) select a totally transparent texture (I made a little texture...png with 16 x 16 pixels);

So Before first frame loads there is no white or black flash.

White Frames when Video starts to Play

October 23, 2019 - 8:12pm #5

Easy solution is to play and pause the video on the Start method, then play it again on marker detected.

White Frames when Video starts to Play

March 18, 2019 - 5:16pm #4

Hey guys! I found myself stocked in the same problem! now everything works fine with tracking and the transparent video+audio, but the first frame is White!

I am using a h264 codec with a luma mask side, cause it is quite impossible to use other codecs, have transparency and avoid big data. But what kind of other codecs do you suggest for?

 

And I tried to paste the snippets in my shader but it is not working, I can't start my PlayMode. I think I don't get the right spot, would be cool to get some help from some masters in the field!

 

Cheers

G51R 

White Frames when Video starts to Play

March 18, 2019 - 5:16pm #3

Hey guys! I found myself stocked in the same problem! now everything works fine with tracking and the transparent video+audio, but the first frame is White!

I am using a h264 codec with a luma mask side, cause it is quite impossible to use other codecs, have transparency and avoid big data. But what kind of other codecs do you suggest for?

 

And I tried to paste the snippets in my shader but it is not working, I can't start my PlayMode. I think I don't get the right spot, would be cool to get some help from some masters in the field!

 

Cheers

G51R 

White Frames when Video starts to Play

March 16, 2019 - 10:46am #2

Try something like this if you arn't already.   Using this or trying a different codec (if possible and depending on platform) usually works for me.  Maybe also try hiding things until the prepareCompleted.

videoPlayer.prepareCompleted += PrepareCompleted;

void PrepareCompleted(VideoPlayer vp) { vp.Play(); }



 

Log in or register to post comments