Local Environment Usage

This section explains the main usage of the genvid-sdk tool. Be sure to have it installed in your PATH as explained in Installation of the Toolbox. To illustrate our example, we are using a sample DirectX11 application integrated with a Node.js website written in TypeScript, providing both the backend and client side of the web site integration. You can find more details on the sample as well as other integration examples under our Samples section.

Initializing the local cluster

To initialize the local cluster, we need to load the sdk configuration. Do the following commands.

genvid-sdk clean-config # Make sure the configuration is clean
genvid-sdk load-config-sdk

Building the tutorial

To build the tutorial sample, simply go to the sample/tutorial folder and execute the tutorial.py script like this:

py tutorial.py build

This will build both the tutorial application and the web site. This command can be used to build only the game or web site by adding the argument game or web.

Loading the tutorial

The sample configuration needs to be loaded.

py tutorial.py load

Starting the tutorial

You can now start your application:

genvid-sdk start

The start command can be used to launch the jobs separately:

  • services
  • web
  • game

Using services will start all of the services needed for proper communication between the game and the web page, including the encoder. Using web launches the web server to allow the web page to be displayed properly with the tutorial application video stream. Finally, game launches the native DirectX application. Note that services must be launched prior to launching the game.

Viewing the tutorial

To be able to see the webpage with the content, you just need to call:

genvid-sdk open web

This will open a webpage accessing the local sample web server.

If you are using the standalone streaming feature, for now, you will need Chrome 59+ to be able to read the stream.

Stopping the tutorial

To stop the tutorial, you need to use the command:

genvid-sdk stop

The stop command can be used to stop services separately, by specifying web, game or services (just like start does).