Partial Configurations
A session configuration can include a group of useful tasks from another file, called a partial configuration. This means that you can build groups of related tasks and re-use them in different places, or move a complex sequence of operations into a separate file.
A partial configuration has a similar structure to a session configuration. It begins with a section named [Library], rather than [Session], but contains a list of tasks defined using the Engine parameter. Each of the tasks is configured in a named section. The [Library] section also specifies the input to, and output from, the partial configuration.
-
The parameter
Inputspecifies a list of aliases for tracks that are expected as input. Tasks in the partial configuration must use these aliases to refer to tracks provided by the session configuration. -
The parameter
Outputspecifies a list of tracks to return to the session configuration. Specify the track names in the format:Alias:TaskName.TrackName...where
Aliasis the track name to return to the session configuration,TaskNameis the name of the task (in the partial configuration) that produced the track, andTrackNameis the name of the track.
The following is an example partial configuration.
[Library] Engine0 = ObjectClassRecognizer Engine1 = ObjectTypeFilter Input0 = PartialConfigInput Output0 = PartialConfigOutput:ObjectTypeFilter.Output [ObjectClassRecognizer] Type = ObjectClassRecognition Recognizer = ... Input = PartialConfigInput [ObjectTypeFilter] Type = Filter Input = ObjectClassRecognizer.DataWithSource LuaScript = OutputCarsOnly.lua
To use a partial configuration, set the Import parameter in the [Session] section of your session configuration. This specifies the name of a section that provides more information about the partial configuration. In the named section:
- The
Configparameter specifies the partial session configuration to use. You can specify a file path, either absolute or relative to the Media Server configurations directory (which is specified by theConfigDirectoryparameter in the[Paths]section of your Media Server configuration file). Alternatively, if you send the partial configuration to Media Server as part of the process request, you can specify the name of an additional data label. For more information about sending additional data in theprocessaction, refer to the documentation for theprocessaction in the Media Server Reference. -
The
Inputparameter specifies a list of tracks to provide as input to the partial configuration. You do not need to list the default tracks produced by your ingest engine, because these are available in the partial configuration by default. However, you must specify any other tracks that you want to use. Specify track names in the format:Alias:TaskName.TrackName...where
Aliasmatches the alias defined by theInputparameter in the partial configuration.
For example:
[Session] Engine0 = IngestSourceMedia Engine1 = FilterVideoFrames Engine2 = OutputXML Import0 = UseMyPartialConfig [IngestSourceMedia] Type=Video ... [FilterVideoFrames] Type=Filter ... [UseMyPartialConfig] Config = MyPartialConfig.cfg // Send track FilterVideoFrames.Output to partial configuration // In the partial configuration this track is called PartialConfigInput Input0 = PartialConfigInput:FilterVideoFrames.Output [OutputXML] Type=XML // Use track returned from partial configuration Input = UseMyPartialConfig.PartialConfigOutput ...
A partial configuration can import other partial configurations. If you want to do this, set the Import parameter in the [Library] section.