Skip to content

Commit

Permalink
Merge branch 'master' into addAppleSiliconInstallationGuide
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafaboleken authored Mar 19, 2024
2 parents ce36f3d + 510a4bb commit fec697e
Show file tree
Hide file tree
Showing 23 changed files with 528 additions and 251 deletions.
73 changes: 55 additions & 18 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,75 @@
name: Update Docs

on:
push:
branches:
- master
paths-ignore:
- '**/README.md'
- '**/.github/**'
workflow_dispatch:

jobs:
run_pull:
name: docs
runs-on: ubuntu-latest

run_docker:
name: Run Docker service
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- name: make changes
- name : Start docker service
run: |
sudo usermod -aG docker $USER
newgrp docker
sudo systemctl restart docker
run_build:
name: Update Docs
runs-on: self-hosted
needs: run_docker

container:
image: ubuntu:22.04

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install SSH client
run: |
apt update
apt install -y openssh-client -y
- name: Make changes
run: |
sed -i "s^baseUrl:.*^baseUrl:'/docs',^" docusaurus.config.js
sed -i "s^appId.*^appId: '${{ secrets.ALGOLIA_APP_ID }}',^" docusaurus.config.js
sed -i "s^apiKey.*^apiKey: '${{ secrets.ALGOLIA_API_KEY }}',^" docusaurus.config.js
- uses: actions/setup-node@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
- run: npm install
- run: npm run build
- run: cd build && tar -zcvf ../docs.tar .
- name: install ssh keys

- name: Install dependencies
run: npm install

- name: Build
run: npm run build

- name: Package build artifacts
run: cd build && tar -zcvf ../docs.tar *

