Creators · 4 min read

Set a gameplay clip file size budget before you export

Fit a highlight under a byte limit without guessing at a quality slider. Work through an eight-second drive, budget for sound and check the actual finished file.

No spoilers
Updated Published By the gtavids editors
A USB flash drive with its connector exposed

Work out your gameplay clip file size before choosing an export preset. Start with the number of bytes the destination accepts, subtract some headroom, divide the remaining bits by the length of the highlight and allocate part of that rate to sound. The final check is the size of the actual exported file. For an eight-second drive with an editorial limit of 1,000,000 bytes, our higher-rate export occupied 954,457 bytes. Its smaller counterpart occupied 541,746. Both kept the same running time, sound setting and picture dimensions.

Eight-second example Lower-rate copy Higher-rate copy
Requested video rate 420 kilobits/s 825 kilobits/s
Requested audio rate 96 kilobits/s 96 kilobits/s
Measured file size 541,746 bytes 954,457 bytes
Room under our limit 458,254 bytes 45,543 bytes

Start with the receiving end

A friend asks for the part of your drive where you take the wrong exit. You have the full recording and want to send a file they can open directly. Read the attachment limit on the destination you will actually use. A server, subscription or message type can have its own rules. Our one-million-byte ceiling was a deliberately tight test budget. It says nothing about what a particular chat service accepts today.

Get the time span from the start and end of your intended excerpt. If the action begins several minutes into a recording, the length of the entire session is the wrong denominator. If someone needs to see the sign before the exit, include that lead-in when measuring the duration. Cutting it out after an oversized export changes the story. A slightly smaller upload that hides the road sign also misses the point. For finding the original console file, start with our capture guide.

Use exact bytes if the interface supplies them. A decimal megabyte is one million bytes, while a mebibyte is 1,048,576 bytes. Eight bits make a byte. This looks academic until a copy lands a few thousand bytes above a hard ceiling. The apparent size rounded to one decimal place in a file manager is too coarse to settle that question.

Divide the budget between picture and sound

For eight seconds at one million bytes, the theoretical ceiling is one million bits per second for everything in the file. Eight million bits divided by eight seconds gives that result. In our higher-rate trial the requested video and audio rates totaled 921,000 bits per second. That left roughly 79,000 bits per second of nominal room for container overhead and the encoder missing its target. Eight seconds at the combined target would amount to 921,000 bytes before overhead and variation. The actual output was larger.

That arithmetic gives you a starting setting. For a 20-second highlight under the same limit the aggregate ceiling drops to 400,000 bits per second. Keeping a 96,000-bit audio target would leave roughly 304,000 for picture and overhead together. If the signs or HUD are already difficult to read, decide whether the recipient needs all 20 seconds. If so, a larger permitted delivery method may make more sense than squeezing the picture again.

Make a measured two-pass copy

We took the same eight seconds of the licensed SuperTuxKart benchmark for both encodes. Our intermediate had a 640-by-360 picture at 30 frames per second. The two-pass encoder first analyzed the picture sequence, then used its statistics to allocate the requested video rate over those frames. Use a new working directory. The first pass creates statistics files there, even though it sends its video output to a null sink. Use a separate pass-log prefix for each job if more than one encode is running. FFmpeg command-line reference

ffmpeg -i "master.mp4" -c:v libx264 -b:v 825k -passlogfile budget825 -pass 1 -an -f null -
ffmpeg -i "master.mp4" -c:v libx264 -b:v 825k -passlogfile budget825 -pass 2 -c:a aac -b:a 96k "send-825.mp4"

These commands assume an input already cut to the correct duration with one wanted picture and one wanted sound track. When starting with a longer session, first make your highlight master. Changing the crop, duration or selected video between passes invalidates the comparison. For the lower-rate test we used 420k in both commands, a different pass-log prefix and a new output name. Keeping the dimensions fixed helped isolate the effect of the bitrate choice.

Weigh the result and inspect the hardest moment

Use a precise file-size readout or the following probe. The size field is a byte count for the container. The duration lets you catch the case where the file fit simply because the export ended early. ffprobe documentation

ffprobe -v error -show_entries format=duration,size -of default=nw=1 "send-825.mp4"

A small file still has to explain the play. Compare the same difficult stretch in the master and the copy at the size your recipient will watch. Look for the lettering or turn marker you actually need, listen for the cue that explains your reaction and verify the last frame is present. That inspection determines whether the lower-rate candidate is usable. Our two byte counts alone cannot tell you which encoding looks acceptable on someone else's phone.

If your measured file misses the cap, use the amount of the miss to choose a new target, then rerun both passes. As a rough budget correction, an extra 40,000 bytes over eight seconds represents 40,000 bits per second. Reduce the requested video rate by more than that if the destination rejects even a one-byte overage. Keep duration and audio settings fixed during that retry so you can tell which adjustment helped.

Frequently asked questions

Does changing the extension make the file smaller?

Renaming the file does not change its contents. You need fewer seconds, fewer encoded bits, or both.

Can I use a platform limit in megabytes directly?

First establish what the destination accepts in bytes. Decimal MB and binary MiB give different budgets.

Why leave room below the limit?

The container has overhead, and an encoder can miss a target, especially on a short excerpt. Measure the completed file.

Keep reading

All articles →
Make a clip

Turn your GTA 6 stream into Shorts and TikToks.

Have a finished Twitch broadcast you own or have permission to edit? Oakgen, our clipping partner, can scan it for highlights.

Make a clip →