Frequently Asked Questions

How do I time out a broadcast?


Is there a way to stop a particular broadcast after a certain timeframe from the server side?


1.  Please compile and integrate a file (content at end of FAQ) into your project to stop a broadcast from the server. If you edit the


web handler to be that class instead of the Red5ProLive class, then you can recycle the live app files and put the BroadcastCloser class in the proper place:


after compiling.  Here is our git project for Red5ProLive. 


import org.red5.server.adapter.MultiThreadedApplicationAdapter;
import org.red5.server.api.IConnection;
import org.red5.server.api.Red5;
import org.red5.server.api.scheduling.IScheduledJob;
import org.red5.server.api.scheduling.ISchedulingService;
import org.red5.server.api.scope.IScope;

* This app adapter will close the publisher after 60 seconds.

public class BroadcastCloser extends MultiThreadedApplicationAdapter implements IStreamPublishSecurity {
public boolean appStart(IScope scope){
return true;

* called when publish begins

public boolean isPublishAllowed(IScope arg0, String arg1, String arg2) {
//get the publisher connection
final IConnection connection = Red5.getConnectionLocal();
//how many miliseconds to allow.
long miliseconds = 60000;
//schedule the thread and thread task
this.schedulingService.addScheduledOnceJob(milliseconds, new IScheduledJob(){
//this is the future task
public void execute(ISchedulingService arg0)throws CloneNotSupportedException {
//close it. Server will clean up live stream.

//return yes, publish is allowed.
return true;