YouTube videos.list processingDetails: poll a Short until processed

After videos.insert, poll videos.list with part=processingDetails to see processingStatus and progress. It costs 1 unit and works only for the video's owner.

5 min readSume
All posts

To know when an uploaded Short has finished processing, call videos.list with part=processingDetails and read processingDetails.processingStatus. It is processing while YouTube works, succeeded when it is done, failed if it broke, and terminated when the information is no longer available. A call costs 1 quota unit, and the processingDetails part is only available to the video's owner.

Why bother: a step that depends on the processed video, such as setting a custom thumbnail from a Sume frame or posting the link in a campaign, should wait for succeeded instead of guessing. Sume makes the file; this check belongs in your upload script.

What does processingDetails contain?

The videos resource page defines the fields below.

processingDetails fields (YouTube Data API videos resource page, read 2026-10-03)
FieldValues or meaning
processingStatusprocessing, succeeded, failed, terminated
processingProgress.partsTotalEstimate of the total parts to process
processingProgress.partsProcessedParts YouTube has already processed
processingProgress.timeLeftMsEstimated milliseconds left
processingFailureReasontranscodeFailed, uploadFailed, streamingFailed, other (when status is failed)

How much does polling cost?

The videos.list reference says a call costs 1 unit and that fileDetails, processingDetails and suggestions are available only to the video's owner. The quota page puts the default at 10,000 units per day for the shared bucket, with videos.insert and search.list in their own buckets. Polling therefore competes with calls like thumbnails.set and the captions methods, not with the upload bucket.

Even at 1 unit, a 5-second loop on 30 videos adds up. Poll with a growing delay and use timeLeftMs as a hint, then stop at a terminal status.

import time

def wait_processed(get_status, video_id, max_wait=900):
    """get_status(video_id) returns processingDetails as a dict."""
    delay, waited = 5, 0
    while waited < max_wait:
        details = get_status(video_id)
        status = details.get("processingStatus")
        if status == "succeeded":
            return details
        if status in ("failed", "terminated"):
            reason = details.get("processingFailureReason", "unknown")
            raise RuntimeError(f"{video_id}: {status} ({reason})")
        time.sleep(delay)
        waited += delay
        delay = min(delay * 2, 60)
    raise TimeoutError(video_id)

Upload status is not processing status

Do not confuse the two. status.uploadStatus tracks the upload phase and can be uploaded, processing, processed, failed, rejected or deleted. processingDetails is the detailed view, with progress counters. Read both parts in one call with part=status,processingDetails for 1 unit and branch on whichever you need. A rejected upload is not a processing failure; check the failure-reason post for that case.

What to do with a failed Short

If processingFailureReason is transcodeFailed, the likely first move is to inspect the file you sent. Video inspect probes a Sume-hosted clip for container, codec, pixel format and duration, and it does not re-encode it. Compare those with what you expected, and if the file looks wrong, re-export it and upload again. The docs do not claim that any particular codec fix resolves transcodeFailed, so treat the probe as evidence, not a cure.

Once the status is succeeded, pull a still with video frames and attach it as the thumbnail; the thumbnail quota post covers the cost.

  • Poll processingDetails only for videos you own.
  • Stop on succeeded, failed or terminated.
  • Log processingFailureReason with the Sume job id that made the file.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume