{"id":21635684,"url":"https://github.com/levantaj/videoeditor","last_synced_at":"2025-04-11T15:42:52.281Z","repository":{"id":56925953,"uuid":"304845877","full_name":"levantAJ/VideoEditor","owner":"levantAJ","description":"Merge \u0026 adjust volume of multiple audios into video","archived":false,"fork":false,"pushed_at":"2020-11-08T03:20:29.000Z","size":22,"stargazers_count":13,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T10:49:58.058Z","etag":null,"topics":["audio","audio-editor","audio-processing","cocoapods","ios","manupulation","merge","overlays","swift","video","video-editor","video-merge","video-processing","volume"],"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/levantAJ.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":"2020-10-17T09:48:14.000Z","updated_at":"2025-03-26T05:25:14.000Z","dependencies_parsed_at":"2022-08-20T22:50:32.313Z","dependency_job_id":null,"html_url":"https://github.com/levantAJ/VideoEditor","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/levantAJ%2FVideoEditor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levantAJ%2FVideoEditor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levantAJ%2FVideoEditor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levantAJ%2FVideoEditor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/levantAJ","download_url":"https://codeload.github.com/levantAJ/VideoEditor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248433332,"owners_count":21102560,"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":["audio","audio-editor","audio-processing","cocoapods","ios","manupulation","merge","overlays","swift","video","video-editor","video-merge","video-processing","volume"],"created_at":"2024-11-25T03:23:59.271Z","updated_at":"2025-04-11T15:42:52.257Z","avatar_url":"https://github.com/levantAJ.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Pod Version](https://cocoapod-badges.herokuapp.com/v/VideoEditor/badge.png)](http://cocoadocs.org/docsets/VideoEditor/)\n[![Pod Platform](https://cocoapod-badges.herokuapp.com/p/VideoEditor/badge.png)](http://cocoadocs.org/docsets/VideoEditor/)\n[![Pod License](https://cocoapod-badges.herokuapp.com/l/VideoEditor/badge.png)](https://www.apache.org/licenses/LICENSE-2.0.html)\n\n# 📽 VideoEditor\n*VideoEditor* facilitates video editing\n\n## Requirements\n\n- iOS 9.0 or later\n- Xcode 11.0 or later\n\n## Install\n\n### Installation with CocoaPods\n\n```ruby\npod 'VideoEditor', '1.1'\n```\n\n### Build Project\n\nAt this point your workspace should build without error. If you are having problem, post to the Issue and the\ncommunity can help you solve it.\n\n## How to use:\n\n```swift\nimport VideoEditor\n```\n\n### Merge multiple audios to a video.\n1: Prepare the source video asset.\n \n```swift\nlet videoAsset = VideoEditor.Asset(localURL: yourVideoLocalURL, volume: 1)\n``` \n- With `volume`, you can able to adjust to volume of video in 0...1\n\n2: Prepare the audios\n\n```swift\nlet firstAudioAsset = VideoEditor.Asset(localURL: firstAudioLocalURL, volume: 0.5, startTime: .zero, duration: videoDuration)\n\nlet secondAudioAsset = VideoEditor.Asset(localURL: secondAudioLocalURL, volume: 0.7, startTime: CMTime(seconds: 2, preferredTimescale: CMTimeScale(NSEC_PER_SEC)), duration: secondAudioDuration)\n```\n\n- `startTime` is the point of time that you wanna add your audio into the final video, e.g. add set `startTime` as `CMTime(seconds: 3, preferredTimescale: CMTimeScale(NSEC_PER_SEC))` to tell engine to start add this audio from the third second of the final video.\n\n- `duration` indicates how long the audio will be added into the final video from the `startTime`. Usually set it equal to the audio asset duration. Set `nil` to tell the `duration` is its duration.\n\n3: Start to merge\n\n```swift\nlet videoEditor = VideoEditor()\nvideoEditor.merge(video: videoAsset, audios: [firstAudioAsset, secondAudioAsset], progress: { progress in\n    print(progress)\n}, completion: { result in\n    switch result {\n    case .success(let videoURL):\n    \tprint(videoURL)\n    case .failure(let error):\n    \tprint(error)\n    }\n})\n```\n\n## Author\n- [Tai Le](https://github.com/levantAJ)\n\n## Communication\n- If you **found a bug**, open an issue.\n- If you **have a feature request**, open an issue.\n- If you **want to contribute**, submit a pull request.\n\n\n## Licenses\n\nAll source code is licensed under the [MIT License](https://raw.githubusercontent.com/levantAJ/VideoEditor/master/LICENSE).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevantaj%2Fvideoeditor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flevantaj%2Fvideoeditor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevantaj%2Fvideoeditor/lists"}