{"id":13529866,"url":"https://github.com/transitive-bullshit/ffmpeg-extract-frame","last_synced_at":"2025-05-01T02:25:00.209Z","repository":{"id":31181953,"uuid":"127134130","full_name":"transitive-bullshit/ffmpeg-extract-frame","owner":"transitive-bullshit","description":"Extracts a single frame from a video.","archived":false,"fork":false,"pushed_at":"2022-12-07T02:18:16.000Z","size":768,"stargazers_count":15,"open_issues_count":15,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-14T12:54:49.103Z","etag":null,"topics":["ffmpeg","fluent-ffmpeg","screenshot"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/transitive-bullshit.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-28T12:05:35.000Z","updated_at":"2024-04-22T16:13:07.000Z","dependencies_parsed_at":"2023-01-14T18:30:50.045Z","dependency_job_id":null,"html_url":"https://github.com/transitive-bullshit/ffmpeg-extract-frame","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transitive-bullshit%2Fffmpeg-extract-frame","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transitive-bullshit%2Fffmpeg-extract-frame/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transitive-bullshit%2Fffmpeg-extract-frame/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transitive-bullshit%2Fffmpeg-extract-frame/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/transitive-bullshit","download_url":"https://codeload.github.com/transitive-bullshit/ffmpeg-extract-frame/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251811661,"owners_count":21647745,"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":["ffmpeg","fluent-ffmpeg","screenshot"],"created_at":"2024-08-01T07:00:40.142Z","updated_at":"2025-05-01T02:25:00.190Z","avatar_url":"https://github.com/transitive-bullshit.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# ffmpeg-extract-frame\n\n\u003e Extracts a single frame from a video using [fluent-ffmpeg](https://github.com/fluent-ffmpeg/node-fluent-ffmpeg).\n\n[![NPM](https://img.shields.io/npm/v/ffmpeg-extract-frame.svg)](https://www.npmjs.com/package/ffmpeg-extract-frame) [![Build Status](https://travis-ci.com/transitive-bullshit/ffmpeg-extract-frame.svg?branch=master)](https://travis-ci.com/transitive-bullshit/ffmpeg-extract-frame) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n## Install\n\n```bash\nnpm install --save ffmpeg-extract-frame\n# or\nyarn add ffmpeg-extract-frame\n```\n\n## Usage\n\n```js\nconst extractFrame = require('ffmpeg-extract-frame')\n\nawait extractFrame({\n  input: 'media/1.mp4',\n  output: 'test.jpg',\n  offset: 1000 // seek offset in milliseconds\n})\n```\n\n## API\n\n### extractFrame(options)\n\nExtracts a single frame from a video file. Returns a `Promise` for when the file has been written.\n\n#### options\n\n##### input\n\nType: `String`\n\nPath or URL to a video file.\n\n##### output\n\nType: `String`\n\nPath to a `jpg` or `png` file to output.\n\n##### offset\n\nType: `Number`\nDefault: `0`\n\nSeek offset to take the screenshot from in milliseconds.\n\n##### quality\n\nType: `Number`\nDefault: `2`\n\nIf exporting a jpeg image, the quality from 1-31 with 31 being the worst quality ([source](https://stackoverflow.com/questions/10225403/how-can-i-extract-a-good-quality-jpeg-image-from-an-h264-video-file-with-ffmpeg)).\n\n##### log\n\nType: `Function`\nDefault: `noop`\n\nOptional function to log the underlying ffmpeg command. You may, for example, use `console.log`\n\n## Related\n\n- [ffmpeg-extract-frames](https://github.com/transitive-bullshit/ffmpeg-extract-frames) extracts multiple frames at a time.\n- [fluent-ffmpeg](https://github.com/fluent-ffmpeg/node-fluent-ffmpeg)\n- [awesome-ffmpeg](https://github.com/transitive-bullshit/awesome-ffmpeg) - A curated list of awesome ffmpeg resources with a focus on JavaScript.\n\n## License\n\nMIT © [Travis Fischer](https://github.com/transitive-bullshit)\n\nSupport my OSS work by \u003ca href=\"https://twitter.com/transitive_bs\"\u003efollowing me on twitter \u003cimg src=\"https://storage.googleapis.com/saasify-assets/twitter-logo.svg\" alt=\"twitter\" height=\"24px\" align=\"center\"\u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftransitive-bullshit%2Fffmpeg-extract-frame","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftransitive-bullshit%2Fffmpeg-extract-frame","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftransitive-bullshit%2Fffmpeg-extract-frame/lists"}