# Files for deploying
File Description | File Name | File Path |
---|---|---|
service jar package | compileserver.jar | /opt/compile |
configuration file of jar package | application.properties | /opt/compile |
compile executable application | processServer | /opt/program |
complied configuration file | processServer.conf | /opt/program |
compiled face-modeling | ms_face_v1.0.2.model | /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
2.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
3.Install xserver related libraries and start xserver
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
server.port=8090
# the local path of compiler
compilerPath=/opt/program/processServer
# face model path
compilerCmd-faceModelFilePath=/opt/program/ms_face_v1.0.2.model
# local temporary path
projectPath=/tmp/editor/project/
# default storage Cloud
#qcloud, qiniu, aws, aliyun, baidu,local, ksyun
defaultStorageType=
# accessKey storage Cloud accessKey
accessKey=
# secretKey storage Cloud accessKey
secretKey=
# configuration of Qiniu-Cloud
QiniuBucket=bsedit
QiniuHost=http://bsedit.meishesdk.com
# configuration of Qcloud
QcloudRegion=ap-beijing
QcloudBucket=bsedit-1257467088
QcloudOriginHost=https://bsedit-1257467088.cos.ap-beijing.myqcloud.com
QcloudHost=https://easset.meishesdk.com
# configuration of aws
AwsS3Region=us-west-1
AwsS3Bucket=bsedit
AwsS3OriginHost=https://bsedit.s3-us-west-1.amazonaws.com
AwsS3Host=https://d3eban5zvz6846.cloudfront.net
# configuration of Aliyun-Cloud
AliyunEndpoint=http://oss-cn-beijing.aliyuncs.com
AliyunBucket=bseditor
AliyunOriginHost=https://bseditor.oss-cn-beijing.aliyuncs.com
AliyunHost=https://alieasset.meishesdk.com
AliyunAuthKey=
AliyunSignatureUrlEnabled=false
# configuration of BOS-Cloud
BOSEndpoint=http://bj.bcebos.com
BOSBucket=testbsedit
BOSOriginHost=https://testbsedit.bj.bcebos.com
BOSHost=https://testbsedit.bj.bcebos.com
# configuration of Ksyun-Cloud
KsyunEndpoint =
KsyunBucket =
KsyunOriginHost =
KsyunHost =
# configuration of local storage
LocalFilePath = /opt/file/bsedit
LocalFileHost = https://testeditor.meishesdk.com:15050/bsedit
#Does storage path be classified by time,and root path is/Year/Month/Day
dateSplitPath = true
# common storage prefix
commonPrefix = editor
# compiled video path in Cloud bucket
videoKey=video-compiled/
# authentication url
compilerCmd-licServerURL=https://...../app
# directory of special effects,and keep same as processServer'configuration
assets.download.dir.path = /opt/material/
# do not use the uuid of uploading file,should generate a new one.
upload.with.new.uuid.enabled = false
# url of task scheduler,and it should keep heartbeat
task.scheduler.url = http://localhost:9999
# time interval of sending heartbeat
heartbeat.fixed.delay = 10000
# Max number of service running concurrently
max.execute.count = 3
# it can visit url of current service,and it will be registered task scheduler
server.url = http://localhost:${server.port}
#sending metadata'request or not,there are two request of complete and matadata before,but there just one request of complete.
send.metadata.enabled = false
# required thread number of compiler
compiler.thread.count = 4
# time duration of process inactive,in second
processExpireTime = 600
# connection timed-out,in millisecond
connectTimeout = 5000
# abled-connection timed-out from connection pool
connectionRequestTimeout = 5000
# reading timed-out,in millisecond
socketTimeout= 5000
# number of retrying after failed
httpRequestRetryCount = 3
# sleep time after failed,in millisecond
httpRequestFailSleepTime = 3000
# Configuration file of processServer
This file processServer.conf should keep same as where executable application located in.and if you have no special requirement,just deploy assetsFolder.
{
"videoBitrate": 10000000,
"audioBitrate": 320000,
"fps": 25,
"crf": 17,
"gopSize": 15,
"sampleRate": 48000,
"maxRes": "8K",
"assetsFolder": "/opt/material/"
}
# Start service
Switch the direction to where jar package located in. 1.checking xserver start or not
ps - ef | grep xserver
2.config environment variables of dispaly
export DISPLAY = $(ps - ef | grep 'xserver' | grep - v grep | awk '{print $12}')
- start java service
nohup java - jar compileserver.jar > / dev / null 2 > & 1 &
# Logs file specification
The service log directory is created automatically under /opt/compile 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 processServer,and every task has a log file.