This is an old revision of the document!
Using Live Video in Blocks
Blocks 2.1 adds a a Live Video block type, which can be used along with compatible players to integrate live video.
To use live video:
- Create a root block based on, e.g., a Composition.
- Add a Live Video child block.
- Chose the desired stream type.
- Specify the URL to the camera/streaming box.
Live Video Formats
The following formats are supported:
- HLS stream: Compatible with most players. Supports audio. Delay is several seconds. Supported by some streaming boxes and services.
- MJPEG stream. Compatible with most players. No audio. Low delay. Supported by many video cameras.
- JPEG polling. Compatible with all players. No audio. Low delay. Supported by some video cameras.
- RTSP stream. Compatible with few players. Supports audio. Moderate delay. Supported by most video cameras and streaming boxes.
As you can see, there are pros and cons with the various formats, and it is sometimes not straightforward to find the ideal combination for a given source device and player combination.
HLS Stream
HLS is generally a good format as far as players are concerned, with good quality and scalability, and audio support. In some applications, the rather long delay (often several seconds) associated with this format may be problematic. Finally, support for HLS is rather limited on cameras and streaming boxes.
The AJA HELO is one hardware option for bringing HLS into a Blocks system.
It accepts SDI, HDMI and analog audio as inputs (with passthrough), and converts it to various streaming formats, with the option of simultaneous recording of the stream to a memory card. More on HLS streaming and the Helo device below.
MJPEG Stream
This format is also supported by many players, and is commonly supported by cameras as well. It typically has very low delay, but doesn't support audio. Some cameras may protect the MJPEG url with authentication, which then needs to be disabled for Blocks to access the stream.
JPEG Polling
This format has many similarities with MJPEG in that it has low delay, good player compatibility and no audio. It incurs a higher overhead, in that each image is fetched separately. This may also occasionally result in dropped frames.
It is supported by some network cameras, such as the Unifi line of cameras (which do not support MJPEG). Like MJPEG, you may need to disable any authentication in the camera for Blocks to be able to read the URL.
RTSP Stream
This format is supported by most cameras. Depending on the encoding, delay may be short to moderate (seconds). Player support, however, is very limited. As of this writing, only the Brightsign range of players support this format natively (verified with a Brightsign XD2 player with firmware version 6.2.147).
HLS Streaming Options
HLS is one of the oldest, and best supported, web streaming formats. It's compatible with pretty much all players, has very scalable performance, full frame rate and includes audio. The downside, as mentioned above, is that the propagation delay through the complete chain can be significant – often in the range of 3 to 10 seconds. However, for many applications, this may still be quite acceptable, and then HLS is a good choice.
AJA Helo
Due to its self-contained design and wide signal compatibility, the AHA Helo interface is an attractive option for bringing video onto a network in a way that can be used by Blocks. HLS support was added in Helo version 2.1. Make sure your device has at least this version. If not, upgrade it by downloading new firmware from AJA.
Using the web interface for the Helo, configure it as shown below. Chose the desired input type (HDMI or SDI). Audio can optionally be sourced through an analog 3.5 mm jack. Make sure "Power Up State" is set to "Stream", so the streaming function will be restarted automatically if the device loses power. Set other options as desired.
Then set the Streaming profile like what's shown below, paying specific attention to the "Stream Type" setting. Reducing the "i-Frame [GOP] Every" setting to a shorter value than the default, such as 25 frames, speeds up the initial start of the stream. To access this setting, you must first set "Advanced Settings" to "Show".
Once all settings are set, click the green streaming button at the top to start the stream. Chose the Status page to see the "Stream URL" under which the stream is provided.
Copy the "Stream URL", and paste it into a Live Video block in Blocks, and make sure the stream type is set to HLS.
Online Streaming Services
For streams sourced from (or available to) the Internet, there are a number of online streaming services that can provide stream distribution and conversion into a wide variety of formats. Here are some examples:
Software-based Stream Conversion
In some cases, the viewo you want to show is already on the network, but in a format that can't be firectly used by Blocks, such as RTSP or NDI. Such formats can often be converted using software based solutions, such as ffmpeg. Contact PIXILAB for durther information on how this can be done, including information on your server environment and detailed information about the source stream.
If you want to learn more about video streaming in general Wikipedia has an excellent article, as usual.