RenderHeads / UnityPlugin-AVProVideo

AVPro Video is a multi-platform Unity plugin for advanced video playback
https://www.renderheads.com/products/avpro-video/
235 stars 28 forks source link

Black screen on first frame. #261

Closed SylvaDevas closed 4 years ago

SylvaDevas commented 4 years ago

Hello, I plan to use AVPro but for now, I'm still on the AVPro Trial version.

The problem is: When we go to another scene with a video on Background, the first frame of this scene will be a black square. Then the video launch. I can change this texture with the "Default texture" on the Mesh, but even if I put there a Jpg of the first frame of the video, it will not scale properly.

Is it normal? Can I build my game with AVPro or will I always have this little black scare of 1 frame each time I load a new scene? The Disable Debug GUI doesn't do much, even on build mode. (If it's the right option...)

Also, I would like to know if it's possible to see the preview of the video in the "Game" window of the editor. I only see a black screen with your logo.

Thanks for helping. Sylvain

MorrisRH commented 4 years ago

Hey! Could we get a little more information from you: What platform is this for? What version of Unity are you using? What version of AVPro Video are you using?

SylvaDevas commented 4 years ago

Hello, Unity version 2019.3.0f5 AVProVideo 1.10.1

I bought the software a few days ago.

When I apply a Default texture to the video player (apply to Mech), this texture appears "burn" for one frame at least, when I launch the scene. This texture allows previewing the first image of the video in the editor so it's very useful. I could try a little fade at the beginning of each scene.

Another problem is concerning me. I would like to use a light on the Video to bring effects. But the two Lit elements of AVpro appear pink. The shaders are in the Shaders folder, but they are not effective in reality. A screenshot can show you this issue.

If you can answer the last question it could be great: Is it possible to implement an AVPro texture in the shader Graph of unity? With the normal video player of Unity it's possible to apply a video texture directly in the shader graph. With this technique, it's possible to "dissolve" the video with effects. I don't see this possibility with AVPro. Did I miss something?

Thanks for advice ! Sylvain

Le lun. 17 févr. 2020 à 14:09, Morris Butler notifications@github.com a écrit :

Hey! Could we get a little more information from you: What platform is this for? What version of Unity are you using? What version of AVPro Video are you using?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues/261?email_source=notifications&email_token=AOPNMC5OV3OTKA3AOSS37XDRDKEBTA5CNFSM4KQ4NTA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEL6LFIY#issuecomment-586986147, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOPNMC7DME53RSLQPL5UCEDRDKEBTANCNFSM4KQ4NTAQ .

Ste-RH commented 4 years ago

As Morris has already asked. What platform is this for?

SylvaDevas commented 4 years ago

Hello, Late reply, I come back to the project now.

It's for all platforms if possible. PC, Mac, and Android at least...

Could you help me?

And I have now another question. I try to optimize my workflow with another external asset called Adventure creator. It seems their is a conflict with your app.

I ask the dev, and he is willing to resolve the problem, but he needs some technical details. Please follow this conversation: https://www.adventurecreator.org/forum/discussion/10012/just-installed-need-to-fix-some-bugs#latest

Best regards, Sylvain

Le mar. 10 mars 2020 à 16:45, Ste Butcher notifications@github.com a écrit :

As Morris has already asked. What platform is this for?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues/261?email_source=notifications&email_token=AOPNMC34HWHKOT3EFNQF6TLRGZODBA5CNFSM4KQ4NTA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOL6XJI#issuecomment-597158821, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOPNMC7O3FC6MJDTRSAWQR3RGZODBANCNFSM4KQ4NTAQ .

AndrewRH commented 4 years ago

Hi SylvaDevas,

It's normal for the video to takes a few frames to load as it is loaded in the background. You could perhaps set the default texture to a 100% transparency texture so that nothing is visible until the video has finished loading?

Otherwise you could also listen for the video events, and hide the mesh/UI display element until the video has it's first frame. You could also make scene loading only progress (remove loading screen, or fade from black etc) once the first frame of the video is available.

As for seeing the preview of the video in the Game window. That should always work. I'm not sure why you're not seeing it? It should be viaible in the Scene and Game windows, and also in the Preview panel of the MediaPlayer component.

As for your issue with Adventure Creator - we do not have any class or struct etc named VideoClip. I also can't see anything from your screenshot that indicates it's an issue with our plugin..

As for your question about the Lit shader - they shouldn't be pink. Are you perhaps using HDRP or UWP? In which case you need to use the Unity > Edit option to convert shaders. Our lit shaders are not compatible with HDRP/UWP though, only our unlit ones.

As for the shader graph - yes this should be possible but not something we have tested yet. I know in the VFX graph it is possible via a bit of scripting, eg:

image

Here a custom Texture field is added with the "Exposed" option enabled.

Then it's possible to set that via script:

image

In our case you would pass through the texture from mediaPlayer.TextureProducer.GetTexture(); This will not work in all cases/platforms, because sometimes our textures are not in the final RGBA state, and need to have some modifications done to them (hence why we include our own shaders with the package).

I'm afraid I can't answer specifically for Shader Graph as this is not something we support yet.

I hope that helps to answer your questions. Please in future keep each Issue posted to a single issue. If you have multiple issues please post multiple threads so we can keep track of them and answer them better. Thanks,

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 4 years ago

This issue has been automatically closed because it has not had recent activity. If you wish to continue this issue, then please create a new issue as we do not monitor closed issues.

ostepanenko69 commented 3 years ago

Having the same issue in AVPro Video 1.x (Windows) 1.11.7

Ste-RH commented 3 years ago

If none of the support provided in this issue helps you @ostepanenko69, can you please open a new issue and provide all the information asked for when creating an issue.