Video transcoding for social media publishing
Why video often needs transcoding before it can be published across platforms, and what that pipeline actually involves.
One video file won't pass every platform's upload checks, because each platform independently validates container, codec, size, and duration — LinkedIn's API accepts video/mp4 only, and Instagram caps video at 300 MB and 3 seconds to 15 minutes. PostGate re-encodes anything that isn't already H.264/AAC into H.264/AAC/yuv420p MP4 with faststart; aspect ratio and resolution remain your responsibility.
A video file that plays perfectly on your laptop and previews fine in your editor isn't guaranteed to be accepted by every platform you publish it to. "Video" isn't one format — it's a container, a video codec, an audio codec, a pixel format, and a handful of encoding details that each platform's upload pipeline checks independently, and they don't all check for the same thing.
PostGate handles OAuth, publishing and delivery evidence for every network through one API. Start free or read the docs.
Why doesn't the same file just work everywhere?
Platform media requirements diverge in ways that are easy to miss until a specific upload fails. LinkedIn's documented Images/Videos API accepts video/mp4 only — no .mov, despite .mov being a common export format from editing tools. Instagram, Facebook, Threads, TikTok, YouTube, and Pinterest are all more permissive at the container level, but each still enforces its own byte-size ceiling and duration range — Instagram video, for example, is capped at 300 MB and a 3-second-to-15-minute range on a Reels-style container. A video encoded once for "the internet in general" can clear every one of those checks on four platforms and get rejected outright on the fifth, for a reason that has nothing to do with the content and everything to do with the container it's wrapped in.
What does "transcoding" actually involve?
Transcoding is broader than just changing the codec. A full normalization pass typically covers: a codec swap (HEVC or ProRes footage re-encoded to the far more universally-accepted H.264), a container remux (repackaging .mov into .mp4 without necessarily re-encoding the video stream inside it), pixel format normalization (converting 10-bit or 4:2:2 chroma subsampling that many editing tools output down to the 8-bit yuv420p that mobile decoders universally support), audio codec normalization to AAC, and moov-atom relocation — commonly called "faststart" — which moves a metadata block from the end of the file to the beginning so playback and server-side processing can begin before the whole file has downloaded.
What does PostGate's media pipeline actually do today?
PostGate's media pipeline detects the true MIME type of an uploaded video, probes its dimensions and duration, and validates the source codec before accepting it. For codec normalization specifically: a source that already arrives as H.264 video with AAC (or no) audio is left encoded as-is; anything else gets re-encoded into that same H.264/AAC/yuv420p combination inside an MP4 container, with the faststart flag applied and source metadata stripped, before it's stored and made available to publish. What that pipeline does not currently do is generate separate per-platform resolution, aspect-ratio, or bitrate variants for video — that per-destination rendition step exists for images today, but a video target receives the same normalized file regardless of which platform it's headed to.
Why are resolution and aspect ratio still your responsibility?
Codec and container problems are handled for you; framing problems are not. If your source is a 16:9 landscape recording and the destination expects a vertical placement, PostGate won't crop, pad, or reframe it — it publishes the file at the aspect ratio you gave it, and the platform decides how to display something outside its expected range (commonly letterboxing or center-cropping it). Get the framing right before you upload, with a preprocessing step of your own — converting a video to a Reels-compatible 9:16 with ffmpeg walks through exactly that.
A quick checklist for where the responsibility actually sits
An unusual source codec or the wrong container — HEVC, ProRes, a .mov headed to a platform that only documents .mp4 — is handled automatically; upload it as-is. The wrong aspect ratio or resolution for where it's going is not handled automatically; pre-process it yourself first. A file over a specific platform's size or duration ceiling won't be trimmed or compressed for you either — check the platform capability matrix for the actual limit and cut it down before upload, or expect a media_invalid rejection at validation time.
Frequently asked questions
Why was my video rejected by one platform but accepted by the others?
Platform media requirements diverge in ways that are easy to miss until a specific upload fails. LinkedIn’s documented Images/Videos API accepts video/mp4 only — no .mov. Instagram, Facebook, Threads, TikTok, YouTube, and Pinterest are more permissive at the container level, but each enforces its own byte-size ceiling and duration range. A video encoded once for "the internet in general" can clear four platforms and get rejected on the fifth because of its container, not its content.
Does PostGate transcode videos automatically?
Partly. PostGate detects the true MIME type, probes dimensions and duration, and validates the source codec. A source already arriving as H.264 video with AAC (or no) audio is left encoded as-is; anything else is re-encoded to H.264/AAC/yuv420p inside an MP4 container, with the faststart flag applied and source metadata stripped. It does not generate separate per-platform resolution, aspect-ratio, or bitrate variants for video.
Will PostGate crop or reframe my video for vertical placements?
No. If your source is a 16:9 landscape recording and the destination expects a vertical placement, PostGate publishes the file at the aspect ratio you gave it, and the platform decides how to display it — commonly letterboxing or center-cropping. Get the framing right before upload with your own preprocessing step, such as converting to 9:16 with ffmpeg.
What is the faststart flag (moov-atom relocation)?
Faststart moves a metadata block — the moov atom — from the end of the file to the beginning, so playback and server-side processing can begin before the whole file has downloaded. PostGate applies it as part of its normalization pass when it re-encodes a video into the H.264/AAC MP4 combination.
What happens if my video exceeds a platform's size or duration limit?
It won’t be trimmed or compressed for you. A file over a specific platform’s size or duration ceiling — for example Instagram video’s 300 MB cap and 3-second-to-15-minute range — gets rejected with a media_invalid error at validation time. Check the platform capability matrix for the actual limit and cut the file down before upload.
