Follow

GENVID: Why is my video stream upside down?

Question

Why is my video stream upside down? 

Answer

Unity uses DirectX11 to render, but uses the OpenGL convention for the Texture coordinate. 

OpenGL uses the convention: 

  • [0, 0] Bottom / Left
  • [1, 1] Top / Right 

DirectX uses the convention: 

  • [0, 0] Top / Left
  • [1, 1] Bottom / Right 

We corrected this issue in the Genvid prefab. However, if your stream video displays upside-down, use the SetParameter(Object,String,Int32) Genvid SDK function with the video.useopenglconvention parameter to flip it: 

GenvidSDK.SetParameter(m_StreamName, "video.useopenglconvention", 1) 

(The “1” toggles flipping the video.) 

Why am I getting a "directory name is invalid" error when I run `py unity.py build` or `py unity.py prepare`? 

The unity.py script uses the same folder-architecture as the Genvid SDK Unity sample. 

  • /app for the game project (which normally contains your Assets and ProjectSettings folders). 
  • /package for the package (which is the folder containing the Genvid package). 
  • /web for the website (which is the location where your website is for your project). You can simply copy the folder available after installing the Genvid SDK inside the Unity sample folder. 
  • /config for the config files (which contains the .json and .hcl files needed for your configuration). 
  • /templates for the template files which are normally divided into cloud and local folders afterwards. Each folder contains their .tmpl (template) files. 

Note that for your first integration, we recommend to copy the package, web, config, and template folders if you want to re-use the unity.py script. 

If you'd like to use the script, but don't want to restructure your project: 

  • Open your project and go to Assets > Import Package > Custom Package. 
  • Select the Genvid Package to install in your project (located in samples\unity\package\genvid.unitypackage). 

You can also manually build your application from Unity, rather than use the script. 

Related Information

Genvid Contact Form

Genvid SDK Documentation

Genvid Forum

Genvid SDK Glossary

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.