{"id":32149312,"url":"https://github.com/samst-one/imagesequencer","last_synced_at":"2025-10-21T09:54:00.872Z","repository":{"id":197971400,"uuid":"699437873","full_name":"samst-one/ImageSequencer","owner":"samst-one","description":"A well-tested iOS framework for producing a video from a sequence of images.","archived":false,"fork":false,"pushed_at":"2024-03-28T18:56:29.000Z","size":892,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-21T09:53:50.401Z","etag":null,"topics":["animation","image-processing","ios","swift","timelapse"],"latest_commit_sha":null,"homepage":"https://samst.one","language":"Swift","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/samst-one.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}},"created_at":"2023-10-02T16:25:35.000Z","updated_at":"2025-05-26T10:00:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"7fa514bb-bc41-42b0-b855-ffc01910e239","html_url":"https://github.com/samst-one/ImageSequencer","commit_stats":null,"previous_names":["samst-one/imagesequencer"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/samst-one/ImageSequencer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samst-one%2FImageSequencer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samst-one%2FImageSequencer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samst-one%2FImageSequencer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samst-one%2FImageSequencer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samst-one","download_url":"https://codeload.github.com/samst-one/ImageSequencer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samst-one%2FImageSequencer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280240306,"owners_count":26296527,"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-10-21T02:00:06.614Z","response_time":58,"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":["animation","image-processing","ios","swift","timelapse"],"created_at":"2025-10-21T09:53:58.584Z","updated_at":"2025-10-21T09:54:00.865Z","avatar_url":"https://github.com/samst-one.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ImageSequencer\r\n\r\n[![A badge showing the current build status on bitrise. Please click to view more](https://app.bitrise.io/app/4e19a931-761f-4f2b-b360-dcf083ca551c/status.svg?token=zr81eI66uU886cB4Sn-1PQ\u0026branch=main)](https://app.bitrise.io/app/4e19a931-761f-4f2b-b360-dcf083ca551c)\r\n[![A badge showing Swift compatibility, currently 5.8](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fsamst-one%2FImageSequencer%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/samst-one/ImageSequencer)\r\n[![A badge showing compatibility with Apple platforms. Currently compatible with iOS, macOS and tvOS.](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fsamst-one%2FImageSequencer%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/samst-one/ImageSequencer)\r\n\r\n## Overview\r\n\r\nImageSequencer is a Swift framework for iOS, macOS, tvOS that allows you to create videos from a selection of images. Developed by [Sam Stone](https://samst.one).\r\n\r\nIn use in production with [Lapsey](https://apps.apple.com/gb/app/lapsey/id6467548808). Create beautiful time-lapses on iOS - find out more [here](https://lapsey.app).\r\n\r\n\r\nThe API can be found in the ``ImageSequencerController`` interface.\r\n\r\n## Install\r\n\r\nGo to **File \u003e Swift Packages \u003e Add Package Dependency** and add the following URL:\r\n\r\n```\r\nhttps://github.com/samst-one/ImageSequencer\r\n```\r\n\r\n## Usage\r\n\r\n1. First we need to import the `ImageSequencer` into our project, we do this by importing the framework\r\n\r\n```swift\r\nimport ImageSequencer\r\n```\r\n\r\n2. Next we need to create a `ImageSequencerController` object. The `ImageSequencerController` acts as the API for the package. We use the `ImageSequencerFactory` to do this. We also pass in the settings for the video we want to create. To create the `ImageSequencerController`, we do:\r\n\r\n```swift\r\nlet outputUrl = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first!.appendingPathComponent(\"\\(UUID().uuidString).mp4\")\r\n\r\nlet renderSettings = RenderSettings(bitrate: 10000000,\r\n                                    size: CGSize(width: 1920,\r\n                                    height: 1080),\r\n                                    fps: 24,\r\n                                    outputUrl: outputUrl)\r\n\r\nlet controller = try? ImageSequencerFactory.make(settings: settings)\r\n```\r\n\r\nThe `make` method has the ability to throw.\r\n\r\n3. With the `controller`, we can now access the API. We first must start of some internal `ImageSequencer` processes before rendering. To do this, call:\r\n```swift\r\ncontroller.start()\r\n```\r\n\r\n4. When you have the images you want to render to a video, we can call the `render` function below.  A breakdown of the parameters are as follows.    \r\n\r\n    - Parameters:\r\n        - `images`: The collection of images you wish to render in URL format.\r\n        - `didAddFrame`: A closure that returns a double representing the percentage of rendering completed.\r\n        - `completion`: A closure thats called when all the images have been rendered out. It returns an optional `Error`.\r\n\r\nSo the code looks a bit like this:\r\n\r\n```swift\r\ncontroller?.render(images:  images) { percent in\r\n\r\n} completion: { error in\r\n                \r\n}\r\n```\r\n\r\n5. Once the `completion` handler has been called without an error, you call the `finish()` method to produce the video. The video can be found at the output URL that was provided in the render settings.\r\n\r\n```swift\r\ncontroller?.finish { outputUrl in\r\n// Video now available at output URL provided.\r\n}\r\n```\r\n\r\n\r\n## Putting it all together\r\n\r\nIn conclusion, to render out an sequence of images, use full code is below:\r\n\r\n```swift\r\nlet outputUrl = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first!.appendingPathComponent(\"\\(UUID().uuidString).mp4\")\r\n\r\nlet renderSettings = RenderSettings(bitrate: 10000000,\r\n                                    size: CGSize(width: 1920,\r\n                                    height: 1080),\r\n                                    fps: 24,\r\n                                    outputUrl: outputUrl)\r\n\r\nlet controller = try? ImageSequencerFactory.make(settings: settings)\r\ncontroller?.start()\r\n    \r\ncontroller?.render(images:  images) { percent in\r\n    // Update the user on progress here.\r\n} completion: { error in\r\n    if error == nil {\r\n        controller?.finish { outputUrl in\r\n            // Video now available at output URL provided.\r\n        }\r\n    }\r\n}\r\n```\r\n\r\nA sample app is included.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamst-one%2Fimagesequencer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamst-one%2Fimagesequencer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamst-one%2Fimagesequencer/lists"}