# Files for deploying

File Description File Name File Location
service jar file audiocompareserver.jar /opt/audio-compare
configuration file of jar package application.properties /opt/audio-compare
executable file audioCompare /opt/program

# OS

we recommend Ubuntu 18.04.

# Configuration Environment

1.update install application source of Linux,and install JRE.

apt update
apt upgrade
apt install default-jre
  1. Install QT and ffmpeg related libraries
apt-get install qt5-default
apt install libavutil55
apt install libavcodec57
apt install libavformat57
apt install libswresample2
apt install libswscale4
apt install libqt5multimedia5
apt install libqt5multimedia5-plugins
  1. Install xserver and start up.
apt-get install ubuntu-desktop
apt-get install xinit
nohup startx &

# Configuration file of jar package

this file application.properties should be located in directory which contains jar also.or located in config file at same directory,and every field has default value,just fix it as correct value.

#service port
# path of audio alignment service
audioComparePath = /opt/program/audioCompare
# path of audio temporary storage of downloading 

# url of task scheduler,and it should keep heartbeat
task.scheduler.url = http://localhost:9999
# time interval of sending heartbeat
heartbeat.fixed.delay = 20000
# Max number of service running concurrently
max.execute.count = 10
# service ip,and it will be registered task scheduler
# it can visit url of current service,and it will be registered task scheduler
server.url = http://localhost:${server.port}

# connection timed out,in millisecond
connectTimeout = 5000
# Timeout for getting available connections from the connection pool in milliseconds
connectionRequestTimeout = 5000
# socket timed out,in millisecond
socketTimeout= 5000
# number of retrying after failed
httpRequestRetryCount = 3
# sleep time after failed,in millisecond 
httpRequestFailSleepTime = 3000 

# Start service

Switch the direction to where jar package located in. 1.check xserver

ps - ef | grep xserver

2.configuration of display environment variables.

export DISPLAY = $(ps - ef | grep 'xserver' | grep - v grep | awk '{print $9}')

3.start java service

nohup java - jar audiocompareserver.jar > / dev / null 2 > & 1 &

# Logs file specification

The service log directory is created automatically under /opt/audio-compare directory. The log file is created daily, and will keep the last 30 days log file.and logs was produced by Java application running,log was produced by NvTranscoder,and every task has a log file.