Español · Transparent video test · Roadmap
Seven ffmpeg scripts for the last step of every motion project: delivering it. Web hero loops, transparent video that works in every browser, GIF and animated WebP, image sequences, and uploads for Reels, TikTok, Shorts, YouTube and LinkedIn.
The gap it fills. A beautiful animation can still ship as a 40 MB GIF, a hero video with a black box where the transparency should be, or a Reel that the platform crushes because of the wrong frame rate or colour tags. The right ffmpeg settings exist, but they are scattered across forum answers, change with every browser release and are easy to get subtly wrong. These scripts bake in the settings, check themselves on synthetic videos in CI, and explain their choices.
brew install ffmpeg webp # Linux: sudo apt install ffmpeg webp
git clone https://github.com/soylepanke/motion-delivery
export PATH="$PWD/motion-delivery/bin:$PATH"
md-hero render.mov --width 1920 # hero.mp4 + hero.webm + poster
md-alpha logo.mov # logo.webm + logo.mov (alpha) + the <video> snippet
md-social film.mov reels --fit blur # 1080×1920 upload for InstagramEvery script has --help. They are plain Bash (they run with the bash 3.2 that ships with macOS) and need nothing but ffmpeg.
| Script | Input | Output |
|---|---|---|
md-hero |
any video | MP4 (H.264, no audio, faststart) + WebM (VP9, or AV1 with --av1) + poster JPG |
md-alpha |
ProRes 4444, PNG sequence… | WebM VP9 with alpha + HEVC with alpha (macOS) + HTML snippet |
md-gif |
any video | GIF with its own palette (palettegen / paletteuse), transparency kept |
md-webp |
any video | animated WebP, lossy or lossless |
md-seq2vid |
frame_%04d.png or "frames/*.png" |
H.264 MP4, or ProRes 4444 when the PNGs have alpha |
md-vid2seq |
any video | PNG (alpha kept) or JPG frames, with range and fps |
md-social |
any video + preset | H.264/AAC upload, re-framed by crop, bars or blurred fill |
There is no single file that keeps its transparency in every browser:
| WebM VP9 with alpha | HEVC with alpha | |
|---|---|---|
| Chrome, Edge, Firefox (desktop) | ✓ | — |
| Safari (macOS, iOS) | plays, but without the alpha | ✓ (Safari 13+, macOS 10.15+, iOS 13+) |
So md-alpha makes both and writes this snippet. HEVC goes first, otherwise Safari picks the WebM and loses the alpha:
<video autoplay muted loop playsinline>
<source src="logo.mov" type='video/quicktime; codecs="hvc1.1.6.H120.b0"'>
<source src="logo.webm" type='video/webm; codecs="vp09.00.41.08"'>
</video>What is still open, as of 30 November 2026:
- WebKit fixed VP9 alpha on 10 November 2026 (bug 275908), but no stable Safari includes it yet.
- On Windows, Chrome and Edge can decode HEVC in hardware and could pick the
.movand show it without alpha. This is reported but not confirmed. - AV1 has no alpha channel in browsers.
- HEVC with alpha needs Apple’s VideoToolbox encoder, so it can only be made on a Mac. On Linux,
md-alphamakes the WebM only.
When it has to look identical everywhere, use stacked alpha: colour and alpha in one ordinary video, put back together with WebGL. See Jake Archibald’s Video with alpha transparency on the web and the stacked-alpha-video element. It is on the roadmap.
Test your browser: soylepanke.github.io/motion-delivery shows which file it picked and whether the background shows through.
md-social --list shows them all. They live in presets/social.conf, one line each, so they are easy to update.
| Preset | Size | fps | Notes |
|---|---|---|---|
reels |
1080×1920 | 30 | MP4/MOV, H.264, AAC 128 kbps or more. Reels over 3 min are not recommended to non-followers |
tiktok |
1080×1920 | 30 | H.264 recommended, 23–60 fps |
shorts |
1080×1920 | 30 | Vertical or square, up to 3 minutes |
youtube / youtube-60 / youtube-4k |
1920×1080 / 1920×1080 / 3840×2160 | 30 / 60 / 30 | Bitrate caps from YouTube’s table: 8, 12 and 45 Mbps; AAC 384 kbps stereo, 48 kHz |
linkedin-landscape / -square / -portrait |
1920×1080 / 1080×1080 / 1080×1350 | 30 | Posts: 10–60 fps, up to 30 Mbps, 3 s–15 min. Ads ask for under 30 fps |
Every export uses H.264 High, yuv420p, BT.709 colour tags, a closed GOP of half a second, 2 B-frames, AAC 48 kHz stereo and faststart. If the source has no audio, a silent track is added.
Checked on 30 November 2026 against:
- YouTube upload encoding settings and Shorts length
- Instagram Reels ad specs
- TikTok video ad specs and the TikTok Content Posting API
- LinkedIn video posts and LinkedIn video ads
For Instagram and TikTok, only the ad and developer pages could be read. Limits for regular posts (maximum length and file size) are to be verified in the apps. Platforms change these often: please open an issue when they do.
| You need… | Use | Why |
|---|---|---|
| UI motion: hovers, entrances, page transitions | CSS (see web-motion-recipes) | No files to download, sharp at any size, respects reduced motion, easy to change |
| Vector illustration animated in After Effects, small and crisp | Lottie / dotLottie | Shapes and keyframes as data, rendered by a player. dotLottie is the compressed package. Not every AE effect exports |
| Interactive vector animation: states, input, logic | Rive | Its runtime plays state machines that react to the user. Designed in Rive’s own editor |
| Footage, 3D, particles, grain, anything rasterised | Video (md-hero) |
Any look at all, a predictable file size, no runtime. Not interactive; fixed resolution |
| That, over a background you do not control | Video with alpha (md-alpha) |
Real transparency, at the cost of two files and the browser caveats above |
| A short loop for docs, chat or email | WebP (md-webp), GIF (md-gif) as a last resort |
Plays everywhere images play. GIF has 256 colours and gets heavy fast |
A rule of thumb: if it can be built with transforms and opacity, use CSS. If it is drawn in vectors, use Lottie or Rive. If it is anything else, use video.
test/run.shMakes synthetic sources with ffmpeg’s testsrc2 pattern: one opaque with sound, one transparent as ProRes 4444, and a PNG sequence. Then it runs every script and checks the results with ffprobe:
- codecs, sizes, frame rate and duration;
- no audio in hero loops;
moovbeforemdat(faststart);- the alpha channel decoded from the WebM and the HEVC matches the source;
- the GIF palette, the WebP container and the social presets.
GitHub Actions runs it on Ubuntu and on macOS.
- motion-tokens — easings, durations and springs for every tool
- web-motion-recipes — copy-paste web animations
- ae-expressions — After Effects expressions and scripts
- remotion-motion-kit — motion graphics templates in code (the lower third in the demo comes from here)
- motion-delivery — export for web and social (this repo)
Made by Juan Carlos · lepanke.com · MIT License. Browser findings on alpha video are summarised from Jake Archibald’s article and the WebKit bug tracker linked above.
