# Files for deploying

File Description File Name File Path
service jar package transcodingserver.jar /opt/transcode
configuration file of jar package application.properties /opt/transcode
transcoding excuable application NvTranscoder /opt/program
zip jar package of images compressimage.jar /opt/transcode

# 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. the ffmpeg should be installed if there are tasks of mxf transcoding.mxf files has serveral audio tracks,so the left_channel_url and right_channel_url is result which been merged by muti-parts and length is long,so this field in database should adjust dynamically.
apt install ffmpeg

# 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=8091

#the local path of video transcoder
transcoderPath=/opt/program/NvTranscoder

#the local path of temporary video file
videoPath=/tmp/editor/video/
#the local path of temporary audio file
audioPath=/tmp/editor/audio/
#the local path of temporary image file
imagePath=/tmp/editor/image/

#default storage type: qcloud, qiniu, aws, aliyun, baidu, local, ksyun
defaultStorageType=

#storage accessKey
accessKey=
#storage secretKey
secretKey=

#qiniu storage configurations
QiniuBucket=bsedit
QiniuHost=http://bsedit.meishesdk.com
#qcloud storage configurations
QcloudRegion=ap-beijing
QcloudBucket=bsedit-1257467088
QcloudOriginHost=https://bsedit-1257467088.cos.ap-beijing.myqcloud.com
QcloudHost=https://easset.meishesdk.com
#aws storage configurations
AwsS3Region=us-west-1
AwsS3Bucket=bsedit
AwsS3OriginHost=https://bsedit.s3-us-west-1.amazonaws.com
AwsS3Host=https://d3eban5zvz6846.cloudfront.net
#aliyun storage configurations
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
#baidu storage configurations
BOSEndpoint=http://bj.bcebos.com
BOSBucket=testbsedit
BOSOriginHost=https://testbsedit.bj.bcebos.com
BOSHost=https://testbsedit.bj.bcebos.com
#ksyun storage configurations
KsyunEndpoint   =
KsyunBucket     =
KsyunOriginHost =
KsyunHost       =
#local storage configurations
LocalFilePath = /opt/file/bsedit
LocalFileHost = https://testeditor.meishesdk.com:15050/bsedit

#enable storage path pattern: <jar path>/yyyy/MM/dd/<module name> 
dateSplitPath = true

#common storage prefix, keep default
commonPrefix = editor

#the storage key path for video
videoKey=video/
#the storage key path for audio
audioKey=audio/
#the storage key path for image
imageKey=image/
#the storage key path for compiled video
videoCompiledKey=video-compiled/
#the storage key path for video thumbnail
videoThumbnailKey=video-thumbnail/

#the Meishe Task Scheduler web api host
task.scheduler.url = http://localhost:9999
#the interval time to send heartbeat package to Meishe Task Scheduler
heartbeat.fixed.delay = 10000
#the max runable count of processServer
max.execute.count = 3
#the service host registered to Meishe Task Scheduler
server.url = http://localhost:${server.port}

#the timeout for processing video, measured by second
processExpireTime = 600

#whether to use the task uuid as the upload file name
upload.with.new.uuid.enabled = false

#whether to send metadata info when compiling completed, keep default
send.metadata.enabled = false

#the thread count used for decoding and encoding
transcoder.thread.count = 4

#the local path of image compress jar file
compress.image.jar.path = /opt/transcode/compressimage-1.0.jar

#the request connection timeout, measured by milisecond
connectTimeout = 5000
#the connection pool timeout, measured by milisecond
connectionRequestTimeout = 5000
#the socket read timeout, measured by milisecond
socketTimeout= 5000
#the http request fail retry count
httpRequestRetryCount = 3
#the interval time between requests, measured by milisecond
httpRequestFailSleepTime = 3000 

# send progress info or not
send.progress.enabled = true

# Start service

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

nohup java - jar transcodingserver.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 NvTranscoder,and every task has a log file.