Optimize for faster processing
Learn how you can minimize your video processing time
Why processing speed matters
When you upload a video to FastPix, the goal is simple: get it ready for playback as quickly as possible. We support a wide range of formats and codecs, but not all inputs are equal. If your file already matches our standard input specifications, it can move through our pipeline almost instantly. If it doesn’t, extra processing steps kick in - slowing down turnaround times.
This guide explains how to format your videos for the fastest possible handling, whether you’re preparing files manually, using FFmpeg, or uploading from mobile.
Standard input guidelines
For minimal latency, we recommend the following specifications:
- Video codec: H.264
H.264 is widely supported and optimized for streaming. Other codecs are accepted, but they’ll be converted to H.264 before playback, adding to processing time.
- Closed Group of Pictures (Closed-GOP)
Each GOP should start with an Instantaneous Decoder Refresh (IDR) frame and avoid referencing frames outside its own group. This makes decoding simpler and faster.
- Colour profile: 8-bit 4:2:0 or lower
Most SDR videos meet this standard. HDR or higher bit-depth/chroma videos will be normalized to SDR during processing.
- Edit Decision Lists (EDLs): Keep them simple
Basic EDLs for trimming or reordering are fine. Complex edit instructions may increase processing time.
- Audio codec: AAC
AAC is the recommended audio format. Other codecs will be transcoded to AAC, which can delay processing.
Additional requirements for HD (1080p and below)
If your content will be viewed in 1080p or lower resolution, it must follow these additional specifications:
- Resolution: Must be 2048x2048 pixels or smaller
- Keyframe interval: Should not exceed 20 seconds
- Bitrate: Average bitrate should be below 8Mbps (hard limit: 16Mbps per GOP)
- Frame rate: Must range between 5 and 120 frames per second
Additional Requirements for UHD (4K or 2160p)
For content targeted at 4K (Ultra HD) resolution:
- Resolution: Neither width nor height should exceed 4096 pixels
- Keyframe Interval: Should not exceed 10 seconds
- Bitrate: Keep the average bitrate below 20Mbps
- Frame Rate: Must range between 5 and 60 frames per second
Preparing videos with FFmpeg
If you want your uploads to start playback almost immediately, pre-process them to meet these standards before sending them to FastPix.
HD video (up to 1080p)
Here’s a sample FFmpeg command for preparing HD (1920x1080 or lower) content:
ffmpeg -i input.mp4 -c:a copy -vf "scale=w='min(iw\,1920)':h=-2" -c:v libx264 \
-profile:v high -b:v 7000k -g 239 -pix_fmt yuv420p -maxrate 16000k -bufsize 24000k output_hd.mp4
What this does:
- Scales width to ≤ 1920px (keeps aspect ratio)
- Encodes video in H.264 High profile
- Targets 7 Mbps average bitrate
- Caps peaks at 16 Mbps
- Sets GOP to ~8 seconds at 30 fps
- Ensures 8-bit 4:2:0 pixel format
- Copies AAC audio without re-encoding
UHD / 4K video (up to 2160p)
For 4K or higher resolution content (up to 4096 pixels in any dimension), use this:
ffmpeg -i input.mp4 -c:a copy -vf "scale=w='min(iw\,4096)':h=-2" -c:v libx264 \
-profile:v high -b:v 18000k -g 239 -pix_fmt yuv420p -maxrate 36000k -bufsize 54000k output_4k.mp4
What this does:
- Scales width to ≤ 4096px (keeps aspect ratio)
- Targets 18 Mbps average bitrate (under 20 Mbps limit)
- Caps peaks at 36 Mbps
- Other settings match HD workflow
Tips for encoding
- Use -c:a aac if your audio isn’t already AAC
- Adjust -preset to balance speed and quality (veryfast, fast, slow)
- Use -r 30 to force a consistent frame rate
- For 4K, keep fps ≤ 60 to avoid extra processing
Optimizing mobile video uploads
If you’re using FastPix’s mobile SDKs for iOS or Android, videos recorded on smartphones are automatically pre-processed to match our standard video input format before uploading.
Most recordings are already in H.264, 8-bit, 4:2:0 - so they process quickly. Still, follow these for best results:
- Keep bitrate < 8 Mbps
- Use SDR instead of HDR when possible (HDR uses 10-bit 4:2:2 and needs extra processing)
- Limit resolution to 1080p or 2K
- Set keyframes every 2–10 seconds, ideally ~5 seconds
- Enable closed-GOP encoding
Monitoring processing status
When a media file is uploaded, FastPix may take time to transcode or optimize it if it is not a standard input. You can check progress via the Get a media by ID API.
Example response:
{
"success": true,
"data": {
"id": "cfeec1a3-6cbd-40df-a425-2ed7f8f72ced",
"status": "Ready",
"maxResolution": "1080p",
"sourceResolution": "1080p",
"duration": "00:00:10",
"thumbnail": "https://images.fastpix.io/837f028b-dcaf-4c23-b368-3748641f74ac/thumbnail.png",
// ...other fields
}
}
Status values:
- Preparing – Video is being processed (transcoding, standardizing, optimizing)
- Ready – Fully processed and available for playback
- Failed – Processing error occurred
Updated about 4 hours ago