{"id":16715520,"url":"https://github.com/philippeitis/imgvid_utils","last_synced_at":"2025-09-22T09:17:00.938Z","repository":{"id":39274153,"uuid":"240607912","full_name":"philippeitis/imgvid_utils","owner":"philippeitis","description":"Python library for modifying and merging videos and images","archived":false,"fork":false,"pushed_at":"2023-03-01T09:56:51.000Z","size":178,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-09T02:44:18.707Z","etag":null,"topics":["cv2","image-processing","splitting-videos","stacking-images","stacking-videos","video-processing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/philippeitis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2020-02-14T22:17:16.000Z","updated_at":"2022-11-18T21:40:12.000Z","dependencies_parsed_at":"2025-03-16T15:00:57.663Z","dependency_job_id":null,"html_url":"https://github.com/philippeitis/imgvid_utils","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/philippeitis/imgvid_utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philippeitis%2Fimgvid_utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philippeitis%2Fimgvid_utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philippeitis%2Fimgvid_utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philippeitis%2Fimgvid_utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/philippeitis","download_url":"https://codeload.github.com/philippeitis/imgvid_utils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philippeitis%2Fimgvid_utils/sbom","scorecard":{"id":731413,"data":{"date":"2025-08-11","repo":{"name":"github.com/philippeitis/imgvid_utils","commit":"11d6c276cf70173f0143f4a1e232fabf456d4d6f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.9,"checks":[{"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"Code-Review","score":0,"reason":"Found 0/30 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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Warn: no topLevel permission defined: .github/workflows/continuousintegration.yml:1","Warn: no topLevel permission defined: .github/workflows/formatting.yml:1","Info: no jobLevel write permissions found"],"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":"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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/philippeitis/imgvid_utils/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/philippeitis/imgvid_utils/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/philippeitis/imgvid_utils/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:72: update your workflow using https://app.stepsecurity.io/secureworkflow/philippeitis/imgvid_utils/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/continuousintegration.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/philippeitis/imgvid_utils/continuousintegration.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/continuousintegration.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/philippeitis/imgvid_utils/continuousintegration.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/formatting.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/philippeitis/imgvid_utils/formatting.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/formatting.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/philippeitis/imgvid_utils/formatting.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/continuousintegration.yml:30","Warn: pipCommand not pinned by hash: .github/workflows/continuousintegration.yml:31","Warn: pipCommand not pinned by hash: .github/workflows/formatting.yml:27","Warn: pipCommand not pinned by hash: .github/workflows/formatting.yml:28","Warn: pipCommand not pinned by hash: .github/workflows/formatting.yml:31","Warn: pipCommand not pinned by hash: .github/workflows/formatting.yml:32","Info:   0 out of   8 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   6 pipCommand dependencies pinned"],"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":"SAST","score":10,"reason":"SAST tool detected: CodeQL","details":["Info: SAST configuration detected: CodeQL","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":"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":"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":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"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":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-qr4w-53vh-m672","Warn: Project is vulnerable to: PYSEC-2023-183"],"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-22T14:32:03.606Z","repository_id":39274153,"created_at":"2025-08-22T14:32:03.606Z","updated_at":"2025-08-22T14:32:03.606Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276375794,"owners_count":25631316,"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","status":"online","status_checked_at":"2025-09-22T02:00:08.972Z","response_time":79,"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":["cv2","image-processing","splitting-videos","stacking-images","stacking-videos","video-processing"],"created_at":"2024-10-12T21:09:37.895Z","updated_at":"2025-09-22T09:17:00.921Z","avatar_url":"https://github.com/philippeitis.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# imgvid_utils\n\nThis repository is intended to provide useful functions for concatenating, stacking, and splitting images and video files.\n\nThe CLI provides access to these functions:\nStacking images vertically:\n```\npython -m imgvid_utils --vstack image1.jpg image2.jpg --name output.png\n```\n\nStacking images horizontally:\n```\npython -m imgvid_utils --hstack image1.jpg image2.jpg --name output.png\n```\n\nStacking images in an arbitrary fashion:\n```\npython -m imgvid_utils --files_in image1.jpg .. image25.jpg --rows 5 --cols 5 --name output.png\n```\n\nStacking images in an arbitrary fashion from many directories:\n```\npython -m imgvid_utils --dirs_in dir1 ... dir25 --rows 5 --cols 5 --name output.png --to_imgs\n```\n\nStacking videos in an arbitrary fashion from many source files:\n```\npython -m imgvid_utils --files_in video1.mp4 ... video25.mp4 --rows 5 --cols 5 --name output.mp4 --to_vid\n```\n\nStacking videos in an arbitrary fashion from many directories:\n```\npython -m imgvid_utils --dirs_in dir1 ... dir25 rows 5 --cols 5 --name output.mp4 --to_vid\n```\n\nSplitting videos into component frames:\n```\npython -m imgvid_utils --files_in video1 --name output.png --to_imgs\n```\n\nFinding images with matching file names and concatenating them:\n```\npython -m imgvid_utils --dirs_in dir1 dir2 --read_matching_file_names\n```\n\n## Examples\n\n### Defining a stacking\n```python\nfrom imgvid_utils.image import Stacking\n\nstacking = Stacking(2, 2, \"rd\")\n```\n\nThis stacking has 2 columns, 2 rows, and will stack images to the right and downwards.\n\n### Stacking images in an arbitrary fashion:\n```\npython -m imgvid_utils --files_in image1.jpg .. image25.jpg --rows 5 --cols 5 --name output.png\n```\n\n### Using the API\n\nimgvid_utils provides a flexible API based on frame sources and sinks.\n\n### Defining frame sources\n\n```python\nfrom imgvid_utils import image as ims\nfrom imgvid_utils import video as vs\n\n# Groups the images by order of appearance in the provided lists\nims.FileIterator(\n    [[\"file1.png\", \"file2.jpg\", \"file3.png\"], [\"file1.jpg\", \"file2.png\", ...], ...],\n    stacking=ims.Stacking(1, 2, \"rd\")\n)\n\n# Groups images by order of appearance in the provided directories\nims.DirectoryIterator(\n    [\"./path_to_first_directory\", \"./path_to_second_directory\"],\n    stacking=ims.Stacking(1, 2, \"rd\")\n)\n\n# A variant of DirectoryIterator which groups images with matching file names\n# Output images are returned in lexographical order\nims.DirectoryIteratorMatchNames(\n    [\"./path_to_first_directory\", \"./path_to_second_directory\"],\n    stacking=ims.Stacking(1, 2, \"rd\")\n)\n\n# Groups the nth frame in each video\nvs.VideoIterator(\n    [\"video1.mp4\", \"video2.mp4\"],\n    stacking=ims.Stacking(1, 2, \"rd\"),\n)\n```\n\n### Resizing all input frames\n```python\nsource.resize_in((640, 480))\n```\n\n### Resizing input frames on an individual basis\n```python\nsource.resize(ims.Resize.FIRST)\n# Choices are\n# Resize.FIRST: Chooses the first set of dimensions\n# Resize.UP: Chooses the dimensions with the largest area\n# Resize.DOWN: Chooses the dimensions with the smallest area\n```\n\n### Controlling which frames are selected\n```python\n# Skips the first 10 frames of input, and output only 10 frames\nsource.skip(10).take(10)\n```\n\n### Chaining iterators:\n```python\n# Note: Resize transformations should only be applied once to avoid resizing artifacts\nsource = source1.chain(source2).resize(resize)\n```\n\n### Creating output\n#### Writing files to a target directory\n```python\nsource.write_images(\"output_dir\", \"prefix\", \"extension\", self.choose_padding())\n```\n\n#### Writing files to a video\n```python\n### Requires source.resize_in() to be called first\nsource.write_video(\"path/to/video.mp4\", video_format=\"mp4v\", fps=24.0)\n```\n\n#### Processing images manually\n```python\nfor image_data in source:\n    file_name = image_data.file_name\n    ext = image_data.ext\n    image = image_data.images[0]\n    do_something(file_name, ext, image)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilippeitis%2Fimgvid_utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphilippeitis%2Fimgvid_utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilippeitis%2Fimgvid_utils/lists"}