Skip to content
Limited timeStarter is now $9 a month instead of $20.See plans
charmotion

One Rig, Every Format: Exporting a Mascot to Rive, Transparent WebM, HEVC MOV, MP4, and GIF

By the Charmotion team · Updated · How we write guides

Cover illustration for the guide: One Rig, Every Format: Exporting a Mascot to Rive, Transparent WebM, HEVC MOV, MP4, and GIF, with Charmotion demo characters

Export one mascot animation from a single master: keep the .riv for interactive use, render one transparent frame sequence, then encode WebM, MOV, MP4 and GIF from it. WebM with VP9 alpha serves Chrome and Firefox, an HEVC alpha MOV serves Safari, while MP4 needs a solid background and GIF has one-bit transparency.

Key takeaways

  • Keep one master render and derive every video copy from it, so the formats match frame for frame.
  • Use WebM with VP9 alpha for Chrome and Firefox, and an HEVC alpha MOV for Safari with the MOV listed first.
  • H.264 MP4 cannot hold transparency, so composite the mascot onto a solid colour before encoding.
  • GIF has one-bit transparency and up to 256 colours, so skip dithering on flat mascot art.
  • The .riv stays the interactive asset in your app, while the video files serve every place that plays video.

Why export every format from one master?

A mascot animation exists in two forms. The .riv file is the interactive version: it holds the states, the transitions and the data your app drives at runtime. Video files are fixed copies of one run of that motion. If you encode each video from a different source, the WebM, the MOV and the GIF drift apart in timing, colours and edges, and nobody can say which one is right.

The workflow below shows how to export one mascot animation to rive webm mov mp4 and gif at once, with the .riv as the interactive master and one transparent frame sequence as the source for every video. A fix made once in the master carries into all five files.

Keep two Rive files apart. The .rev file is the editable source you return to for changes. Runtimes cannot load .rev files, so the .riv is the only file your app ships. Rive's editor is at rive.app/editor.

Which format does each platform need?

FormatTransparencyWhere it fitsMain limit
.riv (Rive)Vector and interactiveApps and websites that load a Rive runtime, with state machines and data bindingNeeds a runtime; it is not a video file
WebM, VP9 alphaPer-pixel alphaChrome, Edge and Firefox on web pagesSafari has been reported to ignore the alpha layer
MOV, HEVC alphaPer-pixel alpha in one video trackSafari on iOS 13 and macOS Catalina or laterOther browsers generally do not render the alpha layer
MP4, H.264None; transparent areas become a solid fillOpaque uses such as social posts, decks and pages with a set backgroundNo alpha channel
GIFOne-bit, fully on or offAnywhere that accepts GIF filesUp to 256 colours per palette and no soft edges

Read the table as a list of what each file cannot do. The WebM and the MOV carry transparency, so they cover hero sections and overlays. The MP4 and the GIF are opaque or binary, so they belong where a background is acceptable. For a deeper size comparison, see animation file size benchmark and GIF vs WebM vs MP4 vs Rive.

How do you render the master sequence with alpha?

Start from the finished animation and render it as PNG frames with alpha at the largest size you need. For a square mascot, 1080 by 1080 pixels at 60 fps covers every copy, because the smaller sizes scale down from it.

  1. Check the states and loop lengths in the editor, and confirm that each loop starts and ends on the same pose.
  2. Render the frames with transparency on, named in order such as frame_0001.png.
  3. Wrap the frames as master.mov in a transparent intermediate format, such as ProRes 4444 with alpha, from your editor. Keep this file as the working source. It is large, so do not ship it.

Rive's own video export depends on your plan. On the free plan, exported files play a Rive splash screen, and paid plans export without it, so check that before you rely on a Rive render. The guide on how to export a Rive animation to MP4 or GIF covers that route in detail.

How do you encode a transparent WebM with VP9 alpha?

Use FFmpeg with the libvpx-vp9 encoder and an alpha-capable pixel format. This command is a commonly used pattern for a transparent WebM:

ffmpeg -i master.mov -c:v libvpx-vp9 -pix_fmt yuva420p -auto-alt-ref 0 -b:v 2M mascot.webm
  • yuva420p keeps the alpha channel. Without it, the transparent layer is discarded and replaced with black or white.
  • -auto-alt-ref 0 turns off alternate reference frames, which one guide links to rendering glitches or a stripped alpha channel.
  • -b:v 2M sets the bitrate. Raise it if fine edges look soft.

If your master is itself a VP9 WebM with alpha, put -c:v libvpx-vp9 before -i. The native VP9 decoder drops the alpha and writes a black frame. Chrome, Edge and Firefox show the transparency. Safari has been reported to ignore it, so the WebM alone does not cover Apple devices. Read why transparent WebM shows a black background on iOS Safari before you publish.

How do you make an HEVC MOV with alpha for Safari?

Apple added HEVC with alpha to Safari in iOS 13 and macOS Catalina. The alpha sits in the same video track as the picture. A player that does not understand alpha shows only the base layer, so the MOV needs a fallback. On a Mac with FFmpeg 4.4.1 or newer, this command writes HEVC with alpha to a MOV file:

ffmpeg -i master.mov -c:v hevc_videotoolbox -require_sw 1 -allow_sw 1 -alpha_quality 0.5 -vtag hvc1 hevc.mov

