19 March 2024

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"?>
    <userid>[UserID]</userid> <!-- required-->
    <userkey>[UserKey]</userkey> <!-- required-->
    <action>[Action]</action> <!-- required-->
        <!-- format params -->
  "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 NameDescriptionAllowed ValuesDefault Values
set_video_durationForce 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, nono