Configuration
The AVTool uses two configuration files: the "application.properties" and the "mediaconfig.xml". Samples are given below and can also be found in the distribution of the AVTool in the folder named "config".
Example configuration
# Connection to the Sophora Primary Server.
sophoraServer.host = http://localhost:1196
sophoraServer.username = avtool
sophoraServer.password = XXXXXXX
# URL/Path to the config for media formats and -servers.
mediaConfig = file:config/mediaconfig.xml
# Web server
server.port = 5063
# JMX
jmx.registry.port = 5060
rmi.registry.port = 5061
jmx.registry.username =
jmx.registry.password =
# Upload protocol to use for YouTube videos.
# false = the entire media content will be uploaded in a single request (not resumable)
# true = the request will use the resumable media upload protocol to upload data in chunks
# For details see https://developers.google.com/youtube/v3/guides/using_resumable_upload_protocol
youtube.chunking = true
# tries after first IO error
uploader.retry.count = 2
uploader.retry.waitSeconds = 15
# Path for the MD5 digest database.
digest.dir = /cms-install-directory/avtool/digest
# Path for the persistent queue file.
job.store.path = /cms-install-directory/avtool/queue.xml
# Number of parallel operation processing.
job.scheduler.threadCount = 8
# Test mode: Set to true to only log operations instead of executing them.
logonly.fileoperations = false
logonly.publishdocuments = false
# In the tagging configuration of the YouTube channel configuration, values with these prefixes are considered to be
# property references.
tagging.propertyPrefix.regexp = ^(example:|sophora:|youtube.).*$
# In the tagging configuration of the YouTube channel configuration, values with these prefixes are considered to be
# references to Groovy tagging scripts.
tagging.scriptClassPrefix.regexp = ^(scriptClass:)(.+)$
# Groovy scripts (comma-separated) that can modify the document before processing
document.preprocessorScripts =
# Path of the proposal section, path elements must be separated by ';'.
# When a transport error occurs, a proposal will be created in this section.
# Leave empty to not create proposals.
proposalsection.path =
mediaconfig.xml
The mediaconfig.xml file (location set by mediaConfig property in the application.properties file) describes the document types processed by the AVTool and available media formats. It also contains the global YouTube configuration.
Playout channel
In the above MediaDocumentDescription bean (com.subshell.sophora.avtool.api.MediaDocumentDescription), the name of a playout channel can be set. Configuring the playout channel is optional. With this feature configured, the files will only be uploaded to YouTube if the document is enabled in the configured playout channel, which will be checked when the document is being published. You can also use the timed channel affiliation settings for an automatic upload/removal of the files.
Date Pattern Matching
In the above mediaServerDescription bean (com.subshell.sophora.avtool.api.ServerDescription) an optional regular expression to parse the date from file names can be given. This is useful if the files are structured according to their dates in different subfolders. The regex defines the position of the date in the file name (which must be in the format "yyyyMMdd"). Once the date has been found, it will be applied to the entries in the format directory mapping that contain format specifiers, e.g. "%1$tY/%1$tm%1$td".
Timeouts
In the above mediaServerDescription bean (com.subshell.sophora.avtool.api.ServerDescription) additional timeout properties can be set:
Example:
<?xml version="1.0" encoding="UTF-8"?>
<bean id="mediaServerDescription" class="com.subshell.sophora.avtool.api.ServerDescription">
<property name="host" value="mediaserver" />
<property name="transporterFactory" ref="localTransporter" />
<property name="connectTimeout" value="30000" /><!-- 30 seconds -->
<property name="socketTimeout" value="600000" /><!-- 10 minutes -->
</bean>
Purging
The AVTool can trigger the purging of URLs or Tags when files have been removed. Supported purging mechanisms include the Akamai Fast Purge API or the Multi CDN Purge API.
Multi CDN
The following parameters are required in the application.properties to use Multi CDN purging.
Apart from the configuration in the application.properties it is also required to define URL patterns and/or tag patterns for each streaming server thats files should be purged. These patterns must be defined in a list for each streaminServerDescription in the mediaconfig.xml.
Example:
<property name="purgingUrlPatterns">
<list>
<value>https://streamingserver.de/{filename}</value>
<value>https://streamingserver2.de/vod/{filename}</value>
</list>
</property>
<property name="purgingTagPatterns">
<list>
<value>{filename}</value>
<value>{sequencename}</value>
</list>
</property>
<property name="purgingPatternPatterns">
<list>
<value>https://streamingserver.de/{sequencename}*</value>
</list>
</property>
Handling of missed events
Sometimes it might be necessary to stop the AVTool for maintenance or other issues take the AVTool offline.
During these periods the other services don't stop producing events that need to be processed by the AVTool.
The AVTool is able to find and process these events when it is started the next time.
To be able to know which events to look for on startup, the AVTool regularly persists the source time of the last processed events. When the AVTool is started it will look for any events that occured since the persisted time.
| Property | Description | Default |
|---|---|---|
| avtool.event-handling.state-file.path | The file path at which the current event handling state is persisted | eventState.json |
| avtool.event-handling.state-file.minimum-flush-delay-seconds | The minimum number of seconds the AVTool will wait before persisting a changed event handling state. This can be used to avoid many unecessary disk writes when many events come in short succession. | 10 |
| avtool.event-handling.state-file.maximum-flush-delay-seconds | The maximum number of seconds the AVTool will wait before persisting a changed state. This is a safe guard to avoid delaying the persistance indefinitely. | 60 |