Skip to content

Installation guide

Daniel Silhavy edited this page Feb 21, 2024 · 16 revisions

The DASH-IF Conformance tools can be installed directly on an Ubuntu system or using a Docker Container.

Installation on Ubuntu 20.04

Clone repository including required submodules

git clone https://github.com/Dash-Industry-Forum/DASH-IF-Conformance

If you want to check out the code version before the major JCCP refactoring use the following command:

git clone --recurse-submodules --branch master https://github.com/Dash-Industry-Forum/DASH-IF-Conformance

Build the ISO Segment Validator

For segment validation we need to build the ValidateMP4.exe.

  1. Navigate to DASH-IF-Conformance/ISOSegmentValidator/public/linux
  2. Type make
  3. The folder DASH-IF-Conformance/ISOSegmentValidator/public/linux/bin should now contain ValidateMP4.exe

Dependencies

  • PHP 7.0 or above
  • Java 1.8.0
  • Apache 2.4
  • Python 2.7

Install PHP

sudo apt install php php-dev php-xml php-curl php-xdebug libapache2-mod-php

Install Java and JDK (probably need to install an older version, see troubleshooting below)

Install Java 8

sudo apt install openjdk-8-jdk

Set default Java installation

Make sure that java and javac will use openjdk-8-jdk.

update-alternatives --list java
sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 
sudo update-alternatives --set javac /usr/lib/jvm/java-8-openjdk-amd64/bin/javac

Install ANT

The main known usage of Ant is the build of Java applications. Ant supplies a number of built-in tasks allowing to compile, assemble, test and run Java applications

sudo apt-get install ant

Install Apache

sudo apt install apache2 apache2-doc

The default root folder is “/var/www/html/”. Go to the root folder, copy or move the web contents to this directory or make a softlink of the projects:

ln -s <REPLACE_WITH_PATH_TO_REPO>/DASH-IF-Conformance /var/www/html/

Add your username to the group "www-data"

Type whoami to get your username

Check if your user is already in the group

groups <username>

Add the user if not already in the group

sudo usermod -a -G www-data <username>

Add write permissions to the users in the "www-data" group

sudo chmod -R 0777 /var/www/

Add permission to run processes without password for users in the group "www-data" sudo visudo Add these lines at the end www-data ALL=NOPASSWD: ALL

Restart Apache server

sudo systemctl restart apache2

Check if the Apache server is running

sudo systemctl status apache2

Install Python

sudo apt install python2.7

Install pip

curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
sudo python2.7 get-pip.py

Install matplotlib

pip2 install matplotlib

Install Stdc++

Omit for now: sudo apt install libstdc++6:i386

Use installation

Navigate to http://localhost/DASH-IF-Conformance/

Installation by Docker image

Build Docker image

  1. Navigate to the root folder of the DASH-IF-Conformance project
  2. Use ./build.sh to locally build your docker image with all dependencies.

Run Docker container

Create and run container, e.g.: docker run -d --name dc-tester -p 80:80 dash-if-conformance.

  • -d : detach mode: Containers started in detached mode exit when the root process used to run the container exit
  • --name dc-tester : Identifier of the container set to "dc-tester"
  • -p 80:80 : Public container port 80 at host port 80

Run Docker container for development

In order to have code changes on the local host reflect into the container, use a volume mount to make the code available in the container. This way it is not needed to rebuild a new docker image everytime you would change code.

From you repository root run e.g.: docker run -d --name dc-tester -p 80:80 -v `pwd`:/var/www/html dash-if-conformance.

Use Docker installation

Navigate to http://localhost/Conformance-Frontend/

Troubleshooting

progress.xml not found

http://localhost/DASH-IF-Conformance/Conformance-Frontend/temp/id55592398/progress.xml?1642587399051 404 (Not Found)

  • Probably related to missing rights to write in the temp folder? 
  • Creating the folder manually and assigning write rights for all users solved this error
  • Possibly some processes are not terminated and run forever until website is refreshed. Saw multiple requests to progress.xml

MPD validation report

MPD validation report: 0Error: Unable to initialize main class Validator. Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException

Needing a file to validate and intermediate file

  • The path to your conformance frontend probably contains one or more whitespaces. That leads to problems in MPDValidation.php, specifically with the function chdir. For instance the path /home/dsi/Conformance\ Software/DASH-IF-Conformance does not work. Use /home/dsi/Conformance-Software/DASH-IF-Conformance instead.

cannot build or run docker image on Mac with M1/M2 chip

  • if you are running on Mac with M1/M2 chip and face issues with creating the docker image or running the docker container, setting the docker default platform to linux/amd64 may help:
export DOCKER_DEFAULT_PLATFORM=linux/amd64

Hosted installation on AWS/Linode

The deployment of the latest staging and stable version of the Conformance Validator is typically performed by Github actions. In the rare case of a machine reboot or in case the Github actions failed follow the following steps:

  1. Log in on the machine via ssh
  2. Navigate to the local installation: cd DASH-IF-Conformance/
  3. Pull the latest changes: git pull
  4. Use ./build.sh to locally build your docker image with all dependencies.
  5. Start the Docker container: sudo docker run -d --name jccp-main -p 8000:80 dash-if-conformance

The proxy on the server instance internally uses port 8000 for http://conformance.dashif.org/ and port 8001 for https://staging.conformance.dashif.org/. Repeat the steps above to start the Docker container for the staging environment simply pulling the development branch in step 2 and using the following command to start the Docker container: sudo docker run -d --name jccp-staging -p 8001:80 dash-if-conformance