Axis Media Library is a multimedia library developed by Axis Communications , a company specializing in video surveillance and security.
This multimedia library is used to stream videos from surveillance cameras in real time in a web browser, without having to do any transcoding.
This library also provides examples to test this library.
Here is how to set up the environment and the prerequisites in order to be able to test this library, with different versions of the library and of Ubuntu.
Version 4.0.7 + Ubuntu 16
Prerequisites:
sudo apt update
sudo apt install curl
sudo apt install git
sudo apt install npm
curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
apt-get install -y nodejs
sudo apt-get install -y nodejs
npm set unsafe-perm true
sudo npm install --global yarn
sudo apt install ffmpeg
Clone:
mkdir axis
cd axis
git clone https://github.com/AxisCommunications/media-stream-library-js.git --branch v4.0.7
Compile:
yarn
cd media-stream-library-js
yarn
Execute:
yarn example
Open Firefox at: http://127.0.0.1:8080/
Type the address of an Axis camera then ENTER (ex: 192.168.0.230)
The live image should be displayed
Version 5.0.0 + Ubuntu 16 & 18
Prerequisites:
sudo apt update
sudo apt install curl
sudo apt install git
sudo apt install npm
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
apt-get install -y nodejs
sudo apt-get install -y nodejs
npm set unsafe-perm true
sudo npm install --global yarn
sudo apt install ffmpeg
sudo apt-get install docker.io
Cloner
mkdir axis
cd axis
git clone https://github.com/AxisCommunications/media-stream-library-js.git --branch v5.0.0
Compile:
yarn
yarn add media-stream-library
cd media-stream-library-js
git config --global url.https://github.com/.insteadOf git://github.com/
yarn
Execute:
yarn examples
Open Firefox at: http://127.0.0.1:8080/
Choose camera, then simple.html
Type the address of an Axis camera then ENTER (ex: 192.168.0.230)
The live image should be displayed
Execute 2:
open a second terminal:
cd axis/media-stream-library-js
sudo yarn rtsp
Test in firefox: http://127.0.0.1:8080/test/mjpeg.html
Test in firefox: http://127.0.0.1:8080/test/h264.html
Version 9.3.2 + Ubuntu 18
Prerequisites:
sudo apt update
sudo apt install curl
sudo apt install git
sudo apt install npm
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
apt-get install -y nodejs
sudo apt-get install -y nodejs
npm set unsafe-perm true
sudo npm install --global yarn
sudo apt install ffmpeg
sudo apt-get install docker.io
Clone:
mkdir axis
cd axis
git clone https://github.com/AxisCommunications/media-stream-library-js.git --branch v9.3.2
Compile:
yarn
yarn add media-stream-library
cd media-stream-library-js
yarn
Execute:
yarn examples
Open Firefox at: http://127.0.0.1:8080/
Choose camera, then simple.html
Type the address of an Axis camera then ENTER (192.168.0.230)
The live image should be displayed
Execute 2:
Open a second terminal:
cd axis/media-stream-library-js
sudo yarn rtsp
Test in firefox: http://127.0.0.1:8080/test/mjpeg.html
Test in firefox: http://127.0.0.1:8080/test/h264.html