Descriptor Remove
You can activate this plugin with the string
manifest_edit.plugins.mpd.descriptor_remove
.
The Descriptor remove plugin allows you to remove Descriptors from any Adaptation Set or Representation of a Dash manifest (see 5.8.2 of ISO23009-1 standard).
For a use case where one or more Descriptors needs to be removed, the questions to answer are:
What elements do I need to remove Descriptors from?
How exactly can I specify the details of the Descriptors I need to remove?
The answer to this questions depends on your specific use case. In our example, we can imagine that the answers could be something like this:
I want to remove Descriptors from all adaptation sets
I want to remove all EssentialProperties having a schemeIdUri="urn:dvb:dash:lowlatency:critical:2019" attribute.
We can generalize this example by considering that there will always be a "selection" to make (what to edit?) and an "action" to specify (how to specify the Descriptor values?).
This approach (select and edit) is useful for many other use cases. For this reason the "selection" syntax used in Manifest Descriptor is common to many other plugins and is described in the following dedicated chapter.
Descriptor configuration
Descriptor configuration represents the "how" part in the introduction above. It allows you to specify what kind of Descriptor you want to remove (i.e. EssentialProperty) in the mandatory descriptor field name and, optionally, to further refine the selection by specifying also the schemeIdUri, value and id fields that need to match.
This is achieved with the following syntax:
name : <the kind of descriptor>
schemeIdUri: <optional schemeIdUri regular expression>
value: <optional value regular expression>
id: <otional id regular expression>
A valid configuration includes at minimum the field name. The
schemeIdUri, value and id fields are optional and can be safely
omitted, in which case they will not be used for selection. This is equivalent
to providing a "match all" '.*'
regular expression for those fields.
For the example cited in the introduction, the right configuration to remove a "low latency" Descriptor from all adaptation sets would be:
mpd:
- manifest_edit.plugins.mpd.descriptor_remove:
periods:
- id : '.*'
adaptationSets:
- '*': '.*'
plugin_config:
name: 'EssentialProperty'
schemeIdUri : "urn:dvb:dash:lowlatency:critical:2019"
Alternatively, a more generic regular expression can also be used to select the descriptor, such as
mpd:
- manifest_edit.plugins.mpd.descriptor_remove:
periods:
- id : '.*'
adaptationSets:
- '*': '.*'
plugin_config:
name: 'EssentialProperty'
schemeIdUri : ".+:lowlatency:.+"
Should the selection match more than one descriptor, all the matching descriptors will be removed.
Similarly, you can select the descriptor(s) to remove by means of the value or of the id field, or by means of a combination of them. The following are all valid configurations:
# Removes all essential properties, no matter their schemeIdUri, value or id
mpd:
- manifest_edit.plugins.mpd.descriptor_remove:
periods:
- id : '.*'
adaptationSets:
- '*': '.*'
plugin_config:
name: 'EssentialProperty'
# Removes all essential properties with matching "value"
mpd:
- manifest_edit.plugins.mpd.descriptor_remove:
periods:
- id : '.*'
adaptationSets:
- '*': '.*'
plugin_config:
name: 'EssentialProperty'
value: "true"
If your intent is to modify an existing descriptor (i.e. adding a value attribute to a descriptor that doesn't have one), you can achieve your goal by first removing the descriptor with this plugin, then adding another with the same name, schemeIdUri and the additional value field, using the "descriptor_add" plugin.
You can find this and other additional examples of configuration in the Included Use Cases chapter.