30 January 2020
almost 5 years ago by Encoding.com Product Team #2
Single SegmentTemplate for Dash Manifest
Added option to use Single SegmentTemplate in DASH manifests in advanced_dash and advanced_fmp4 output formats.
<?xml version="1.0"?>
<query>
<userid><<id>></userid> <!-- required-->
<userkey><<key>></userkey> <!-- required-->
<action>[Action]</action> <!-- required-->
<source>[SourceFile]</source> <!-- required-->
<format>
<output>[advanced_dash|advanced_fmp4]</output> <!-- required-->
<destination>[DestinationURL]</destination> <!-- required-->
<manifest>
<single_segment_template>[yes|no]</single_segment_template>
<!-- manifest params -->
</manifest>
<!-- Multiple manifests may be included -->
<manifest>
<!-- manifest params -->
</manifest>
<!-- Format parameters -->
</format>
</query>
{
"query": {
"userid": "<<id>>", // required
"userkey": "<<key>>", // required
"action": "[Action]", // required
"source": "[SourceFile]", // required
"format": {
"output": "[advanced_dash|advanced_fmp4]", // required
"destination": "[DestinationURL]", // required
"manifest": [
{
"single_segment_template": "[yes|no]"
// manifest params
}
// Multiple manifests may be included
]
// Format params
}
}
}
Parameters | Description | Allowed Values | Default Value |
---|---|---|---|
single_segment_template | Use Single SegmentTemplate per AdaptationSet. | yes, no | no |
For single_segment_template parameter
<single_segment_template /> parameter available only for advanced_dash and dash manifests of advanced_fmp4 output formats.
Applicable only if all Representations in AdaptationSet are segment aligned, and output is segmented (used live_static <dash_profile /> for advanced_dash or <split_segments /> enabled for advanced_fmp4).
Duration in GetMediaInfo and GetMediaInfoEx
Duration in GetMediaInfo and GetMediaInfoEx now contains microseconds. Also, added new duration string formats.
GetMediaInfo
Request
<?xml version="1.0"?>
<query>
<userid><<id>></userid>
<userkey><<key>></userkey>
<action>GetMediaInfo</action>
<mediaid>[MediaID]</mediaid> <!-- REQUIRED -->
</query>
{
"query": {
"userid": "<<id>>",
"userkey": "<<key>>",
"action": "GetMediaInfo",
"mediaid": "[MediaID]"
}
}
Response
<?xml version="1.0"?>
<response>
<!-- media info -->
<duration>[DirationInSeconds]</duration>
<duration_timestamp>[DirationTimestamp]</duration_timestamp>
<duration_hms>[DirationHMS]</duration_hms>
<video_duration>[DirationInSeconds]</duration>
<video_duration_timestamp>[DirationTimestamp]</video_duration_timestamp>
<video_duration_hms>[DirationHMS]</video_duration_hms>
<audio_duration>[DirationInSeconds]</audio_duration>
<audio_duration_timestamp>[DirationTimestamp]</audio_duration_timestamp>
<audio_duration_hms>[DirationHMS]</audio_duration_hms>
</response>
{
"response": {
// media info
"duration": "[DirationInSeconds]",
"duration_timestamp": "[DirationTimestamp]",
"duration_hms": "[DirationHMS]",
"video_duration": "[DirationInSeconds]",
"video_duration_timestamp": "[DirationTimestamp]",
"video_duration_hms": "[DirationHMS]",
"audio_duration": "[DirationInSeconds]",
"audio_duration_timestamp": "[DirationTimestamp]",
"audio_duration_hms": "[DirationHMS]"
}
}
Parameter | Description |
---|---|
duration | Tracks duration in seconds |
duration_timestamp | Tracks duration in HH:mm:ss:SSS format. |
duration_hms | Tracks duration in HHh mmmn sss SSSms format. |
video_duration | Video tracks duration in seconds |
video_duration_timestamp | Video tracks duration in HH:mm:ss:SSS format. |
video_duration_hms | Video tracks duration in HHh mmmn sss SSSms format. |
audio_duration | Audio tracks duration in seconds |
audio_duration_timestamp | Audio tracks duration in HH:mm:ss:SSS format. |
audio_duration_hms | Audio tracks duration in HHh mmmn sss SSSms format. |
Timestamp format notation
- HH – hours
- mm – minutes
- ss – seconds
- SSS – microseconds
GetMediaInfoEx
Request
<?xml version="1.0"?>
<query>
<userid><<id>></userid>
<userkey><<key>></userkey>
<action>GetMediaInfoEx</action>
<mediaid>[MediaID]</mediaid> <!-- required -->
</query>
{
"query": {
"userid": "<<id>>",
"userkey": "<<key>>",
"action": "GetMediaInfoEx",
"mediaid": "[MediaID]", // required
"consistentarrays": "[1|0]"
}
}
Response
<?xml version="1.0"?>
<response>
<Mediainfo version="[mediainfo version]">
<File>
<track type="[TrackType]">
<!-- track parameters -->
<Duration>[DurationHMS]</Duration>
<Duration_seconds>[DurationInSeconds]</Duration_seconds>
<Duration_timestamp>[DurationTimestamp]</Duration_timestamp>
</track>
<!-- multiple tracks -->
<track type="[TrackType]">
<!-- ... -->
</track>
</File>
</Mediainfo>
</response>
{
"response": {
"Mediainfo": {
"File": {
"track": [
{
"@attributes": {"type": "[TrackType]"},
// track parameters
"Duration": "[DurationHMS]",
"Duration_seconds": "[DurationInSeconds]",
"Duration_timestamp": "[DurationTimestamp]"
},
// multiple tracks
{
"@attributes": {"type": "[TrackType]"}
},
]
}
}
}
}
Parameter | Description |
---|---|
Duration | Tracks duration in HHh mmmn sss SSSms format. |
Duration_seconds | Tracks duration in seconds. |
Duration_timestamp | Tracks duration in HH:mm:ss:SSS format. |
Timestamp format notation
- HH – hours
- mm – minutes
- ss – seconds
- SSS – microseconds