processing / processing/p5.js

Built-in sketch export as video or animated GIF

Open
#8,515 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area:Data Area:IO Feature Request
Dominant language
JavaScript
Stars
24k
Forks
3.8k
Avg merge
3d 16h
Merged PRs (30d)
25

Description

Increasing access

Making it easy to export a sketch as video or GIF lowers the barrier to sharing and showcasing work. Right now this requires external libraries or manual frame export, which is harder for beginners and educators. A simple, official API would help everyone—including students and people with less technical setup—share their p5.js work on social media, portfolios, and assignments without extra tools or steps

Most appropriate sub-area of p5.js?
  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)
Feature request details

What: A built-in, official way to record the canvas and export it as video (e.g. WebM) and/or animated GIF, without requiring a separate library (e.g. ccapture.js) or manual saveFrame() + external tools.
Why:
Many users want to share animations on social media, portfolios, or assignments.
Current options are either external libs or manual frame capture + conversion.
A simple API in core would match p5.js’s goal of making creative coding and sharing accessible.
Possible API (for discussion):
Something like recordSketch({ format: 'gif' | 'video', duration: seconds }) and stopRecording() / exportRecording(), or
A Capture helper that wraps the MediaRecorder / canvas capture flow and optionally GIF encoding.
Exact design can be decided with maintainers (e.g. sync vs async, options for resolution, frame rate, quality).
Scope:
Start with one format (e.g. video via MediaRecorder) and add GIF or a second format later if maintainers agree.
Rely on browser APIs (e.g. MediaRecorder, canvas capture) where possible to keep the implementation maintainable.
References:
Common user need in forums and tutorials.
Similar functionality exists in add-ons (e.g. ccapture.js) but not as an official, documented core API.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing p5.js’s existing saveFrame() behavior and the browser canvas capture and MediaRecorder APIs, using ccapture.js as a comparison point. Confirm the smallest maintainable format and API scope with maintainers. Done means an official documented core recording API supports the agreed format without manual frame export or an external library.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.