{"id":19805610,"url":"https://github.com/remirobert/splime","last_synced_at":"2025-05-01T06:31:18.028Z","repository":{"id":62455881,"uuid":"50018364","full_name":"remirobert/Splime","owner":"remirobert","description":"Splime, is a tool, lets you to split a video into frames.","archived":false,"fork":false,"pushed_at":"2016-01-21T05:23:58.000Z","size":2904,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-22T16:44:56.385Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/remirobert.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}},"created_at":"2016-01-20T09:11:39.000Z","updated_at":"2024-09-14T19:05:30.000Z","dependencies_parsed_at":"2022-11-02T00:00:33.980Z","dependency_job_id":null,"html_url":"https://github.com/remirobert/Splime","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remirobert%2FSplime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remirobert%2FSplime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remirobert%2FSplime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remirobert%2FSplime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/remirobert","download_url":"https://codeload.github.com/remirobert/Splime/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251835597,"owners_count":21651678,"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":[],"created_at":"2024-11-12T09:04:40.225Z","updated_at":"2025-05-01T06:31:17.624Z","avatar_url":"https://github.com/remirobert.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src =\"https://cloud.githubusercontent.com/assets/3276768/12470123/bfe1a198-c045-11e5-8960-7b5d59c4c8da.png\"/\u003e\n\u003c/p\u003e\n\u003c/br\u003e\n\n**Splime**, is a tool, lets you to *split a video into frames*. It allows you to collect some informations about the video itself, in the same time. Splime use **AVFoundation** framework.\n\n#Installation 💾\n**Splime** is avalaible on **cocoapods**.\nSimply add this on your **Podfile** :\n\n```ruby\nuse_frameworks!\npod 'Splime', '~\u003e 1.0.1'\n```\n\n#Usage 🛠\n\n**Splime**, return you a completion block : **(images: [UIImage]) -\u003e ()**, to let's you get the splited frames. And also an *optional* progress block : **((progress: Float) -\u003e ())?**, to follows the progress of the spliter.\n\n```swift\nvideoSpliter = Splime(url: stringPath)\nvideoSpliter.split({ (images) -\u003e () in\n    //use the [UIImage], images frames            \n  }, progressBlock: { (progress) -\u003e () in\n    print(\"current progress : [\\(progress)]\")\n})\n```\n\n#Video informations 📊\n\n**Splime** gathers some informations relative to the video. **Splime** can also be used for that usage.\nYou can collect, the **total number** of frames in the video, the **total duration** (in second), the **time per frame**, and so on. When you init a new **Splime** object with a valid video's URL, or set a new URL, **Splime** with fill a struct with all that informations. All this informations, are read-only for safety ⚠️, because they are used in the split method.\n\n```Swift\nvideoSpliter = Splime(url: stringPath)\n//Informations collected\n\nvideoSpliter.url = stringPath2\n//new Informations collected\n\n//get informations:\nvideoSpliter.assetInformations.timeScale\nvideoSpliter.assetInformations.timeValuePerFrame\nvideoSpliter.assetInformations.totalFrames\nvideoSpliter.assetInformations.totalSeconds\nvideoSpliter.assetInformations.frameRate\n```\n\n#Configuration ⚙\n\n**Splime** gives you the ability to configure the way you want to separate frames.\nYou can specifie:\n- A **time interval**, for example split from 4 sec to 15 sec, of the video.\n- A number of maximal amount of frames you want (*I want 60 frames at the maximal, and no matter what !!*)\n- The number of frames per interval. For example I want to take a frame every 10.\n\n```swift\n//For the time interval, CMTime is used, to let you use, a very high precision.\n//You can use the same timeScale as the video, avalaible in the video information.\n//Split the frames from the 4 secondes, to the 10 secondes.\nvideoSpliter.startInterval = CMTimeMake(4, videoSpliter.assetInformations.timeScale)\nvideoSpliter.endInterval = CMTimeMake(10, videoSpliter.assetInformations.timeScale)\n\n//Keep only one frame, every 5.\nvideoSpliter.everyFrames = 5\n\n//Keep only 35 maximum frames.\n//Can be used to limit the memory usage, if the video can.\nvideoSpliter.totalFrames = 35\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremirobert%2Fsplime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fremirobert%2Fsplime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremirobert%2Fsplime/lists"}