The hvc1 tag makes the file play on Apple software. Apple also provides the avconvert command-line tool and AVFoundation export presets for this job. The documented preset named AVAssetExportPresetHEVC1920x1080WithAlpha outputs 1920 by 1080, so a square mascot needs a different size. Check the current avconvert options on your macOS version before you script them.

Put the MOV first in the HTML source list, and the WebM second. Browsers that cannot play the MOV move on to the WebM. Apple's own sample pattern sets playsinline, muted and the video/quicktime type:

<video playsinline muted autoplay loop>
  <source src="mascot.mov" type="video/quicktime">
  <source src="mascot.webm" type="video/webm">
</video>

For more on the Safari side, see how to serve transparent WebM with an HEVC alpha MOV fallback.

How do you make the MP4 and GIF copies?

H.264 MP4 cannot hold transparency. When a transparent timeline exports to H.264, the empty areas are filled, usually with black, and that fill is baked into the pixels. Before you encode, place the mascot over the solid colour you want, such as your brand background or the page colour, so the fill is one you chose.

In After Effects, H.264 is chosen from the Format dropdown in Output Module Settings in the Render Queue. Premiere Pro's H.264 choice also creates an MP4. QuickTime Player does not write MP4 files; it writes .mov with H.264 or HEVC. Adobe's H.264 guide is linked in the sources below.

GIF is the simplest and most limited copy. Its transparency is one bit, so edges cannot be soft, and a palette holds up to 256 colours. Adobe Animate notes that GIF and PNG-8 cannot keep multilevel transparency. Edges can look jagged or haloed on a different background, so test the GIF on the page colour.

  • Set the GIF to 10 to 15 fps. Mux reports that this range often works well and reduces file size.
  • Turn dithering off for flat art. SVGator advises this for flat-colour icons and logos because dithering adds size without a visible gain.
  • Check any platform's own file size limit before upload, since those limits vary.

For the conversion steps from a video to a GIF, see how to convert a video to GIF.

How do you check every file before you ship?

Run the same checks on each file. Play the WebM in Chrome and Firefox over a bright background, and play the MOV in Safari on an iPhone over the same background. A black box or a white halo means the encode or the source order is wrong.

  • Confirm that the duration and loop point match across all five files.
  • Confirm that the MOV is listed before the WebM in the HTML.
  • Confirm that the MP4 and GIF show the background colour you chose, not a fill from the exporter.
  • Compare file sizes against your performance budget, and keep the .riv as the app asset.

Charmotion produces this set from one character image. A paid character animation comes out as one Rive (.riv) file with a state machine, and the character page or the export_videos MCP tool creates MP4 at 1080 by 1080 and 60 fps, GIF, transparent WebM with VP9 alpha, transparent MOV with HEVC alpha and a 9:16 launch MP4. Exports take about a minute and use no credits. Character animations need a paid plan, so see pricing for current plans. Disclosure: Charmotion is our product.

How to export one mascot animation to Rive, WebM, MOV, MP4 and GIF

  1. Keep the .riv as the interactive master. Finish the states in the Rive editor and save the .riv your app will ship. Keep the editable .rev source separately, because runtimes cannot load it.
  2. Render one transparent frame sequence. Export PNG frames with alpha at 1080 by 1080 and 60 fps, using a loop that starts and ends on the same pose.
  3. Make a transparent master MOV. Save the frames as master.mov in a transparent intermediate format such as ProRes 4444 with alpha. Every video copy is encoded from this one file.
  4. Encode the WebM and the HEVC MOV. Run the libvpx-vp9 command with yuva420p for mascot.webm, and the hevc_videotoolbox command with the hvc1 tag for hevc.mov on macOS.
  5. Make the MP4 and GIF on a solid background. Composite the mascot onto your background colour, export an H.264 MP4, then export a GIF at 10 to 15 fps with dithering off for flat art.
  6. Check alpha in each browser. Play every file over a bright background in Chrome, Firefox and Safari on iPhone, and list the MOV before the WebM in your HTML.

Frequently asked questions

Can I skip the .riv and ship only the videos?

Yes, for a fixed loop that always plays the same way. A video cannot react to state, so a mascot that changes on tap, shows loading or responds to live data needs the .riv. Many teams keep both: the .riv inside the app, and the video files for social posts, decks and pages that do not run a runtime.

Why does my transparent MOV look right in Safari but not in Chrome?

Chrome and most other browsers do not render the alpha layer of HEVC with alpha, so they show only the base picture. That is why the WebM is the second source. Chrome, Edge and Firefox pick up the WebM, while Safari plays the MOV first.

Do I need a Mac to make the HEVC alpha file?

The documented routes use Apple's tools and FFmpeg's hevc_videotoolbox encoder, which run on macOS. Plan to encode the MOV on a Mac or in a macOS build step. Check the documentation of any other encoder before relying on it.

Can an MP4 keep transparency if I pick a better codec?

Not with H.264. An H.264 MP4 has no alpha layer, and exporters fill transparent areas with a solid colour, usually black. For transparency on the web, use WebM with alpha and an HEVC alpha MOV, and keep the MP4 for opaque placements.

Sources

Related guides