Skip to content

Instantly share code, notes, and snippets.

@rajdeeprath
rajdeeprath / default.json
Created September 30, 2019 18:14
Simple stream manager scale policy version 3
{
"policy": {
"name": "default",
"description": "Scale policy file with all node types",
"type": "com.red5pro.services.autoscaling.model.ScalePolicyMaster",
"version": "0.0.3",
"targets": {
"region": [{
"name": "default",
"target": [{
Publisher - Action
{
"clid": "1234",
"ssid": "1234",
"msgid": "1234",
"ack": "optional/path/path",
"action":{
"type": "<command>",
"params": "<data-object>"
#!/bin/bash
for ((i=1;i<=200;i++)); do
echo -e "\nAttempt no: $i"
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET "https://samplea.red5routes.xyz/streammanager/api/3.1/event/live/stream1?action=broadcast";
sleep 1
// Defining/accessing testbed configuration.
(function (window, adapter) {
if (typeof adapter !== 'undefined') {
console.log('Browser: ' + JSON.stringify(adapter.browserDetails, null, 2));
}
// http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript
function getParameterByName(name, url) { // eslint-disable-line no-unused-vars
if (!url) {
Limit based
============
Exception in thread "main" com.amazonaws.services.ec2.model.AmazonEC2Exception: You have requested more instances (2) than your current instance limit of 1 allows for the specified instance type. Please visit http://aws.amazon.com/contact-us/ec2-request to request an adjustment to this limit. (Service: AmazonEC2; Status Code: 400; Error Code: InstanceLimitExceeded; Request ID: 2e6e3166-ef2c-4279-98e6-a2e23b1ebd92)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1545)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1183)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:964)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:676)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:650)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.jav
LINUX
======
rajdeeprath@rajdeeprath-VirtualBox:~$ ffmpeg -i /home/rajdeeprath/Downloads/bbb_480p_1000_64_1.mp4 -vcodec libx264 -vb 500k -vprofile baseline -level 2.1 -acodec libfdk_aac -ab 64000 -ar 48000 -ac 2 -f flv "rtmp://127.0.0.1:1935/live?username=testuser&password=testpass/streamname"
WINDOWS
=======
C:\Users\rajde>ffmpeg -i K:\lpackage\bbb_480p_1000_64.mp4 -vcodec libx264 -vb 500k -vprofile baseline -level 2.1 -acodec aac -ab 64000 -ar 48000 -ac 2 -strict experimental -f flv "rtmp://127.0.0.1:1935/live/streamname app=live?username=testuser&password=testpass live=1"
package com.flashvisions.server.red5.jsbridge;
/*
* RED5 Open Source Flash Server - http://www.osflash.org/red5
*
* Copyright (c) 2006-2008 by respective authors (see below). All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 2.1 of the License, or (at your option) any later
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.red5</groupId>
<artifactId>red5-examples</artifactId>
<version>1.0.7-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.red5.example</groupId>
<artifactId>springmvc</artifactId>
/**
* Client functions
*/
/**
* This is to handle the legacy call from FMLE to notify
* us when a publishing starts. Since, we are now doing that
* in application.onPublish, this becomes an no-op.
*/
Client.prototype.FCPublish = function( name )
#!/bin/bash
### BEGIN INIT INFO
# Provides: red5
# Required-Start: $local_fs $network
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Red5
# Description: Red5 flash streaming server