{"id":13565314,"url":"https://github.com/delucis/pellicola","last_synced_at":"2025-04-10T23:24:41.824Z","repository":{"id":33177718,"uuid":"154028965","full_name":"delucis/pellicola","owner":"delucis","description":" :movie_camera: Generate video files from \u003ccanvas\u003e animations in Node.js","archived":false,"fork":false,"pushed_at":"2025-02-04T08:25:07.000Z","size":1875,"stargazers_count":24,"open_issues_count":9,"forks_count":2,"subscribers_count":4,"default_branch":"latest","last_synced_at":"2025-03-18T11:19:54.971Z","etag":null,"topics":["canvas","canvas-animation","ffmpeg","node-canvas","video"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/pellicola","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/delucis.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"delucis"}},"created_at":"2018-10-21T16:30:14.000Z","updated_at":"2024-12-27T18:36:21.000Z","dependencies_parsed_at":"2024-01-16T18:58:35.928Z","dependency_job_id":"70c0709e-4554-4399-83d4-e479b6782008","html_url":"https://github.com/delucis/pellicola","commit_stats":{"total_commits":207,"total_committers":4,"mean_commits":51.75,"dds":"0.46376811594202894","last_synced_commit":"6b037a216ce878355528ced502e9bbc34318103a"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delucis%2Fpellicola","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delucis%2Fpellicola/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delucis%2Fpellicola/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delucis%2Fpellicola/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/delucis","download_url":"https://codeload.github.com/delucis/pellicola/tar.gz/refs/heads/latest","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248313548,"owners_count":21082876,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["canvas","canvas-animation","ffmpeg","node-canvas","video"],"created_at":"2024-08-01T13:01:44.419Z","updated_at":"2025-04-10T23:24:41.802Z","avatar_url":"https://github.com/delucis.png","language":"JavaScript","funding_links":["https://github.com/sponsors/delucis"],"categories":["JavaScript"],"sub_categories":[],"readme":"# pellicola\n\n[![npm version](https://img.shields.io/npm/v/pellicola.svg)](https://www.npmjs.com/package/pellicola)\n[![node](https://img.shields.io/node/v/pellicola.svg)](#readme)\n[![Build Status](https://github.com/delucis/pellicola/actions/workflows/test.yml/badge.svg)](https://github.com/delucis/pellicola/actions/workflows/test.yml)\n[![Coverage Status](https://coveralls.io/repos/github/delucis/pellicola/badge.svg?branch=latest)](https://coveralls.io/github/delucis/pellicola?branch=latest)\n[![Known Vulnerabilities](https://snyk.io/test/npm/pellicola/badge.svg)](https://snyk.io/test/npm/pellicola)\n[![Typed with TypeScript](https://badgen.net/badge/icon/Types?icon=typescript\u0026label\u0026labelColor=3178c6\u0026color=3178c6)](#readme)\n\n\u003e Generate video files from `\u003ccanvas\u003e` animations in Node.js\n\n## Installation\n\n```\nnpm install --save pellicola\n```\n\n## Usage\n\nThis package provides a lightweight framework for generating animations with `node-canvas` and saving them as video files using `ffmpeg`.\n\n```js\nconst pellicola = require('pellicola')\n\nfunction myAnimation () {\n  // provide a function to draw video frames\n  return function ({ context, width, height, playhead }) {\n    context.fillStyle = '#0f0'\n    context.fillRect(0, 0, width * playhead, height)\n  }\n}\n\nconst settings = {\n  dimensions: [640, 360],   // video will be 640px wide by 360px tall\n  duration: 2,              // video will last 2 seconds\n  filename: 'my-sketch.mp4' // set custom filename for output video\n}\n\npellicola(myAnimation, settings)\n  .then(path =\u003e console.log('Done saving video file to:', path))\n  // =\u003e Done saving video file to: /path/to/current-dir/my-sketch.mp4\n```\n\nConceptually, `pellicola` uses the idea of the “sketch” that can be found in [Processing](https://processing.org/) and its Javascript cousin [p5.js](https://p5js.org/). The API tries to follow Matt DesLauriers’s [`canvas-sketch`](https://github.com/mattdesl/canvas-sketch) framework, which provides excellent tools for working on generative art with `\u003ccanvas\u003e` in the web browser. The aim is to permit a sketch function developed using `canvas-sketch` to be re-used with `pellicola` with minimal adaptation.\n\nFor more details, see the [**Documentation →**](docs/README.md)\n\n## License\n\n`pellicola` is distributed under the [GNU General Public License v3.0](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelucis%2Fpellicola","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdelucis%2Fpellicola","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelucis%2Fpellicola/lists"}