Skip to content

Instantly share code, notes, and snippets.

View mondain's full-sized avatar
🏠
Working from home

Paul Gregoire mondain

🏠
Working from home
View GitHub Profile
@mondain
mondain / moq-mix-feedback.txt
Created November 8, 2026 16:32
Feedback on draft-nandakumar-moq-mix-00 (MoQ Interconnect Exchange)
Feedback on draft-nandakumar-moq-mix-00 (MoQ Interconnect Exchange)
Reviewed against the text of the 2 November 2026 revision, and against
draft-ietf-moq-transport-22, draft-lcurley-moq-cluster-01 and the
moq-cluster-02 working text. Section numbers refer to the MIX draft.
SUMMARY
MIX is a serious attempt at inter-domain relay routing, and the choice to
@mondain
mondain / srt-moqxr-examples.md
Last active August 21, 2026 15:02
SRT via OpenMOQ Publisher Examples

SRT via OpenMOQ Publisher Examples

Two examples are provided for SRT inter-operation, one uses a file and the other is more direct. Ensure that you update any servers URL's or namespaces to match your setup.

Example 1 - File ingest

This example uses a file ingest read by ffmpeg which provides an SRT listener endpoint for openmoq-publisher to call; the caller uses the json configuration file.

  1. Create your json file; example path and name: /tmp/srt_caller.json
@mondain
mondain / webrtc-publisher-guide.md
Last active October 5, 2026 19:30
WebRTC Browser Publishing & Streaming Optimization Guide

WebRTC Browser Publishing & Streaming Optimization Guide

A comprehensive, high-performance optimization guide for streamers and developers publishing real-time video via WebRTC (WHIP / browser studio applications) directly from web browsers.


1. Operating System & Browser Settings

OS-Level Adjustments

  • GPU Allocation (Windows 10/11):
@mondain
mondain / rtmp-cam-malformed-chunk-mitigation.md
Created May 15, 2026 14:00
Hardening the server against malformed or corrupted RTMP chunks

This guide is for Red5 Pro Server build: KAN-15.4.0.32.b870

For RTMP camera publishing specifically, here is a concrete Red5-side hardening plan based on your current config.

Current baseline in /conf/red5.properties:

  • rtmp.ping_interval=1000
  • rtmp.max_inactivity=60000
  • rtmp.tcp_keepalive=false
  • rtmp.receive_buffer_size=262144
@mondain
mondain / gist:da7f803c8e6f668926e74995c4d95474
Created May 1, 2026 23:23
TSHandler first-PTS anchor fix
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.
@mondain
mondain / WHIP Restreamer.md
Created March 12, 2026 13:40
WHIP Restreamer

WHIP Restreamer

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: Restream
@mondain
mondain / publish-subscribe-sequence.md
Created November 5, 2025 01:07
Red5 MOQ Relay - Publish and Automatic Subscribe Flow

MoQ Relay: Publish and Automatic Subscribe Flow

This document describes the message sequence for publishing a track and automatic internal subscription in the red5-moq-relay server.

Sequence Diagram

%%{init: {'theme':'base', 'themeVariables': {'fontSize':'16px', 'fontFamily':'arial'}}}%%
sequenceDiagram
    participant Publisher as Publisher Client
@mondain
mondain / PubSubStats.jsp
Last active October 25, 2025 18:35
Red5 Client Validation of Publishers and Subscribers
<%@ 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,
@mondain
mondain / ICE-Debug-Logback.md
Created October 10, 2025 14:11
ICE loggers for debugging

ICE Debugging via Logback

  • Open /usr/local/red5pro/conf/logback.xml in a text editor

  • Locate this section in the file:

  <!-- Root level for any ice logger -->
  <logger name="com.red5pro.ice" level="WARN"/>
@mondain
mondain / for red5 pro live app.md
Last active September 19, 2025 19:24
Web Application Authentication in Red5

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>