Skip to content

Developer Quick Start

Selim Emre Toy edited this page Jan 8, 2021 · 14 revisions

Before starting with the development, please read all the relevant user guides for publishing and playing WebRTC, RMTP and HLS streams with Ant Media Server and for building the projects.

Requirements

  • Ubuntu 18.04
  • Latest update of Java JDK 11.
  • Apache Maven 3

Recommended Folder Structure and Projects:

  • Clone Ant-Media-Server, Ant-Media-ServerCommon, ant-media-server-parent, Ant-Media-Server-Service, ManagementConsole_WebApp, red5-plugins, StreamApp projects from GitHub into $home_directory_path/AntMedia where $home_directory_path is path of your home directory.
  • If you are a Enterprise developer: clone the Ant-Media-Enterprise from Gitlab into $home_directory_path/AntMedia.
  • Create folder $home_directory_path/softwares for the deployed Ant Media Server.

Recommended IDEs for Development

  • Latest version of Eclipse IDE for Java EE Developers
  • It is also possible to use other Java compatible IDEs like IntelliJ or NetBeans but core development team currently uses Eclipse for Java EE.

Eclipse Plugins

  • SonarLint : for static code analysis
  • EclEmma : for test coverage

Eclipse and Maven setup

  • Change the default Maven used in Eclipse by giving path of the Maven home directory (/usr/share/$maven_version for default installation) in the Preferences/Maven/Installations section of Eclipse.
  • Import the projects to the Eclipse using import existing Maven projects wizard.

Deployment

  • Build the projects from the source like described in Build From Source.
  • Copy ant-media-server folder in created packaged zip file (ant-media-server-x.x.x.zip) inside Ant-Media-Server/target directory into $home_directory_path/softwares/ant-media-server. Some partial deployment scripts like redeploy.sh will copy the generated files into this directory.
  • redeploy.sh scripts in in Ant-Media-Server or Ant-Media-Enterprise can be used to partially build and deploy a subproject of Ant Media Server into $home_directory_path/softwares/ant-media-server without building all projects.

Debugging the Server

  • Start the server in debug mode using start-debug.sh script in $home_directory_path/softwares/ant-media-server which is generated after deployment.
  • Create a Remote Java Application Debug Configuration in Eclipse in Debug Configurations settings (Project: ant-media-server Host: localhost Port: 8787)
  • Add all the AntMedia Server projects in Eclipse to the Source Lookup Path in the Source Tab of the Debug Configuration.

Browser Debugging

  • The messages exchanged between AMS applications like WebRTCAppEE and browser and console print-outs can be useful for debugging. They can be observed by using Developer Tools of the browsers.

Recommended Programs to Install for Testing

  • ffmpeg and OBS can be used for testing publishing of rmtp streams to the Ant Media Server.
  • Example ffmpeg command for streaming an mp4 file: ffmpeg -re -i $video_path/video.mp4 -codec copy -f flv rtmp://localhost/WebRTCAppEE/stream1

User Guide

Reference

Troubleshooting

Draft

Proposals

Clone this wiki locally