Millicast video streaming
Last updated
Last updated
In Review - feature maturity not classified, documentation in progress and likely to change
Millicast is a third-party streaming solution offered by Dolby.io which is an e2e solution for recording, encoding and showing live video streams in the experience.
Follow the steps here to get a video feed running in-game.
This is presented as example usage but is not officially supported by MSquared. Please consider this as highly experimental. We advise you to strongly consider if this is appropriate for your project before implementing more than one Millicast Stream.
Your Stream Name and Account Id can be found on Dolby.io
Stream Url should be set to: https://director.millicast.com/api/director/subscribe
Example:
If you’re using BPM_VideoPlayer instead, you may have to check your screen controls and make sure the “Millicast” option is selected.
Note - When streaming, you have to select either vp8 or vp9 codec. h264 is not supported by Unreal.
The main parameters regarding performance are:
Video and Audio Bitrate will determine the amount of data per second which will be transferred to the client.
Note that bitrate numbers are Not an exact science, and the server will internally modulate this number to better fit the connection, so the resulting bitrate can be much higher than that. What we know is that those numbers will still influence the stream in some way. More of this in recommended settings.
Encoder is usually never changed. Has to be noted that using H264 currently has problems with Millicast for Unreal.
Encoder Preset can change the how quick the image gets encoded/decoded in expense of image quality.
Output (Scaled) Resolution is the important one as it is the resolution the client will receive, scaled from the initial input.
Downscale Filter states how precise the scaled image will be when generated. Unless specific needs, a Bicubic should be fine.
Common FPS Values are the target frames per second the server will send to the clients. There is currently no point to go higher than 30 as the game instances we use are capped at 30 FPS. Also to note that this parameter highly influences performance.
The following values are to be taken as an example, and to consider if the hardware to support is down to the level of a G6_Half or lower budget.
NOTE: We officially support up to 2 streams with below settings. Running more than two is possible but we cannot ensure optimal performance. Going above performance guidelines can cause lower hardware clients to run slower and provide a below optimal experience.
Having multiple screens in the scene will add little performance loss. Most of Millicast performance cost is given by each data stream.
Other than the supported hardware, will depend on how many streams are intended to be used. Only the most influential parameters are named, the rest is at user choice:
Budget for pixels: as many as a resolution of 1920x1080
Budget for video bitrate: 4000
Common FPS Values: 30 or lower
Output (Scaled) Resolution: 1920x1080
Video Bitrate: 4000
Audio Bitrate: 192
Common FPS Values: 30
Output (Scaled) Resolution: 1280x720
Video Bitrate: 2000
Audio Bitrate: 192
Common FPS Values: 30
From a non-shipping client build it is possible to print the stats for the current active Millicast streams in the scene by using the command:
M2.Millicast.PrintStreamsStats
which, for each active stream, will print the following info:
Q: I want to stream pre-recorded video, should I use millicast?
A: No, please use the lightweight Streaming Video Player instead.
Q: I have added multiple Millicast screens and the performance is poor, what should I do?
A: Performance will decrease with each additional video played in your world. Please re-consider if multiple Millicast Screens is an appropriate solution to your problem.