Giter Club home page Giter Club logo

immersivevideo's Introduction

360 Video with Spatial Audio

A basic 360 video player with support for audio and recentering

Documentation

This project uses the Skybox as the surface for playing a 360 video stored in the VideoClips folder.

The SkyboxPlayer has both a Video Player and an Audio Source attached to it as well as a script called 'Audio Sync'.

The Video Player is rendering the video clip 'empathy' to the VideoMaterial. This material uses the Skybox shader in order to display on the skybox. This material also uses a basic texture called VideoMaterialTexture with the same dimensions as the video to prevent scaling/shearing.

The Audio Source uses the audio from the video file as its Audio Clip. It also using the Oculus Spatializer to make full use of spatial audio.

The 'Audio Sync' script prepares the video file and adds an offset between playing the video and audio clips so that they are synced correctly.

There is a 'Recenter' script attached to the OVRCameraRig, under VRTKSDK > OculusSDK. This recenter script checks to see if the player is holding the index trigger or A button on the right controller for at least 3 seconds and responds by recentering the scene.

Steps to add a new video clip

  1. Add the video file to the VideoClips folder. (Audio Optional) Add the audio file to the AudioClips folder.
  2. Change the VideoMaterialTexture size to match the video file dimensions.
  3. Adjust the VideoMaterial to use the correct 3d layout, Select Over Under or Side by Side, depending on stereoscopic format. Use None if the video is not stereoscopic.
  4. Drag and drop the video file into the SkyboxPlayer object's Video Player component 'Video Clip' attribute.
  5. (Audio Optional) Drag and drop the audio file into the SkyboxPlayer object's Audio Source component 'AudioClip' attribute.

Improvements

At the moment, it is necessary to create a separate audio file from the video file so as to use the 3d sound settings of the Audio Source component. In the future, it would be ideal to automate this and pull the audio directly from the video file.

License

Code released under the MIT License.

Any Third Party Licenses can be viewed in THIRD_PARTY_NOTICES.md.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.