{"id":21162633,"url":"https://github.com/josepedrodias/ffmpeg-utils2","last_synced_at":"2026-04-27T17:03:19.459Z","repository":{"id":57234941,"uuid":"115683187","full_name":"JosePedroDias/ffmpeg-utils2","owner":"JosePedroDias","description":"utility functions to perform operations on videos using ffmpeg. extracts images and composes mosaics","archived":false,"fork":false,"pushed_at":"2018-03-30T15:19:57.000Z","size":3755,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-01T20:19:49.258Z","etag":null,"topics":["ffmpeg","graphicsmagick","mosaic","mosaic-images","thumbnails","thumbnails-preview","video"],"latest_commit_sha":null,"homepage":"","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/JosePedroDias.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":"2017-12-29T03:37:10.000Z","updated_at":"2023-03-28T21:04:18.000Z","dependencies_parsed_at":"2022-08-23T16:20:30.227Z","dependency_job_id":null,"html_url":"https://github.com/JosePedroDias/ffmpeg-utils2","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/JosePedroDias/ffmpeg-utils2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JosePedroDias%2Fffmpeg-utils2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JosePedroDias%2Fffmpeg-utils2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JosePedroDias%2Fffmpeg-utils2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JosePedroDias%2Fffmpeg-utils2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JosePedroDias","download_url":"https://codeload.github.com/JosePedroDias/ffmpeg-utils2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JosePedroDias%2Fffmpeg-utils2/sbom","scorecard":{"id":74582,"data":{"date":"2025-08-11","repo":{"name":"github.com/JosePedroDias/ffmpeg-utils2","commit":"ad95233038d3b566a7ccd4b4078e98b0eab6bbc4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/7 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"10 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-qrmc-fj45-qfc2","Warn: Project is vulnerable to: GHSA-fvqr-27wr-82fm","Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574","Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-15T04:33:53.684Z","repository_id":57234941,"created_at":"2025-08-15T04:33:53.684Z","updated_at":"2025-08-15T04:33:53.684Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32345823,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","graphicsmagick","mosaic","mosaic-images","thumbnails","thumbnails-preview","video"],"created_at":"2024-11-20T13:31:48.873Z","updated_at":"2026-04-27T17:03:19.441Z","avatar_url":"https://github.com/JosePedroDias.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ffmpeg-utils2\r\n\r\nVersion 2 is a rewrite of the old code with a simpler, promises-based API.\r\nNo longer compatible to avconv-utils. Somewhat tested with jest.\r\n\r\n## dependencies needed\r\n\r\nThis modules uses ffmpeg and graphicsmagick to manipulate video and images.\r\n\r\n\r\n### Mac OS X\r\n\r\n    brew install ffmpeg graphicsmagick\r\n\r\n### Windows\r\n\r\nin a powershell run as administrator do:\r\n\r\n    choco install ffmpeg graphicsmagick\r\n\r\n### Linux\r\n\r\n    sudo apt-get install ffmpeg graphicsmagick\r\n\r\n\r\n## Use cases\r\n\r\nPublic API always returns a promise.\r\n\r\n\r\n### 1) create a mosaic image from video\r\n\r\n![example mosaic](examples/mosaic.png)\r\n\r\n```js\r\n.doMosaicFromVideo({\r\n  video: string, // path to video file\r\n  mosaic: string, // path where to store generated mosaic\r\n  outPath?: string, // where to store extracted frames (temp dir by default)\r\n  strategy?: 'horizontal' | 'vertical' | 'most-square' | 'least-area' | 'least-area+'\r\n  fps?: number,\r\n  number?: number, // must specify either fps or number of frames\r\n  scale?: number // scale to apply to frames from original video size\r\n})\r\n```\r\n\r\nsuccessful promise resolves to:\r\n\r\n```js\r\n{\r\n  mosaicDimensions: number[2], // dimensions of whole mosaic, in pixels\r\n  frameDimensions: number[2], // dimensions of a frame, in pixels\r\n  strategy: string, // applied strategy\r\n  outFile: string, // saved mosaic path\r\n  grid: number[2], // distribution of frames between dimensions (from top left -\u003e top right, .... last row)\r\n  n: number // number of frames\r\n}\r\n```\r\n\r\n### 2) extract images from video\r\n\r\n```js\r\n.extractFrames({\r\n  inFile: string, // video path\r\n  outPath: folder, // where to store extracted frames\r\n  fps?: number,\r\n  number?: number, // must specify either fps or number of frames\r\n  scale: number,\r\n  outImageMask?: string\r\n})\r\n```\r\n\r\nsuccessful promise resolves to:\r\n\r\n```js\r\n{\r\n  files: Array\u003cstring\u003e, // path to each image\r\n  frameDimensions: number[2] // dimension of each frame, in pixels\r\n})\r\n```\r\n\r\n### 3) get video metadata\r\n\r\n```js\r\n.getMetadata({\r\n  string // path to video file\r\n})\r\n```\r\n\r\nsuccessful promise resolves to:\r\n\r\n```js\r\n{\r\n  duration: string, // 'HH:MM:SS.MS',\r\n  durationSecs: number, // secs\r\n  fps: number,\r\n  vCodec: string,\r\n  vBitrate: number,\r\n  dimensions: number[2], // in pixels\r\n  aCodec: string,\r\n  aBitrate: number\r\n}\r\n```\r\n\r\n\r\nsee file `sample.js` for example calls.\r\n\r\n## tests\r\n\r\nTests need to be ran against node\u003e=8 with native async await (for testing convenience, sorry).\r\n\r\nThe module itself uses promises so does not impose such constraint.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosepedrodias%2Fffmpeg-utils2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjosepedrodias%2Fffmpeg-utils2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosepedrodias%2Fffmpeg-utils2/lists"}