Probing a Container

When a job is submitted Transform probes each of the input containers. Probing a container determines the file format and the properties of each video, audio and subtitle stream (e.g. width, height, sample rate, etc.).

If the job completes successfully Transform also probes each of the output containers.

You can request the probe results using the inputs and outputs API endpoints. For example use the following command to get the media properties for output1:

curl --location --header 'X-Api-Key: tcs_YOUR_API_KEY' 'https://api.cloud.telestream.net/transform/v1.0/factories/FACTORY_ID/jobs/JOB_ID/outputs/output1'

Note that the request is redirected to a JSON file so you must include the --location flag.

To probe an input file without producing any outputs you submit an "empty" (or "probe") job. An empty job does not reference a template or include a composition. For example use the following command to probe the media file for input1:

curl --location --request POST 'https://api.cloud.telestream.net/transform/v1.0/factories/FACTORY_ID/jobs' \
--header 'X-Api-Key: tcs_YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
  "inputs": {
    "input1": {
      "url": "https://storage.googleapis.com/telestream_media/m2ts/showtime/mp2v_1920x1080p24_in24_8%4048k.mpg"
    }
  }
}'

If the request is successful the response will include a job ID. When the probe job is complete you can request the probe results using the following command:

curl --location --header 'X-Api-Key: tcs_YOUR_API_KEY' 'https://api.cloud.telestream.net/transform/v1.0/factories/FACTORY_ID/jobs/JOB_ID/inputs/input1'

If the probe request is successful the response is a JSON container object describing the file format and each video, audio and subtitle stream. See the Media Containers schema reference for details.

{
  "type": "m2ts",
  "size": 45835975252,
  "duration": "01:27:18.384",
  "manifest": [
    "inputs/input/wicexgeyuihmvolujmofjxlmfganudei.mpg"
  ],
  "properties": {
    "Id": 0,
    "ProgramNumbers": [
      1
    ],
    "ProgramNumber": 1,
    "PmtPid": 480,
    "PcrPid": 481
  },
  "video": [
    {
      "format": "mp2v",
      "sample_rate": {
        "numerator": 24000,
        "denominator": 1001
      },
      "duration": 125721221,
      "bit_rate": 50016800,
      "language": "und",
      "region": "@@@",
      "width": 1920,
      "height": 1080,
      "clean_aperture": {
        "left": 0,
        "right": 0,
        "top": 0,
        "bottom": 0
      },
      "orientation": {
        "rotation": 0,
        "mirrored": false
      },
      "field_order": "progressive",
      "pixel_aspect_ratio": {
        "numerator": 1,
        "denominator": 1
      },
      "bit_depth": 8,
      "chroma_subsampling": {
        "horizontal": 2,
        "vertical": 1
      },
      "chroma_location": "cosited",
      "color_primaries": 1,
      "transfer_characteristics": 1,
      "matrix_coefficients": 1,
      "video_range": "narrow",
      "reference_black": 0.000000,
      "reference_white": 1.000000,
      "properties": {
        "MpegTimeCode": "00:00:00:00",
        "Mpeg2ProfileAndLevel": 130,
        "MpegVbvBufferSize": 47218688,
        "Mpeg2TransportStreamPid": 481
      },
      "extension": [
        {
          "type": "mp2v",
          "horizontal_size_value": 1920,
          "vertical_size_value": 1080,
          "aspect_ratio_information": 3,
          "frame_rate_code": 1,
          "bit_rate_value": 125042,
          "vbv_buffer_size_value": 834,
          "load_intra_quantizer_matrix_flag": false,
          "load_non_intra_quantizer_matrix_flag": false,
          "profile_and_level_indication": 130,
          "progressive_sequence": true,
          "chroma_format": 2,
          "horizontal_size_extension": 0,
          "vertical_size_extension": 0,
          "bit_rate_extension": 0,
          "vbv_buffer_size_extension": 2,
          "low_delay": false,
          "frame_rate_extension_n": 0,
          "frame_rate_extension_d": 0,
          "drop_frame_flag": false,
          "time_code_hours": 0,
          "time_code_minutes": 0,
          "time_code_seconds": 0,
          "time_code_pictures": 0,
          "closed_gop": true,
          "broken_link": false,
          "$annotation": {
            "type": "MPEG-2 Video (ISO 13818-2)",
            "profile_and_level_indication": "4:2:2 [email protected] Level",
            "chroma_format": "4:2:2"
          }
        }
      ],
      "$annotation": {
        "format": "MPEG-2",
        "sample_rate": "23.976 fps",
        "duration": "01:27:18.384",
        "bit_rate": "50.017 Mbit/s",
        "clean_aperture": "1920x1080",
        "pixel_aspect_ratio": "1:1",
        "chroma_subsampling": "4:2:2",
        "color_primaries": "ITU-R BT.709-5",
        "transfer_characteristics": "ITU-R BT.709-5",
        "matrix_coefficients": "ITU-R BT.709-5",
        "reference_black": "0.00%",
        "reference_white": "100.00%"
      }
    }
  ],
  "audio": [
    {
      "format": "in24",
      "sample_rate": {
        "numerator": 48000,
        "denominator": 1
      },
      "duration": 251442442,
      "bit_rate": 9216000,
      "language": "und",
      "region": "@@@",
      "channels": 8,
      "label": [
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        ""
      ],
      "coding": [
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        ""
      ],
      "bits_per_sample": 24,
      "properties": {
        "LpcmTransport": "BSSD",
        "Mpeg2TransportStreamPid": 482,
        "Mpeg2FormatIdentifier": "BSSD"
      },
      "extension": [
        {
          "type": "mp2l",
          "language": [
            {
              "language_code": "und",
              "audio_type": 0
            }
          ],
          "$annotation": {
            "type": "MPEG-2 Language Descriptor (ISO 13818-1)"
          }
        }
      ],
      "$annotation": {
        "format": "PCM, 24-Bit Big-Endian Signed Integer",
        "sample_rate": "48.0 kHz",
        "duration": "01:27:18.384",
        "bit_rate": "9.216 Mbit/s"
      }
    }
  ],
  "subtitle": [
  ],
  "$annotation": {
    "type": "MPEG-2 Transport Stream",
    "size": "45.836 GB"
  }

Did this page help you?