Genvid Ingest sample¶
The Genvid Ingest sample shows you how to add an RTMP Ingest server in your project using gvencode, which allows you to work with an external A/V source.
Note that you can only add audio and video streams to the composition. The Ingest server can’t receive data streams or notifications, nor can it send commands or events.
Note
Changing the video resolution while streaming is not supported.
For this sample, we will start with the Genvid Studio sample and we will replace the second instance of the DirectX Cube Sample Integration sample with the Ingest server and a local instance of OBS Studio (version 20 or later) to connect to it, providing us a second source for a webcam, for example.
Configure the Cluster¶
Follow the Genvid Studio sample instructions to start all the services.
Verify everything works correctly.
Load the Ingest configuration:
py ingest.py load
Use the Cluster UI to verify that the Ingest job is present.
Click the Start All button to restart the services.
Wait for the Ingest link to turn blue.
Right click the Ingest link and select Copy link address.
You’ll need the link address to configure OBS.
Configure OBS Studio¶
Download and install OBS Studio.
Configure it and select the scene you want to stream.
Select the Advanced Parameters panel in Settings.
Verify your video color format is
NV12
,I420
, orI444
.Recommended:
NV12
Verify your video color space is
601
or709
.Recommended:
601
Verify your video color range is
Partial
orFull
.Recommended:
Partial
Select the Stream Parameters panel in Settings.
Select Custom Streaming Server.
Paste the URL you copied from the Cluster UI.
It should start with
rtmp://
.Important
If your browser added
unsafe-
to the address, delete it from the URL.Verify your video settings match those of the output.
The DirectX sample defaults to
1280x720 @ 30 FPS
.
Now you can start streaming.
Composing the stream¶
Go back to Cluster UI
and click the Studio
link. Your stream is now the
second source. See The Studio website for information on working with
your broadcast stream.
Script reference¶
Ingest sample script
usage: ingest.py [-h] [--loglevel {DEBUG,INFO,WARNING,ERROR}]
[--logformat LOGFORMAT] [-c CLUSTER_ID]
{unload,env,load} ...
Positional Arguments¶
command | Possible choices: unload, env, load |
Named Arguments¶
--loglevel | Possible choices: DEBUG, INFO, WARNING, ERROR Set the script log level |
--logformat | Set the script log format |
-c, --cluster_id | |
The cluster id. If not set with the command line, uses the environment variable GENVID_CLUSTER_ID if it exists. Otherwise defaults to ‘local’ Default: “local” |
Streams timing¶
This section covers the timing of audio / video streams when several sources are involved in a production.
The following figure shows the deployment of a production with a first source that shows the game and a second source that contains the audio and video of a commentator. The second source can be used in PIP, voice-over, or as is. This diagram also shows that a director makes the realization of the diffusion with the Genvid Studio.
Any processing on a stream results in a delay on the stream. This delay is mainly due to the encoding, decoding, and transmission of streams. The typical delay between the gamer and the director is about 15 frames or 0.5 seconds. The delay between the commentator and the director is about 3 seconds.
You can adjust the delay using the controls in the Sources section of the Studio website