4.3.5. TemplateDownload

Description

The method returns template in JSON format by its template_id. Template includes a list of tests. Each test is a rule which the probe validates a media file in reliance to. Each test includes severity level, compliance conditions or thresholds and responsible for analyzing a specific parameter or error.

Request

{
  "user_id":(number),
  "methods":[
    {
      "method":"TemplateDownload",
      "params":{
        "project_id":(number),
        "template_id":(number)
      }
    }
  ]
}

where:

  • user_id — an integer value, a user identifier;

  • project_id — an integer value, a user project identifier;

  • template_id — an integer value, a template identifier.

Reply

{
  "reply":[
    {
      "method":"TemplateDownload",
      "result":{
        "template_id":(number),
        "data":{},
        "name":(string),
        "kind":(string),
        "description":(string),
        "created_at":(string),
        "updated_at":(string)
      }
    }
  ]
}

where:

  • template_id — an integer value, a template identifier;

  • data — an object containing the template structure in JSON format. The object contains a list of tests, as well as settings for each test: threshold values and severity levels;

  • name — a string, a template name;

  • kind — a string, internal identifier, the templates value is reserved;

  • description — a string, a template description;

  • created_at — a string, indicates the date and time when the template was created;

  • updated_at — a string, indicates the date and time when the template was last modified.

Example

Request by the cURL utility
Request the template with template_id equals to 10
curl http://172.16.1.41/ctrl_api/v1/json \
 -H "Content-Type: application/json" \
 --data '{"user_id":1,"methods":[{"method":"TemplateDownload","params":{"project_id":2,"template_id":10}}]}'
