5.1.1. Release notes for v0.14
About release 0.14
The main features of this SDK release include:
Text overlay now supports the ability to set the text while the feed is playing.
Some previously deprecated features have now been removed (see below for details).
Improvements to the demo application to demonstrate the new features and options available.
The default mixing of local-recorded audio feeds has changed, and a new more flexible overload of the createRecordingFeed method has been added to allow applications to specify which audio feeds to mix into which audio tracks in the output files.
Media server session receiving latency improvements in CPU-constrained scenarios.
Experimental features:
Wayland desktop capture via Pipewire has been added.
Queue tuning diagnostics can be enabled from the application.
Stats logging for SRT and WebRTC elements can be requested for a feed.
Release archive changes:
Pre-built sample application binaries are now included in the release archive.
The SDK now includes a shared library (
.so) as well as the static library (.a).The static library is now built as position-independent code (PIC), allowing it to be used in dependent shared libraries.
Documentation updates:
A new Getting started section has been added to the documentation, which provides an overview of the SDK and how to get started with it.
Additional information on building and running SDK-based applications within docker containers has been added; see Docker environment.
Release archives now contain example Dockerfiles and scripts in
samples/environment/docker.
Bug fixes:
Several improvements to video stages when using them in different combinations and orders. Previously certain orders and combinations could cause visual artefacts or conflicts.
Fixes to some previously noted issues with the privacy mode.
A bug has been fixed that could cause Gstreamer bus message queue overruns during peer sessions.
A bug has been fixed that could cause media sessions to drop media feeds and disconnect, due to a too-long keep-alive interval.
Several improvements have been made to reduce latency and dropped buffers in both peer and session streaming.
Other changes:
The length of the encryption key used for peer streaming has been increased to 256 bits.
NOTE: This release introduces some breaking changes, please see the notes below.
5.1.1.1. v0.14.3
Bug fixes
Bug fix: Bus message queue overruns
A bug has been fixed that could cause Gstreamer bus message queue overruns during peer sessions. This was previously resulting in the following warning message being logged:
[WARNING] [GStreamer:GST_BUS (no description): queue overflows with 2048 messages. Application is too slow or is not handling messages. Please add a message handler, otherwise the queue will grow infinitely.
Bug fix: Intermittent media session keep-alive issue
A bug has been fixed that could cause media sessions to drop media feeds and disconnect, due to a too-long keep-alive interval.
Bug fix: latency improvements
Several issues affecting both peer and session stream latency have been addressed, including timing misconfiguration and the maximum sizes of some queues. This should also reduce the frequency of both video and audio buffers being dropped, as well as improve latency recovery times after connection issues during peer streaming.
Release contents changes
Changes to included samples
SDK release archives now include pre-built sample application binaries, as well as the source and CMake files. This allows you to run the samples without needing to build them. See Included samples for details on how to run the samples.
Prior releases included 3 relatively complex sample application, demonstrating media sessions, simplex peer sessions and duplex peer sessions.
The media session sample has been split into many smaller samples, each demonstrating a specific
feature of the SDK. The complex media session sample is still included, but is now named
complete and is intended to be a reference for integrating many of the SDK features into your
own application. See Included sample applications for details.
The included samples now make use of boost::program_options, rather than a custom command line
parser.
Shared library inclusion
The SDK release archive now includes a shared library (.so) as well as the static library
(.a). Additionally, the static library is now built as position-independent code (PIC),
allowing it to be used in dependent shared libraries. This should have no functional impact on
applications already using the static library.
Documentation updates
A new Getting started section has been added to the documentation, which
provides an overview of the SDK and how to get started with it. This includes additional
information on building and running SDK-based applications within docker containers; see
Docker environment. Release arhives now contain example Dockerfiles
and scripts in samples/environment/docker.
New features
Audio feed stages: volume, automatic gain control, and filters
This release adds the ability to specify audio feed stages for audio feeds. It works in the same way as video feed stages, allowing applications to apply audio processing stages to audio feeds.
The following audio feed stages are now available:
AudioStageVolume: Adjusts the volume of the audio feed.AudioStageWebRtcDsp: Applies configurable WebRTC audio processing filters, such as automatic gain control (AGC), noise suppression, and high-pass filtering.
See Audio stages for more details on how to use these stages.
Pipeline SRT/WebRTC element stats (experimental feature)
To help diagnose performance issues with SRT and WebRTC elements, we have added experimental stats logging. This allows applications to request detailed statistics for SRT and WebRTC feeds, including information about packet loss, latency, etc.
This is triggered on a per-feed basis by calling the feed’s
feedRequest() function with a
PxMedia::experimental::FeedLogStatsRequest
request object. If any of the feed’s components recognises the request, it will log its stats out
(note that if the feed has no such components, this is fine and the request is ignored without error).
Queue diagnostics (experimental feature)
To help diagnose latency issues, we have an added an experimental feature to trace queue overruns. Queues help manage media flow where the input rate cannot be consistently consumed by further processing (e.g. an input video is encoded before sending to a remote session). When the input cannot be processed in time, we can either hold on to frames to keep quality/continuity of the media, or drop frames to avoid a (potentially increasing) backlog. SDK uses queues with a finite buffer for incoming media, which will drop older buffers when full. When queuing frames, we are of course introducing latency (an incoming media frame is held onto and processed later). Queues should be tuned to balance excessive latency (buffer too large) whilst maintaining quality by avoiding dropping buffers if possible (enough buffer to smooth occasional slow-processing).
The experimental queue diagnostics feature allows the application to enable tracing of queue overruns. The log output can be “spammy”, so we advise switching on for one feed at a time to get a clear picture rather than interleaving output in the log.
Enabling diagnostics only requires you to make a request on the feed, but importantly the feed must have started before diagnostics can be enabled, to set up the appropriate pipeline hooks.
// Include the FeedDiagnosticsRequest header
#include <PxMedia/FeedDiagnosticsRequest.h>
// When the feed starts, enable the diagnostics using a given log level for output
someFeed->onFeedStarted(
[](auto& feed)
{
std::cout << "Feed " << feed->streamId() << " started playing" << std::endl;
auto diagnostics = feed->feedRequest(experimental::FeedDiagnosticsRequest(LOG_LEVEL));
if (!diagnostics) {
// Failed to enable diagnostics, check diagnostics.error() for cause
}
});
When enabled, the log will output when the pipeline’s queue is overrunning, including the buffer size which indicates the potential latency introduced by the queue’s buffering.
`
[INFO] MediaPipeline [webcam] queue [queue6]: OVERRUN (100ms)
`
Other changes
Peer streaming encryption key length increased
The length of the encryption key used for peer streaming has been increased to 256 bits. This improves the security of peer-to-peer connections.
5.1.1.2. v0.14.2
Minor breaking changes
A few headers in PxUtility have been renamed for clarity and consistency.
In these cases, the file references are not expected to be directly including in application code,
but rather are included by other headers in the SDK.
pxassert.hbecomesPXASSERT.hint-utility.hbecomesint-utils.htraits-utility.hbecomestraits-utils.h
Local UDP latency improvement in CPU-constrained scenarios
An queue has been added between the WebRTC receiver and the local UDP output. This is intended to address a growing-latency issue that could occur in CPU-constrained scenarios, when the local UDP output encoder was not able to keep up with the incoming video feed. The new queue will buffer frames up to a limit (100ms), and discard older frames if the queue fills up. This was the original intended behaviour of the pipeline.
5.1.1.3. v0.14.1
New experimental feature: Wayland desktop capture via Pipewire
The SDK now includes experimental support for capturing Wayland desktop sessions using Pipewire.
This feature is intended for testing and may not be fully stable. Note that configuration of
Wayland and Pipewire to expose Wayland video via Pipewire is outside the scope of this SDK. See
VideoInputFeedPipewire for more details.
Local recording audio mixing changes
In previous SDK releases,
PeerSession::createRecordingFeed
would record given audio feeds into separate audio tracks in the output files.
In this release, the method has been updated to mix the specified audio feeds into a single
audio track in the output files by default.
The old default behaviour can be achieved by using the new overload of
PeerSession::createRecordingFeed,
which allows an application to specify which audio feeds to mix into which audio tracks in the
output files, using the audioTrackFeedIds parameter.
Bug fixes
Fixed an issue where attempting to create a feed when not connected to a media server session would result in a crash. Now, a meaningful error is returned instead.
5.1.1.4. v0.14.0
Previously deprecated features removed
The following classes and features, which were previously deprecated, have been removed:
PxMedia::VideoStageRotateCropPxUtility::HttpFetchTypedPxUtility::RestService
Fixes to previous known issues with VideoStagePrivacy
Now when using VideoStagePrivacy:
When the privacy state is toggled, the video feed resolution matches the incoming feed resolution (previously it was set to a fixed output resolution).
When using the privacy feature with
AVOutputFeedFile, the output file will be continuous (previously, it would split the file when privacy was toggled).Visual artefacts and conflicts between privacy and other video stages such as rotate and crop, or adaptive streaming, have now been resolved.
New feature: Feed request support for setting text overlay text
The feed request now supports setting text overlay text while the feed is playing, using a new request type:
VideoStageTextOverlay::RequestSetText.
For more information on feed requests, see the Feed Requests section.
Updated demo features & fixes
Previously the demo applied the same adaptive streaming size, irrespective of whether the feed was cropped or rotated. This resulted in the video appearing with an incorrect aspect ratio, causing the video to be stretched or squashed. Now, the demo accounts for these stages when they are applied so the correct adaptive streaming size is used.
The demo application can now demonstrate additional “feed stages”, including specifying the order that stages are applied:
--demo-crop=<n>: Crop the outgoing session video by the specified number of pixels from each side.--demo-rotate: The presence of this flag demonstrates rotating the outgoing session feed by 90 degrees clockwise.--demo-privacy: The presence of this flag toggles privacy on the webcam feed at intervals.--text-overlay=<text>: Sets the text overlay on the webcam to the specified text.--demo-framerate=<fps>: Sets a frame rate to apply to the outgoing session feed.
The order in which the options appear on the command line determines the order in which they are applied to the outgoing session video feed (not the demo “preview” shown at demo startup).
You can also now choose whether the demo outputs the local webcam feed to a window or to a UDP output.
Use the --video-output=<out> with a value of window or udp to specify the output type.
The output defaults to window if not specified.