Reading configuration files from the conf directory within a module is a very common occurring in wowza. the following code snippet shows how to read a text file as string from the conf directory. If the file does not exist the code throws an IOException. this example makes use of the environment variable WMSCONFIG_HOME,
* Read a text file as string from the wowza conf directory give the filename
* @param filename file name of the file to read
* @throws IOException
private String readFileFromConfigDirectory(String filename) throws IOException
String conf_home = System.getenv("WMSCONFIG_HOME");
File conf_dir = new File(conf_home + File.separator + "conf");
// read the file contents here
File file_to_read= new File(conf_dir.getAbsolutePath() + File.separator + filename);
String content = new String(Files.readAllBytes(Paths.get(file_to_read.getAbsolutePath())));
throw new IOException("oops! file "+filename+" not found!!");
throw new IOException("oops! conf directory was not found!!");
The diagram shown above is an abstract representation of how a connection flows through Red5 core. On connection attempt, Red5 verifies the basic protocol specific handshake as per the connection type (RTMP/RTSP/WebRTC).
Once the handshake is verified Red5 pro translates the connection to a registered Red5 pro connection and sets a reference to it using the static method – Red5.setConnectionLocal(IConnection) in the context of the current thread.
Red5pro offers exciting new ways of engaging your users online with live streams and data online. You can publish live streams and even record them using flash player (desktop), android/ios (mobile) and WebRTC (HTML5 browser).
However, stream security for publishing still lingers as a challenge for the administration. This article discusses how you can secure your publishing streams for the various protocols supported by Red5pro (RTMP, RTSP and WebRTC) programmatically. IF you are new to the world of Red5/Red5Pro, I would suggest taking a peek at the Red5 development series on Github. Here you can find information ranging from what is Red5 to how to create and debug an application.
Microsoft azure platform provides a lot of exciting features and is very much as par with competition from AWS and google. However, there remain a few questions around the documentation and examples offered by the platform for developers – or maybe just for JAVA developers in particular who use the Azure java SDK.
In particular, I found some difficulty dealing with async VM launches and determining VM states accurately. The SDK team has been very helpful in providing examples and getting in touch for answering questions regarding the SDK. I am sharing here some code snippet which may be helpful to other developers treading the same path.
The method given below shows how you can read and categorize a VM’s state to a concrete tangible machine state.