TikTok chunked upload: how many 5-64 MB parts for a 30-minute render

TikTok accepts 1 to 1,000 sequential chunks of 5 to 64 MB. A 1.8 GB file is 28 or 29 chunks at 64 MB. Sizing a Sume render for chunked upload, with a script.

5 min readSume
All posts

The answer

TikTok's media transfer guide lets you upload a video in 1 to 1,000 chunks, each 5 to 64 MB, with the final chunk allowed up to 128 MB, and the chunks must go sequentially. A 1.8 GB file (30 minutes at 8 Mbps, our estimate) is 28 or 29 chunks at 64 MB; with the 128 MB final-chunk allowance the last piece can absorb the remainder.

The chunk count is a function of file size, not of Sume. What Sume decides is the duration, and duration times bitrate gives the size you plan around.

Chunk math

The table uses decimal megabytes and rounds up. Treat it as an estimate and compute from the real file.

Chunks needed at a given chunk size (read 2026-10-03)
File sizeAt 64 MBAt 20 MBAt 5 MB
180 MB (3 min at 8 Mbps)3936
600 MB (10 min at 8 Mbps)1030120
1.8 GB (30 min at 8 Mbps)2990360
4 GB (file cap)63200800

Why 64 MB is not always right

Smaller chunks mean more requests and more places to retry; the guide's 1,000-chunk ceiling caps how small you can go on a big file. At 5 MB, a 4 GB file would need 800 chunks, still within the limit, but it is slower. On an unreliable link, 20 MB chunks trade a few more requests for cheaper retries.

The init call is rate limited too: the direct post reference lists 6 requests per minute per access token on init, so batch uploads of several renders need a queue.

Script

This Python splits a local file into chunk ranges the way the upload init expects (first byte, last byte, total). It only computes ranges and makes no network call.

import os

def plan(path, chunk_mb=64):
    size = os.path.getsize(path)
    chunk = chunk_mb * 1_000_000
    if size < 5_000_000:
        return [(0, size - 1)]
    n = max(1, size // chunk)
    ranges = []
    for i in range(n):
        start = i * chunk
        end = size - 1 if i == n - 1 else start + chunk - 1
        ranges.append((start, end))
    return ranges

if __name__ == '__main__':
    r = plan(__file__)
    print(len(r), r[:2])

Tie-in with the render

Before rendering a long master, run the unbilled plan call on Timeline to read duration_seconds and billable_minutes (Timeline docs). A 30-minute render is 1,800 seconds and $3.00 at $0.10 per rounded-up minute. Then download the MP4 and compute chunk ranges from its real size. The file-cap angle is covered in the 4 GB bitrate post.

Operational notes

Upload chunks in order and wait for each to succeed before sending the next; the guide requires sequential transfer, so parallelism will not help within one video. You can still upload several different videos at once, limited by the init rate of 6 requests per minute per access token.

Keep the chunk ranges in a small state file next to the render output. If the process dies at chunk 17 of 29, you can resume from the recorded position instead of re-planning.

Last, check the container and codec before you chunk. The guide lists MP4 as recommended, with H.264 recommended among H.264, H.265, VP8 and VP9, and 23 to 60 fps. A Timeline render at 24, 25, 30 or 60 fps stays inside that range, so no conversion is needed for frame rate.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume