Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Dolby.io Virtual World Media Injection demo built with C++ SDK

License

Notifications You must be signed in to change notification settings

voxeet/comms-cpp-injection-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚠️ This repository is no longer maintained ⚠️

CodeQL for C++CodeQL for Python

Communications API C++ SDK Media Injection Demo

A cross-platform native application utilizing the Dolby.io C++SDK and MultimediaStreaming Plugins to inject media from file into Dolby.io conferences. The application makes use of the Media Source File sample library available in the SDK package to read audio and video from file and inject the content into the conference. Please note in the documentation the containers and formats supported by the sample library.

Perfect for showcasing the Dolby.io Spatial Audio features for Virtual World scenarios. The applications enables users to test out their Virtual World experiences created for instance with our Unity and Unreal plugins by injecting bots with audio and/or video around the scene.

Currently uses the 2.4.2 release of the C++SDK.

Prerequisites

All sytems:

  • CMake 3.23
  • Python 3
    • requests module (pip3 install requests)
  • A Dolby.io account and access to the Dolby.io dashboard

macOS:

  • macOS 10.15+
  • Clang

Windows:

Linux:

Supported platforms

This project relies on the Dolby.io Communications API C++ SDK, see this link for supported platforms.

Building

Before you can build you must clone this repo and go inside:

git clone [email protected]:dolbyio-samples/comms-cpp-injection-demo.git 
cd comms-cpp-injection-demo

To build on macOS or Linux in terminal execute:

bash setup/unix.sh

To build on Windows in Command Prompt execute:

setup\windows.bat

Getting Started

The demo.py script will scan the injection-input.json file to determine which conversations it will inject into the conference. Based on the content of the injection-input.json, the demo.py script will take conversations in m4a or mp4 format from the respective folder and inject them at locations/rotations specified in the def.json files in the conversation folders.

The default spatial environment for the spatial scene is also parsed from the injection-input.json file. If you decide to change these values, please ensure your environment is in sync with the spatial settings of other clients joining the same conference.

The video codec to be used when creating the conference is read from the injection-input.json file. If this injection instance is the first client to create the conference with given alias this video codec will be used for the conference. If the conference already exists the codec has already been set. The default in the file has been set to VP8.

Now to inject media into the conference execute the demo.py script:

cd build/
python3 demo.py 

On MacOS/Windows the application will just run in terminal so entering q on command line will exit. Remember that each injector is running in its own process so you will have to q+enter for each spawned injector instance.

When running on Ubuntu the process will run as daemon and is to be stopped using the python script:

python3 demo.py -stop yes

Access Token

A Client Access Token is required to connect to the Dolby.io platform. The demo.py script will scan the injection-input.json file and look for either the token_server_url field to find a url where it can fetch the token from; or the client_access_token field to find a token which is hardcoded into the file. The former takes precedent. The python script then passes the token as a command line parameter when running the cpp-injection-demo binary.

Open Project IDE

QtCreator (macOS/Ubuntu)

  • After building with setup/unix.sh
  • Open QtCreator
  • Go to top bar settings and select QtCreator -> Open File or Project... and select the top level CMakeLists.txt file (cpp-injection-demo/CMakeLists.txt)
  • Create the project for x86_64 (or arm64 on macOS)

Visual Studio (Windows)

  • After building with setup\windows.bat navigate to build/ directory
  • Double-click on cpp_injection_demo.sln in the build/ directory

About

Dolby.io Virtual World Media Injection demo built with C++ SDK

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •