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 / proscope-handler.md
Created April 22, 2024 17:55
Updating a custom Red5 application to newer Red5 Pro Server before handler patch is available

This document assumes that you've upgraded to 12.x of Red5 Pro prior to any patches addressing custom Red5 application scope handling. To get your application working, follow the steps below:

  • Add the dependency to your pom for red5pro-commons:
	<dependency>
		<groupId>com.red5pro</groupId>
		<artifactId>red5pro-common</artifactId>
		<version>12.0.1.0</version>
		<scope>compile</version>
@mondain
mondain / public-stun-list.txt
Last active April 22, 2024 08:55
Public STUN server list
23.21.150.121:3478
iphone-stun.strato-iphone.de:3478
numb.viagenie.ca:3478
s1.taraba.net:3478
s2.taraba.net:3478
stun.12connect.com:3478
stun.12voip.com:3478
stun.1und1.de:3478
stun.2talk.co.nz:3478
stun.2talk.com:3478
@mondain
mondain / migration-to-red5-1.3.32.md
Created March 28, 2024 15:34
Migration to Red5 1.3.32

In conf/red5-common.xml the MP3 and M4A entries must be removed to prevent startup exceptions, unless an MP3/M4A support jar is included in the classpath (Not yet available). Remove or comment out the following entries from the streamableFileFactory bean:

  <bean id="mp3FileService" class="org.red5.server.service.mp3.impl.MP3Service"/>
  <bean id="m4aFileService" class="org.red5.server.service.m4a.impl.M4AService"/>

Remove this entire bean entry:

@mondain
mondain / SBOM-01102024.md
Last active January 11, 2024 16:59
Vulnerabilities in Red5

Addressing of critical and high vulerability alerts

The following three updates will cover the majority of issues detected; this report is for Red5 open source specifically and should apply to implementations utilizing the server.

  • Spring 5.3.31
  • Slf4j 2.0.11
  • Logback 1.4.14

The update to Spring 6.0.x is delayed due to its requirement on JDK 17.

@mondain
mondain / obs-2-red5pro.md
Created July 3, 2023 17:50
OBS with libdatachannel to Red5 Pro version 11.0

Offer from OBS with libdatachannel:

v=0
o=rtc 1749923962 0 IN IP4 127.0.0.1
s=-
t=0 0
a=msid-semantic:WMS *
a=group:BUNDLE 0 1
a=setup:actpass
@mondain
mondain / whip-ideas.md
Last active April 19, 2023 15:39
WHIP

WHIP with trickle:

sequenceDiagram
    participant wc as WHIP Client
    participant ws as WHIP Server
    wc->>+ws: OPTIONS /whip/endpoint/stream1
    ws-->>wc: HTTP Response with headers and optional Link header containing ICE servers
    wc->>ws: POST /whip/endpoint/stream1 with SDP Offer
 ws--&gt;&gt;wc: HTTP Response with SDP Answer with candidates and Location header "/whip/resource/stream1"
@mondain
mondain / whep-ideas.md
Last active April 19, 2023 15:25
WHEP brainstorming

WHEP Mode 1 with trickle:

sequenceDiagram
    participant wc as WHEP Client
    participant ws as WHEP Server
    wc->>+ws: OPTIONS /whep/endpoint/stream1?requestId=subscriber1
    ws-->>wc: HTTP Response with headers and optional Link header containing ICE servers
    wc->>ws: POST /whep/endpoint/stream1?requestId=subscriber1
    ws-->>wc: HTTP Response with SDP Offer with candidates and Location header "/whep/resource/stream1"
@mondain
mondain / linux-amd64-ffmpeg-with-rtmpe.bash
Created April 5, 2022 20:20
Bash script for building openssl, librtmp, openh264, and ffmpeg for testing purposes
#!/bin/bash
# explanation https://gist.github.com/mohanpedala/1e2ff5661761d3abd0385e8223e16425
set -exuo pipefail
WORKDIR="$(pwd)"
mkdir -p ${WORKDIR}
SRC="$WORKDIR/ffmpeg_build"
CMPLD="$WORKDIR/compile"
NUM_PARALLEL_BUILDS=4
@mondain
mondain / LiveStreamListService.java
Created March 29, 2022 15:42
Example LiveStreamListService for Red5 Pro
import java.io.File;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
@mondain
mondain / red5pro-ipv6.md
Created November 8, 2021 19:02
Enable IPv6 in Red5 Pro Server

Add to red5.sh and red5pro.service: -Dorg.ice4j.ipv6.DISABLED=false red5.sh example:

if [ -z "$JVM_OPTS" ]; then
    JVM_OPTS="-Dorg.ice4j.ipv6.DISABLED=false -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -Xms2g -Xmx2g -Xverify:none -XX:+UseBiasedLocking -XX:InitialCodeCacheSize=8m -XX:MaxGCPauseMillis=500 -XX:ReservedCodeCacheSize=32m"
fi

red5pro.service example: