A comprehensive, high-performance optimization guide for streamers and developers publishing real-time video via WebRTC (WHIP / browser studio applications) directly from web browsers.
- GPU Allocation (Windows 10/11):
A comprehensive, high-performance optimization guide for streamers and developers publishing real-time video via WebRTC (WHIP / browser studio applications) directly from web browsers.
For RTMP camera publishing specifically, here is a concrete Red5-side hardening plan based on your current config.
Current baseline in /conf/red5.properties:
| M2TS Ingest First-PTS Anchor — Change Report | |
| Original issue | |
| SRT/M2TS ingest produced a startup A/V skew where RTMP subscribers saw the first video frame at wire timestamp ~0 ms while the first audio frame arrived at ~9685 ms. The 9.685 | |
| s gap then persisted for the lifetime of the stream — silent video for ~10 s, with audio always trailing on the wire. | |
The WHIP Restreamer plugin provides a means to restream a stream to a remote server. The plugin is designed to work with servers that handle WHIP.
sequenceDiagram
Ingest->>+ProStream: Ingested Stream (RTMP, RTSP, etc.)
ProStream->>+WHIPRestreamListener: Listen for packets
WHIPRestreamListener-->>+WHIPClient: Pass packets
WHIPClient-->>+Dolby.io: RestreamThis document describes the message sequence for publishing a track and automatic internal subscription in the red5-moq-relay server.
%%{init: {'theme':'base', 'themeVariables': {'fontSize':'16px', 'fontFamily':'arial'}}}%%
sequenceDiagram
participant Publisher as Publisher Client| <%@ page import=" | |
| org.apache.mina.core.buffer.IoBuffer, | |
| org.springframework.context.ApplicationContext, | |
| org.springframework.web.context.WebApplicationContext, | |
| com.red5pro.media.SourceType, | |
| com.red5pro.override.IProStream, | |
| com.red5pro.override.ISideStream, | |
| com.red5pro.override.ProStream, | |
| com.red5pro.override.io.ConnectorShell, | |
| com.red5pro.plugin.Red5ProPlugin, |
To provide exclusion for WISH URI, add this to your web.xml as well if you're adding security to live
<!-- Public resources: explicitly marked as accessible -->
<security-constraint>
<web-resource-collection>
<web-resource-name>No auth area</web-resource-name>
<url-pattern>/whip/*</url-pattern>
<url-pattern>/whep/*</url-pattern>
Change log for WsSession leak in Red5; new version 2.0.16 released 4/23/2025
The leak was primarily seen during regular use of Red5 Pro's RTC client which uses a WebSocket for the initial connection with a switch to DataChannel if accepted / configured in the RTC client during startup.
Classes modified:
WeakReference to the WebSocketScope itself and marked final. In the ctor the scope is also added to the WsSession user properties for consolidated access within Tomcat. Several timeout properties were also added from the latest Tomcat 11.x documentation: BLOCKING_SEND_TIMEOUT our default to 8000ms, ABNORMAL_SESSION_CLOSE_SEND_TIMEOUT our default 10000ms, SESSION_CLOSE_TIMEOUT our default 5000ms. The properties are standard for Tomcat and may be modified at-will via system property override; all values are long type in milliseconds. The maximum idle timeout is now configured to use the largest