AVTool 5

AVTool General Configuration

General configuration of the AVTool.

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".

application.properties

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.

Puring Configuration

Multi CDN

The following parameters are required in the application.properties to use Multi CDN purging.

Multi CDN Configuration Parameters
ParameterValuesExampleDescription
purging.multicdn.enabledtrue / falsetrueEnables Mutli CDN purging
purging.multicdn.rfaStringabcVODThe RFA parameter to use for the purging requests
purging.multicdn.apikeyStringpaonv4w87ü0958w90ös7nöaw98vmjüa0näüa45vmjaü0The api key the use for the purging requests
purging.multicdn.endpointURIhttps://api.ard-mcdn.de/purge/v2/The URI at which the Multi CDN API is available.

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>

Last modified on 9/6/24

The content of this page is licensed under the CC BY 4.0 License. Code samples are licensed under the MIT License.

Icon