- name: Install SSH keys
run: |
ls -alh
install -m 600 -D /dev/null ~/.ssh/id_rsa
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
ssh-keyscan -H ${{ secrets.SSH_HOST }} > ~/.ssh/known_hosts
- name: connect and upload
ls -alh ~/.ssh/
- name: Connect and upload
run: |
scp -r docs.tar ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}":"
ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "find /home/antmedia.io/public_html/docs/ -type f -not -name "*.tar" -not -path "/home/antmedia.io/public_html/docs/.ssh/*" -exec rm {} \; && tar -zxvf docs.tar && rm -rf docs.tar"
- name: cleanup
run: rm -rf ~/.ssh
ls -alh
find / -iname "docs.tar"
scp -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa -r docs.tar ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}":"
ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "find /home/antmedia.io/public_html/docs/ -type f -not -name "*.tar" -not -path "/home/antmedia.io/public_html/docs/.ssh/*" -exec rm {} \; && tar -zxvf docs.tar && rm -rf docs.tar"
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,4 @@ If you would like to say thank you or/and support the active development of Ant
* Write interesting articles about the project on [Dev.to](https://dev.to/), [Medium](https://medium.com/) or personal blog.

Together, we can make this project **better** every day! 😘

42 changes: 20 additions & 22 deletions docs/guides/adaptive-bitrate/generating-thumbnails.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Generating Thumbnails from streams
description: Enable generated periodic preview images (snapshots) on the fly with adaptive bitrate streaming.
description: Enable generating periodic preview images (snapshots) on the fly with adaptive bitrate streaming.
keywords: [Generating Thumbnails from streams, Generated Preview Images, Ant Media Server Documentation, Ant Media Server Tutorials]
---

Expand All @@ -12,13 +12,17 @@ In order to activate preview generation, you just need to add at least one adapt

![](@site/static/img/preview_1.png)

Go to ```Application > Your App > Settings > click on basic > switch to Advance``` and search for `generatePreview` and set it to true.

After making the changes, save the settings.

Generated preview images will be available in this URL template:

```
http://<SERVER_NAME>:5080/<APP_NAME>/previews/<STREAM_ID>.png
```

**With v2.4.3** and later, "\_finished" suffix is added to PNG file after streaming has finished. So that it will be in the following template
**With v2.4.3** and later, the `_finished` suffix is added to the PNG file after streaming has finished. So that it will be in the following template

```
http://<SERVER_NAME>:5080/<APP_NAME>/previews/<STREAM_ID>_finished.png
Expand All @@ -34,48 +38,42 @@ In addition to this, you can also upload preview images to Amazon S3. Please [ch

## Configuration parameters

You can add/change following properties to the ```<ANT_MEDIA_SERVER_DIR>`/webapps/`<APP_NAME>`/WEB-INF/red5-web.properties```
Similarly, you can add/change other preview-related properties in the Advance settings of the application we changed above.

```settings.previewHeight```: Preview image is saved as 480p default. If you want to increase the resolution, add the following parameter into red5-web.properties file.
```previewHeight```: The preview image is saved as 480p by default. If you want to increase the resolution, change the following parameter in the advance settings.

```js
settings.previewHeight=360
previewHeight=360
```

```settings.createPreviewPeriod```: Preview image creation period in milliseconds. The default value is 5000 ms. As an example, if you change it as follows, it will create a preview every second.
```createPreviewPeriod```: Preview image creation period in milliseconds. The default value is 5000 ms. As an example, if you change it as follows, it will create a preview every second.

```js
settings.createPreviewPeriod=1000
createPreviewPeriod=1000
```

```settings.previewOverwrite```: Default value is false. If it is false, when a new stream is received with the same stream id, \_N (increasing number) suffix is added to the preview file name. If it is true, a new preview file will overwrite the old one.
```previewOverwrite```: The default value is false. If it is false, when a new stream is received with the same stream ID, the `_N (increasing number)` suffix is added to the preview file name. If it is true, a new preview file will overwrite the old one.

```js
settings.previewOverwrite=false
previewOverwrite=false
```

```settings.addDateTimeToMp4FileName```: Default value is false. If true, adds date-time value to file names. If false, it does not add date-time values to file names.
```addDateTimeToMp4FileName```: The default value is false. If true, it adds a date-time value to file names. If false, it does not add date-time values to file names.

```js
settings.addDateTimeToMp4FileName=false
addDateTimeToMp4FileName=false
```

As an alternative, you can also enable this feature on the web panel by enabling the tick box under ```Application >` Your App >` Settings >` Add Date-Time to Record File names``` and saving the settings.
As an alternative, you can also enable this feature on the web panel by enabling the tick box under ```Application >` Your App >` Settings >` Add Date-Time to Record File Names``` and saving the settings.

![](@site/static/img/preview_2.png)

```settings.previewGenerate```: Default value is true. If false, preview images will not be generated.

```js
settings.previewGenerate=true
```

Keep in mind that if you change the configuration files, you also need to restart Ant Media Server for changes to take effect.
```previewGenerate```: The default value is true. If false, preview images will not be generated.

```js
systemctl restart antmedia
previewGenerate=true
```

You can also enable thumbnail generating options from web panel after version 2.4.3:
You can also enable thumbnail-generating options from the web panel after version 2.4.3:

![](@site/static/img/Screenshot from 2022-03-30 16-40-21.png)
![](@site/static/img/enable-preview.png)
12 changes: 12 additions & 0 deletions docs/guides/advanced-usage/webhooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,18 @@ Here is a sample JSON for using _createBroadcast_ method with [Postman](https://
]
}
```
#### Reliable Webhooks
Ant Media Server supports webhook reliability starting from version 2.8.3. When sending a POST request to the configured webhook URL, if the response is not HTTP OK (200) or if an exception, such as a socket connection timeout, occurs, AMS can automatically initiate multiple retry attempts. Users have the flexibility to customize both the number of retry attempts and the delay between each attempt in milliseconds through the web panel advanced application settings.

```
"webhookRetryCount": 0,
"webhookRetryDelay": 1000
```

![](@site/static/img/reliable_webhook_app_settings.png)



### Webhooks List

Ant Media Server will hook to your website using a POST request with "application/x-www-form-urlencoded" as the body. Some example responses are:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,12 @@ Select Custom and set the Cpu threshold to 60%. You can set other settings accor
![](@site/static/img/virtual-machine-6.png)

Continue by clicking directly next to the "**Management**" and "**Health**" tabs and add the following lines to the "**Custom data**" area in the **Advanced section**.

```
#!/bin/bash
sudo sed -i '/org.apache.catalina.valves.RemoteIpValve/d' /usr/local/antmedia/conf/jee-container.xml
cd /usr/local/antmedia/
./change_server_mode.sh cluster 10.0.2.4

```
**10.0.2.4** IP address is the private IP address of the MongoDB instance I have set up before. Change according to your own MongoDB instance.

![](@site/static/img/virtual-machine-7.png)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Building AMS Source Code
description: Building Ant Media Server from Source Code for contribution or further development.
description: Building an Ant Media Server from source code for contribution or further development.
keywords: [Building AMS from Source Code, Ant Media Server Documentation, Ant Media Server Tutorials]
sidebar_position: 12
---
Expand All @@ -9,82 +9,91 @@ sidebar_position: 12

#### Linux (Ubuntu)

A couple of commons repos should be cloned and build with maven.
A couple of common repos should be cloned and built with Maven.

* Go to a directory where you will clone repos
* Clone and build ant-media-server-parent

$ git clone https://github.com/ant-media/ant-media-server-parent.git
$ cd ant-media-server-parent/
$ mvn clean install -Dgpg.skip=true
$ cd ..

```bash
$ git clone https://github.com/ant-media/ant-media-server-parent.git
$ cd ant-media-server-parent/
$ mvn clean install -Dgpg.skip=true
$ cd ..
```

#### Building Community Edition

* Build the Web Panel
* Install Node

$ wget https://nodejs.org/download/release/v14.8.0/node-v14.8.0-linux-x64.tar.gz
$ tar -zxf node-v14.8.0-linux-x64.tar.gz
$ export PATH=$PATH:`pwd`/node-v14.8.0-linux-x64/bin
$ npm install -g @angular/cli@10.0.5 
```bash
$ wget https://nodejs.org/dist/v20.11.1/node-v20.11.1-linux-x64.tar.xz
$ tar -xJf node-v20.11.1-linux-x64.tar.xz
$ echo 'export PATH=$PATH:'`pwd`'/node-v20.11.1-linux-x64/bin' >> ~/.bashrc
$ npm install -g @angular/cli
```

* Build
```bash
$ git clone https://github.com/ant-media/Ant-Media-Management-Console.git
$ cd Ant-Media-Management-Console
$ npm install
$ ng build --prod
$ cp -a ./dist/. ../Ant-Media-Server/src/main/server/webapps/root/
```

* Clone, build and package Ant-Media-Server

```bash
$ git clone https://github.com/ant-media/Ant-Media-Server.git
$ cd Ant-Media-Server
$ mvn clean install -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -Dgpg.skip=true
$ ./repackage_community.sh
```

$ git clone --depth=1 https://github.com/ant-media/ManagementConsole_AngularApp.git;
$ cd ManagementConsole_AngularApp
$ npm install
$ ng build --prod
$ cp -a ./dist/. ../Ant-Media-Server/src/main/server/webapps/root/

* Clone, build and package Ant-Media-Server

$ git clone https://github.com/ant-media/Ant-Media-Server.git
$ cd Ant-Media-Server
$ mvn clean install -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -Dgpg.skip=true
$ ./repackage_community.sh


### Building Enterprise Edition

* Clone, build Ant-Media-Server

$ git clone https://github.com/ant-media/Ant-Media-Server.git
$ cd Ant-Media-Server
$ mvn clean install -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -Dgpg.skip=true
```bash
$ git clone https://github.com/ant-media/Ant-Media-Server.git
$ cd Ant-Media-Server
$ mvn clean install -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -Dgpg.skip=true
```

* Build Ant-Media-Enterprise Source code of Ant-Media-Enterprise is provided to the Enterprise users

$ cd /where/you/download/enterprise/repo
$ ./redeploy.sh


```bash
$ cd /where/you/download/enterprise/repo
$ ./redeploy.sh
```
* Build the Filter Plugin

$ git clone https://github.com/ant-media/Plugins.git
$ cd Plugins/FilterPlugin
$ mvn install -Dmaven.test.skip=true -Dgpg.skip=true
```bash
$ git clone https://github.com/ant-media/Plugins.git
$ cd Plugins/FilterPlugin
$ mvn install -Dmaven.test.skip=true -Dgpg.skip=true
```

* Build the Web Panel
* Install Node

$ wget https://nodejs.org/download/release/v14.8.0/node-v14.8.0-linux-x64.tar.gz
$ tar -zxf node-v14.8.0-linux-x64.tar.gz
$ export PATH=$PATH:`pwd`/node-v14.8.0-linux-x64/bin
$ npm install -g @angular/cli@10.0.5 
```bash
$ wget https://nodejs.org/dist/v20.11.1/node-v20.11.1-linux-x64.tar.xz
$ tar -xJf node-v20.11.1-linux-x64.tar.xz
$ echo 'export PATH=$PATH:'`pwd`'/node-v20.11.1-linux-x64/bin' >> ~/.bashrc
$ npm install -g @angular/cli
```

* Build

$ git clone --depth=1 https://github.com/ant-media/ManagementConsole_AngularApp.git;
$ cd ManagementConsole_AngularApp
$ npm install
$ ng build --prod
$ cp -a ./dist/. ../Ant-Media-Server/src/main/server/webapps/root/

```bash
$ git clone https://github.com/ant-media/Ant-Media-Management-Console.git
$ cd Ant-Media-Management-Console
$ npm install
$ ng build --prod
$ cp -a ./dist/. ../Ant-Media-Server/src/main/server/webapps/root/
```
* Package Enterprise Edition

$ cd Ant-Media-Server
$ ./repackage_enterprise.sh

```bash
$ cd Ant-Media-Server
$ ./repackage_enterprise.sh
```

If everything goes well, a new packaged Ant Media Server(ant-media-server-x.x.x.zip) file will be created in Ant-Media-Server/target directory
If everything goes well, a new packaged Ant Media Server (ant-media-server-x.x.x.zip) file will be created in the Ant-Media-Server/target directory.
7 changes: 7 additions & 0 deletions docs/guides/installing-on-linux/installing-ams-on-linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ Download the ```install_ant-media-server.sh``` shell script.
```shell
sudo wget https://raw.githubusercontent.com/ant-media/Scripts/master/install_ant-media-server.sh && sudo chmod 755 install_ant-media-server.sh
```
#### Update the installation script

If you have an existing installation script and we recommend updating it to the latest version, you can use the `-u` option with the script. This will update your current installation script to the newest version available.

```shell
sudo ./install_ant-media-server.sh -u
```
#### Run the installation script

```shell
Expand Down
Loading

0 comments on commit fec697e

Please sign in to comment.