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 / 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:

@mondain
mondain / whip.js
Created September 29, 2021 20:07
Whip JS demo for Red5 Pro
/* Based on code created by Sergio Garcia Murillo, modified by Paul Gregoire to be used with Red5 Pro. */
class WHIPClient {
constructor() {
//Offer SDP
this.offer = null;
//Ice properties
this.iceUsername = null;
this.icePassword = null;
//Pending candidates
@mondain
mondain / whip.html
Created September 29, 2021 20:06
Whip demo page for Red5 Pro
<html>
<head>
<title>Whip</title>
<script type="text/javascript" src="whip.js"></script>
</head>
<body>
<b>Whip it! real good</b>
<br /><br />
<div id="container"></div>
<br />
@mondain
mondain / red5-changes122-128.md
Created May 10, 2021 15:45
Red5 Open source changes 1.2.2 - 1.2.8

Red5 Open source changes 1.2.2 - 1.2.8

@mondain
mondain / sdp-offer.txt
Created November 30, 2020 21:46
SDP Offer from a browser to Red5 Pro Server for a participant
Changes here would be setting mid 1 through 3 to `recvonly` in addition to the new video entry as mid 5.
type: offer, sdp: v=0
o=- 8815930240178044352 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0 1 2 3 4 5 6
a=msid-semantic: WMS ifOcH0OobeWoMmedB3ooL1Aj1OqEqe08YJE3
m=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 110 112 113 126
c=IN IP4 0.0.0.0
@mondain
mondain / sdp-answer.txt
Created November 30, 2020 21:33
SDP Answer back from Red5 Pro Server for a participant
Note that mid=5 is the extra video which would be fed by the server, similar to mid=1..3 for audio
type: answer, sdp: v=0
o=red5pro_6f1838 5138461613339 3 IN IP4 0.0.0.0
s=-
t=0 0
a=msid-semantic: WMS *
a=group:BUNDLE 0 1 2 3 4 5 6
a=ice-options:trickle
m=audio 9 UDP/TLS/RTP/SAVPF 111
@mondain
mondain / R5P SRT Parameters.md
Last active October 27, 2020 15:49
Red5 Pro Server SRT parameters

Configuration Options

When one configures SRT end-points using the provision style submission, the following parameters are available:

{
    "guid": "live/stream1",
    "context": "live",
 "name": "stream1",
@mondain
mondain / gist:c30a84ba051c2c1691cf
Created January 31, 2016 18:30 — forked from collinschaafsma/gist:2270221
Red5 init.d script
#!/bin/sh
#
# /etc/init.d/red5 -- startup script for the red5 server
#
# Based on the tomcat6 init script.
# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
# Modified for Ubuntu red5 by Fred Dixon <ffdixon@bigbluebutton.org>
# Modified for Debian GNU/Linux by Ian Murdock <imurdock@gnu.ai.mit.edu>.
# Modified for Tomcat by Stefan Gybas <sgybas@debian.org>.
# Modified for Tomcat6 by Thierry Carrez <thierry.carrez@ubuntu.com>.
@mondain
mondain / video2yuv420p.sh
Created August 8, 2020 03:10
Save a series of raw yuv420p files from a video source
#!/bin/sh
ffmpeg -y -r 1 -i $1 -an -s 640x480 -pixel_format yuv420p -f image2 image-%3d.raw
@mondain
mondain / loadtest.sh
Created August 29, 2017 19:02
Chromium load test script
#!/bin/bash
# maximum chromium instances to spawn
MAX_INSTANCES=50
# the testing url to request, default page will use "stream1"
#TEST_URL='http://localhost:5080/webrtcexamples/test/subscribe/''
#TEST_URL='http://webrtc.red5.org:5080/webrtcexamples/test/subscribe/'
#TEST_URL='https://webrtc.red5.org/live/viewer.jsp?host=webrtc.red5.org&stream=myStream'
TEST_URL='http://webrtc.red5.org:5080/live/viewer.jsp?host=webrtc.red5.org&stream=myStream'