{"id":15413107,"url":"https://github.com/daybrush/scenejs-render","last_synced_at":"2025-04-06T16:10:59.264Z","repository":{"id":34398252,"uuid":"174806906","full_name":"daybrush/scenejs-render","owner":"daybrush","description":"🎬 Make a movie of CSS animation through scenejs.","archived":false,"fork":false,"pushed_at":"2024-04-18T21:03:19.000Z","size":16469,"stargazers_count":172,"open_issues_count":18,"forks_count":17,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-30T15:07:44.944Z","etag":null,"topics":["animation","css","ffmpeg","mp4","nodejs","scene","scenejs"],"latest_commit_sha":null,"homepage":"https://daybrush.com/scenejs-render/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daybrush.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"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":"daybrush","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2019-03-10T10:13:25.000Z","updated_at":"2025-03-27T14:51:39.000Z","dependencies_parsed_at":"2024-02-05T22:04:28.776Z","dependency_job_id":"2c3ac602-4019-4604-b651-b1708f34033a","html_url":"https://github.com/daybrush/scenejs-render","commit_stats":{"total_commits":94,"total_committers":4,"mean_commits":23.5,"dds":0.5,"last_synced_commit":"9b7b67e934e74ec3c034b7976e66272b52af53ef"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daybrush%2Fscenejs-render","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daybrush%2Fscenejs-render/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daybrush%2Fscenejs-render/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daybrush%2Fscenejs-render/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daybrush","download_url":"https://codeload.github.com/daybrush/scenejs-render/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247509221,"owners_count":20950232,"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":["animation","css","ffmpeg","mp4","nodejs","scene","scenejs"],"created_at":"2024-10-01T16:55:29.941Z","updated_at":"2025-04-06T16:10:59.233Z","avatar_url":"https://github.com/daybrush.png","language":"HTML","funding_links":["https://github.com/sponsors/daybrush"],"categories":[],"sub_categories":[],"readme":"\n\u003cp align=\"middle\"\u003e\u003cimg src=\"https://daybrush.com/scenejs/images/clapperboard.png\" width=\"250\"/\u003e\u003c/p\u003e\n\u003ch2 align=\"middle\"\u003eScene.js Render\u003c/h2\u003e\n\u003cp align=\"middle\"\u003e\n\u003ca href=\"https://www.npmjs.com/package/@scenejs/render\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@scenejs/render.svg?style=flat-square\u0026color=007acc\u0026label=version\" alt=\"npm version\" /\u003e\u003c/a\u003e\n\u003cimg src=\"https://img.shields.io/badge/language-typescript-blue.svg?style=flat-square\"/\u003e\n\u003ca href=\"https://github.com/daybrush/scenejs/blob/master/LICENSE\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/github/license/daybrush/scenejs.svg?style=flat-square\u0026label=license\u0026color=08CE5D\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\n\u003cp align=\"middle\"\u003e🎬 Make a movie of CSS animation through \u003ca href=\"https://github.com/daybrush/scenejs\"\u003eScene.js\u003c/a\u003e\u003c/p\u003e\n\n\u003cp align=\"middle\"\u003e\u003ca href=\"https://daybrush.com/scenejs-render\"\u003e\u003cstrong\u003eOfficial Site\u003c/strong\u003e\u003c/a\u003e \u0026nbsp;/\u0026nbsp; \u003ca href=\"https://daybrush.com/scenejs-render/release/latest/doc\"\u003e\u003cstrong\u003eAPI\u003c/strong\u003e\u003c/a\u003e \u0026nbsp;/\u0026nbsp; \u003ca href=\"https://github.com/daybrush/scenejs\"\u003e\u003cstrong\u003eScene.js\u003c/strong\u003e\u003c/a\u003e \u0026nbsp;/\u0026nbsp; \u003ca href=\"https://github.com/daybrush/scena\"\u003e\u003cstrong\u003eMain Project\u003c/strong\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cbr/\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/daybrush/scenejs-render/master/demo/images/screenshot.png\" alt=\"screenshot\" /\u003e\n\u003c/p\u003e\n\n\n## 🎬 How to use\n#### Node\nIt reads a file from Node through a command and records (capture and video process) to create a video (or audio) file.\n\n\nSee [**`@scenejs/render` page**](https://github.com/daybrush/scenejs-render/tree/master/packages/render)\n\n```bash\n$ npm install @scenejs/render\n```\n\n```bash\n$ npx @scenejs/render -i index.html\n```\n#### Programmatically\n```js\nconst render = require(\"@scenejs/render\");\nconst options = {\n  input: \"\u003cURL of the file containing the scene\u003e\",\n  name: \"scene\",\n  mediaScene: \"mediaScene\",\n  output: \"\u003cOutput file name\u003e\",\n  ffmpegPath: \"/usr/bin/ffmpeg\",\n  width: width,\n  height: height,\n  fps:30,\n  imageType : \"jpeg\",\n  multi: 2,\n  buffer:true,\n  scale: 1,\n  cacheFolder: \"cacheFolderPath\",\n};\nawait render.render(options);    \n```\n\nMake sure that the scene variable is declared and accessible in the global(window) scope or else a timeout will occur. If scene variable is declared using another name, make sure to update the \"name\" parameter in the option with the name of your scene variable\n\nIf you are running multiple instances of the render function simultaneously, make sure to specify unique cachefolder paths or the frames will get mixed up.\n\n#### Browser\nThrough the module, you can record by specifying the capture method manually and create a file manually through the data.\n\n\nSee [**`@scenejs/recorder` page**](https://github.com/daybrush/scenejs-render/tree/master/packages/recorder)\n\n```bash\n$ npm install @scenejs/recorder\n```\n\n\n```js\nimport Recorder from \"@scenjs/recorder\";\nimport Scene, { OnAnimate } from \"scenejs\";\n\nconst scene = new Scene();\nconst recorder = new Recorder();\n\nrecorder.setAnimator(scene);\nrecorder.setCapturing(\"png\", (e: OnAnimate) =\u003e {\n  // html to image\n});\n\nrecorder.record().then(data =\u003e {\n  const url = URL.createObjectURL(new Blob(\n    [data.buffer],\n    { type: 'video/mp4' },\n  ));\n\n  video.setAttribute(\"src\", url);\n});\n```\n\n\nSince `@ffmpeg/ffmpeg` is used, please refer to the document https://github.com/ffmpegwasm/ffmpeg.wasm.\n\nOr, using a script tag in the browser (only works in some browsers, see list below):\n\n\u003e SharedArrayBuffer is only available to pages that are [cross-origin isolated](https://developer.chrome.com/blog/enabling-shared-array-buffer/#cross-origin-isolation). So you need to host [your own server](https://github.com/ffmpegwasm/ffmpegwasm.github.io/blob/main/server/server.js) with `Cross-Origin-Embedder-Policy: require-corp` and `Cross-Origin-Opener-Policy: same-origin` headers to use ffmpeg.wasm.\n\n\n\u003e Only browsers with SharedArrayBuffer support can use ffmpeg.wasm, you can check [HERE](https://caniuse.com/sharedarraybuffer) for the complete list.\n\n\n\n\n\n## ⭐️ Show Your Support\nPlease give a ⭐️ if this project helped you!\n\n\n## 👏 Contributing\n\nIf you have any questions or requests or want to contribute to `scenejs-render` or other packages, please write the [issue](https://github.com/daybrush/scenejs-render/issues) or give me a Pull Request freely.\n\n\n### Code Contributors\n\nThis project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].\n\n\u003ca href=\"https://github.com/daybrush/scenejs-render/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=daybrush/scenejs-render\" /\u003e\n\u003c/a\u003e\n\n\n## Sponsors\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://daybrush.com/sponsors/sponsors.svg\"\u003e\n\t\t\u003cimg src=\"https://daybrush.com/sponsors/sponsors.svg\"/\u003e\n\t\u003c/a\u003e\n\u003c/p\u003e\n\n\n## 🐞 Bug Report\n\nIf you find a bug, please report to us opening a new [Issue](https://github.com/daybrush/scenejs-render/issues) on GitHub.\n\n\n\n## 📝 License\n\nThis project is [MIT](https://github.com/daybrush/scenejs-render/blob/master/LICENSE) licensed.\n\n```\nMIT License\n\nCopyright (c) 2016 Daybrush\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaybrush%2Fscenejs-render","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaybrush%2Fscenejs-render","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaybrush%2Fscenejs-render/lists"}