19 March 2024
9 months ago by ReadMe API
Force set video duration to output update
Updated the logic of the set_video_duration API parameter, so it works for all cases when the audio duration is less than, more than, or equal to the video duration.
<?xml version="1.0"?>
<query>
<userid>[UserID]</userid> <!-- required-->
<userkey>[UserKey]</userkey> <!-- required-->
<action>[Action]</action> <!-- required-->
<source>[FileURL]</source>
<format>
<output>[OutputFormat]</output>
<set_video_duration>[yes|no]</set_video_duration>
<!-- format params -->
</format>
</query>
{
"query": {
"userid": "[UserID]", // required
"userkey": "[UserKey]", // required
"action": "[Action]", // required
"source": "[FileURL]", // required
"format": {
"output": "[OutputFormat]", // required
"set_video_duration": "[yes|no]"
// format params
}
}
}
Field Name | Description | Allowed Values | Default Values |
---|---|---|---|
set_video_duration | Force set audio to video duration in output. This allows to precisely align durations of video and audio streams. If audio is longer, by trimming the output audio stream to the output video duration. If audio is shorter, by padding audio with silence to the output video duration. This parameter works only with MP4 container and aac, libfaac audio codecs. | yes, no | no |