Skip to content
Navigation

Get one media file with what was measured in it

One ready file (as in GET /v1/media) with the analysis made when it was prepared, by FFmpeg and without any AI model: for footage the hard cuts and a contact sheet of numbered, timed stills (frames_url, valid for a short time); for anything with sound the silences of 0.3 s or more and the integrated loudness. Speech is transcribed automatically (whisper.cpp, run by Mosio) by a job of its own once the file is ready: transcript has the language, the phrases and every word with its start and end; it can mishear names and prices. Times are seconds into the file. Files prepared before the analysis existed are measured once (analysis_status: processing). Needs the videos:read permission.

GET
https://app.mosio.me/v1/media/{id}

Authorization

  • apiKeyAPI key in headerrequired

Path parameters

  • idstringrequired

    The file's id (upl_…) or its path (assets/media/upl_….mp4).

Returns

200

The file and its analysis.

JSON
  • mediaobjectrequired
    • idstringrequired
    • kindimageorvideooraudiorequired
    • filenamestringrequired
    • pathstringrequired

      Where a composition loads it.

    • duration_secondsnumber | nullrequired
    • widthinteger | nullrequired
    • heightinteger | nullrequired
    • has_audiobooleanrequired
    • created_atstringrequired
      format: date-time
  • analysisrequired

    One of the following:

    • MediaAnalysis
      • scenesarray ofnumberrequired

        Hard cuts (scene changes) in the footage.

      • framesarray ofobjectrequired

        The stills on the contact sheet, numbered as labelled on it.

        • indexintegerrequired
        • tnumberrequired
      • sheetobject | nullrequired

        The contact sheet's grid, read left to right and top to bottom.

        • columnsoptionalinteger
        • rowsoptionalinteger
        • tile_widthoptionalinteger
        • tile_heightoptionalinteger
      • silencesarray ofarray<number>required

        [start, end] of every stretch of 0.3 s or more below the silence threshold.

      • audioobject | nullrequired

        RMS levels per 0.05 s (dBFS). Not reliable when the loud parts stand less than 8 dB above the noise floor; then no silences are listed.

        • floor_dboptionalnumber
        • speech_dboptionalnumber
        • threshold_dboptionalnumber
        • reliableoptionalboolean
      • loudness_lufsnumber | nullrequired

        Integrated loudness (EBU R128).

    • null
  • analysis_statusreadyorprocessingorfailedornonerequired

    none: a photo, or a file not measured yet.

  • transcriptrequired

    What was said; null for photos, silent footage, and until transcribed.

    One of the following:

    • object
    • null
  • transcript_statusreadyorprocessingorfailedornonerequired

    none: no sound (a photo, silent footage), or not queued yet.

  • cutoutsarray ofobjectrequired

    People cut out of stretches of this video (POST /v1/media/{id}/cutouts), newest first.

    • idstringrequired
    • media_idstringrequired

      The video it was cut from.

    • pathstringrequired

      The path a composition uses for the cutout clip.

    • fromnumberrequired
    • tonumberrequired
    • duration_secondsnumberrequired
    • statusprocessingorreadyorfailedrequired
    • errorstring | nullrequired

      Why it failed, for the user.

    • poster_urlstring | nullrequired

      A still from the middle, transparent around the person (short-lived URL).

    • widthinteger | nullrequired
    • heightinteger | nullrequired
    • snippetstring | nullrequired

      A ready-to-paste base clip, text and cutout clip for this stretch.

    • created_atstringrequired
      format: date-time
  • frames_urlstring | nullrequired

    The contact sheet (JPEG), when there is one.

401

The API key is missing or not valid.
JSON
  • errorunauthorizedorinvalid_api_keyorinsufficient_scopeorforbiddenorinvalid_inputorinvalid_composition+8 morerequired

    A stable error code.

  • messagestringrequired

    A message for people, in Indonesian.

  • detailsoptionalunknown

    More about the error, such as the fields to fix.

404

No such video or file in this workspace.
JSON
  • errorunauthorizedorinvalid_api_keyorinsufficient_scopeorforbiddenorinvalid_inputorinvalid_composition+8 morerequired

    A stable error code.

  • messagestringrequired

    A message for people, in Indonesian.

  • detailsoptionalunknown

    More about the error, such as the fields to fix.

409

The file is still being prepared, or its preparation failed (media_not_ready).
JSON
  • errorunauthorizedorinvalid_api_keyorinsufficient_scopeorforbiddenorinvalid_inputorinvalid_composition+8 morerequired

    A stable error code.

  • messagestringrequired

    A message for people, in Indonesian.

  • detailsoptionalunknown

    More about the error, such as the fields to fix.

Type to search…

↑↓ navigate↵ selectEsc close