Reply
 {
   "reply": [
     {
       "method": "TemplateDownload",
       "result": {
         "data": {
           "general": {
             "thumbnail": {
               "enable": false,
               "defaultPeriod": 10,
               "freezePeriod": 10,
               "jpegQuality": 70
             },
             "audioTracksNumber": {
               "value": 1
             },
             "videoTracksNumber": {
               "value": 1
             }
           },
           "priority1": {
             "fileSize": {
               "enable": false,
               "severity": 2,
               "min": 0
             },
             "containerFormat": {
               "enable": true,
               "severity": 4,
               "errorAction": "continue",
               "value": [
                 "MP4"
               ]
             },
             "fileExtension": {
               "enable": true,
               "severity": 2,
               "value": [
                 "mp4",
                 "mov"
               ]
             },
             "videoFormat": {
               "enable": true,
               "severity": 4,
               "errorAction": "continue",
               "value": [
                 "AVC/H.264"
               ]
             },
             "audioFormat": {
               "enable": true,
               "severity": 4,
               "errorAction": "continue",
               "value": [
                 "AAC"
               ]
             },
             "tracksNumber": {
               "enable": true,
               "severity": 3
             },
             "AVStartTimestamp": {
               "enable": true,
               "severity": 2,
               "value": "00:00:00.000"
             },
             "AVEndTimestamp": {
               "enable": false,
               "severity": 3,
               "value": ""
             },
             "videoAudioDurationMismatch": {
               "enable": true,
               "severity": 3,
               "value": 300
             },
             "audioDuration": {
               "enable": false,
               "severity": 3
             },
             "videoDuration": {
               "enable": false,
               "severity": 3
             }
           },
           "priority2": {
             "checkMandatoryMP4Boxes": {
               "enable": true,
               "severity": 4
             },
             "mvhdTimescale": {
               "enable": true,
               "severity": 4
             },
             "AVMetadataMismatch": {
               "enable": true,
               "severity": 3
             },
             "audioTimestampsDiscontinuity": {
               "enable": true,
               "severity": 3,
               "value": 100
             },
             "videoTimestampsDiscontinuity": {
               "enable": true,
               "severity": 3,
               "value": 100
             },
             "mvhdFileDurationDiscrepancy": {
               "enable": true,
               "severity": 3,
               "value": 300
             }
           },
           "priority3": {
             "videoResolution": {
               "enable": true,
               "severity": 3,
               "tracks": [
                 {
                   "id": 1,
                   "value": [
                     "1920x1080"
                   ]
                 }
               ]
             },
             "videoProfileLevel": {
               "enable": true,
               "severity": 3,
               "tracks": [
                 {
                   "id": 1,
                   "MPEG-1": {
                     "profile": "Main",
                     "level": "Main"
                   },
                   "MPEG-2": {
                     "profile": "Main",
                     "level": "Main"
                   },
                   "AVC/H.264": {
                     "profile": "High (100)",
                     "level": "4"
                   },
                   "HEVC/H.265": {
                     "profile": "Main (1)",
                     "level": "4.1"
                   }
                 }
               ]
             },
             "chromaSubsampling": {
               "enable": true,
               "severity": 3,
               "tracks": [
                 {
                   "id": 1,
                   "value": [
                     "4:2:0"
                   ]
                 }
               ]
             },
             "videoBitDepth": {
               "enable": true,
               "severity": 3,
               "tracks": [
                 {
                   "id": 1,
                   "lumaBitDepth": [
                     8
                   ],
                   "chromaBitDepth": [
                     8
                   ]
                 }
               ]
             },
             "entropyCoding": {
               "enable": true,
               "severity": 3,
               "tracks": [
                 {
                   "id": 1,
                   "value": [
                     "CABAC"
                   ]
                 }
               ]
             },
             "scanType": {
               "enable": true,
               "severity": 3,
               "tracks": [
                 {
                   "id": 1,
                   "value": [
                     "Progressive"
                   ]
                 }
               ]
             },
             "scanOrder": {
               "enable": false,
               "severity": 3,
               "tracks": [
                 {
                   "id": 1,
                   "value": [
                     "TFF"
                   ]
                 }
               ]
             },
             "displayAspectRatio": {
               "enable": true,
               "severity": 3,
               "tracks": [
                 {
                   "id": 1,
                   "value": [
                     "16:9"
                   ]
                 }
               ]
             },
             "colorimetricDescription": {
               "enable": false,
               "severity": 3,
               "tracks": []
             },
             "sampleAspectRatio": {
               "enable": true,
               "severity": 3,
               "tracks": [
                 {
                   "id": 1,
                   "value": [
                     "1:1"
                   ]
                 }
               ]
             },
             "afdCodes": {
               "enable": false,
               "severity": 3,
               "tracks": []
             },
             "frameRate": {
               "enable": true,
               "severity": 3,
               "tracks": [
                 {
                   "id": 1,
                   "value": [
                     25
                   ]
                 }
               ]
             },
             "averageBitRate": {
               "enable": false,
               "severity": 3,
               "tracks": []
             },
             "activeFrameRate": {
               "enable": false,
               "severity": 3,
               "tracks": [
                 {
                   "id": 1,
                   "threshold": 0
                 }
               ]
             },
             "bitRateType": {
               "enable": false,
               "severity": 3,
               "tracks": [
                 {
                   "id": 1,
                   "value": [
                     "VBR"
                   ]
                 }
               ]
             },
             "gopLength": {
               "enable": false,
               "severity": 3,
               "tracks": []
             },
             "gopStructure": {
               "enable": false,
               "severity": 3,
               "tracks": [
                 {
                   "id": 1,
                   "m": 0,
                   "n": 0
                 }
               ]
             },
             "closedGOP": {
               "enable": false,
               "severity": 3,
               "tracks": []
             },
             "referenceFrames": {
               "enable": false,
               "severity": 3,
               "tracks": [
                 {
                   "id": 1,
                   "value": 3
                 }
               ]
             },
             "hdrFormat": {
               "enable": false,
               "severity": 3,
               "tracks": []
             },
             "hdr10Metadata": {
               "enable": false,
               "severity": 3,
               "tracks": [
                 {
                   "id": 1,
                   "displayPrimaries[0]": "0.170; 0.797",
                   "displayPrimaries[1]": "0.131; 0.046",
                   "displayPrimaries[2]": "0.708; 0.292",
                   "whitePoint": "0.3127; 0.329",
                   "maxDisplayMasteringLuminance": 1000,
                   "minDisplayMasteringLuminance": 0.005,
                   "maxCLL": 1000,
                   "maxFALL": 400
                 }
               ]
             },
             "videoResolutionChange": {
               "enable": true,
               "severity": 3
             },
             "videoProfileLevelChange": {
               "enable": true,
               "severity": 3
             },
             "chromaSubsamplingChange": {
               "enable": true,
               "severity": 3
             },
             "videoBitDepthChange": {
               "enable": true,
               "severity": 3
             },
             "entropyCodingChange": {
               "enable": true,
               "severity": 3
             },
             "scanTypeChange": {
               "enable": true,
               "severity": 3
             },
             "scanOrderChange": {
               "enable": false,
               "severity": 3
             },
             "colorimetricDescriptionChange": {
               "enable": false,
               "severity": 3
             },
             "displayAspectRatioChange": {
               "enable": true,
               "severity": 3
             },
             "sampleAspectRatioChange": {
               "enable": true,
               "severity": 3
             },
             "afdCodesChange": {
               "enable": false,
               "severity": 3
             },
             "frameRateChange": {
               "enable": true,
               "severity": 3
             },
             "referenceFramesChange": {
               "enable": false,
               "severity": 3
             },
             "hdr10MetadataChange": {
               "enable": false,
               "severity": 3
             },
             "lumaBitDepthChange": {
               "enable": true,
               "severity": 3
             },
             "chromaBitDepthChange": {
               "enable": true,
               "severity": 3
             }
           },
           "priority4": {
             "audioSampleRate": {
               "enable": true,
               "severity": 3,
               "tracks": [
                 {
                   "id": 2,
                   "value": [
                     48000
                   ]
                 }
               ]
             },
             "audioBitDepth": {
               "enable": false,
               "severity": 3,
               "tracks": []
             },
             "audioChannelsNumber": {
               "enable": true,
               "severity": 3,
               "tracks": [
                 {
                   "id": 2,
                   "value": [
                     2
                   ]
                 }
               ]
             },
             "audioProfile": {
               "enable": true,
               "severity": 3,
               "tracks": [
                 {
                   "id": 2,
                   "value": [
                     "LC"
                   ]
                 }
               ]
             },
             "audioLanguage": {
               "enable": false,
               "severity": 3,
               "tracks": []
             },
             "audioLayer": {
               "enable": false,
               "severity": 3,
               "tracks": [
                 {
                   "id": 2,
                   "value": [
                     3
                   ]
                 }
               ]
             }
           },
           "priority5": {
             "videoFreeze": {
               "enable": true,
               "severity": 3,
               "interval": 1000,
               "threshold": 0,
               "psnrThreshold": 42,
               "forceCheck": 0,
               "timeFromStart": 0,
               "timeFromEnd": 0
             },
             "blackFrames": {
               "enable": true,
               "severity": 3,
               "luminance": 16,
               "threshold": 95,
               "interval": 1000,
               "timeFromStart": 0,
               "timeFromEnd": 0
             },
             "сolorFrames": {
               "enable": true,
               "severity": 3,
               "threshold": 90,
               "interval": 1000,
               "timeFromStart": 0,
               "timeFromEnd": 0
             },
             "сolorBars": {
               "enable": true,
               "severity": 3,
               "thresholdI": 40,
               "thresholdII": 10,
               "interval": 1000,
               "timeFromStart": 0,
               "timeFromEnd": 0
             },
             "videoDecodability": {
               "enable": true,
               "severity": 3,
               "mode": "full",
               "threshold": 100
             }
           },
           "priority6": {
             "audioSilence": {
               "enable": true,
               "severity": 3,
               "threshold": -70,
               "timeFromStart": 0,
               "timeFromEnd": 0
             },
             "audioDecodability": {
               "enable": true,
               "severity": 3,
               "threshold": 100
             },
             "momentaryLoudness": {
               "enable": true,
               "severity": 3,
               "target": -23,
               "tolerance": 1
             },
             "shortTermLoudness": {
               "enable": true,
               "severity": 3,
               "target": -23,
               "tolerance": 1
             },
             "loudnessRange": {
               "enable": true,
               "severity": 3,
               "min": 0,
               "max": 6
             },
             "truePeakDetection": {
               "enable": true,
               "severity": 3,
               "level": -1
             },
             "programmeLoudness": {
               "enable": true,
               "severity": 3,
               "target": -23,
               "tolerance": 1
             }
           }
         },
         "name": "default",
         "kind": "templates",
         "description": " ",
         "created_at": "2025-09-16 18:50:54 +0700",
         "updated_at": "2026-03-24 21:09:55 +0700",
         "template_id": 10
       }
     }
   ]
 }