- JDK11 general updates (outlined in https://gist.github.com/mondain/f74a1969ca2b547faea9efda2cebc993)
- Audio and video data classes hold a reference to their selected codec enum vs an id
- Additional codec support added: opus, vp8, vp9, hevc, av1, and mpeg1video
- IConnection interface added new enums for encoding and duty
- Fixed RTMPE core handling and ChunkSize messaging
- Dependency libraries updated to newer versions and also those supporting JDK11
- Fix for live-wait in server https://github.com/Red5/red5-server/commit/73cdf6a2124d455ffa2373f16781a26479afa83b
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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 /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ffmpeg -y -r 1 -i $1 -an -s 640x480 -pixel_format yuv420p -f image2 image-%3d.raw |
The following modifications to the conf/jee-container.xml
should provide a higher availability level than the default configuration set.
For http
and ws
connections:
<bean name="httpConnector" class="org.red5.server.tomcat.TomcatConnector">
<property name="protocol" value="org.apache.coyote.http11.Http11Nio2Protocol" />
<property name="address" value="${http.host}:${http.port}" />
<property name="redirectPort" value="${https.port}" />
<property name="connectionProperties">
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Java String to C String */ | |
static int jstr_to_cstr(JNIEnv *env, jstring jstr, char *cstr) { | |
jsize jlen, clen; | |
clen = env->GetStringUTFLength(jstr); | |
jlen = env->GetStringLength(jstr); | |
env->GetStringUTFRegion(jstr, 0, jlen, cstr); | |
if (env->ExceptionCheck()) { | |
return -EIO; | |
} |
I did some reading and it looks like this particular OOM message simply means to add more memory for the heap; it essentially means one is running too lean. CPU runs hot trying to clear the garbage.
OutOfMemoryError: GC overhead limit exceeded
Excessive GC Time and OutOfMemoryError
The parallel collector will throw an OutOfMemoryError if too much time is being spent in garbage collection: if more than 98% of the total time is spent in garbage collection and less than 2% of the heap is recovered, an OutOfMemoryError will be thrown. This feature is designed to prevent applications from running for an extended period of time while making little or no progress because the heap is too small. If necessary, this feature can be disabled by adding the option -XX:-UseGCOverheadLimit to the command line.