All Projects → Datt1994 → DPVideoMerger-Swift

Datt1994 / DPVideoMerger-Swift

Licence: Apache-2.0 license
Multiple videos merge in one video with manage scale & aspect ratio and also merge videos to grid matrix layout for Swift.

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to DPVideoMerger-Swift

DPVideoMerger
Multiple videos merge in one video with manage scale & aspect ratio and also merge 4 videos to grid layou for Objective C.
Stars: ✭ 12 (-75.51%)
Mutual labels:  videos, merger, merge-videos, video-merger
Angular Grid Layout
Responsive grid with draggable and resizable items for Angular applications.
Stars: ✭ 163 (+232.65%)
Mutual labels:  grid, grid-layout
React Awesome Styled Grid
A responsive 8-point grid system layout for React using styled-components
Stars: ✭ 157 (+220.41%)
Mutual labels:  grid, grid-layout
Magic Grid
A simple, lightweight Javascript library for dynamic grid layouts.
Stars: ✭ 2,827 (+5669.39%)
Mutual labels:  grid, grid-layout
React Photo Layout Editor
Photo layout editor for react
Stars: ✭ 96 (+95.92%)
Mutual labels:  grid, grid-layout
Bootstrap Grid Css
The grid and responsive utilities classes extracted from the Bootstrap 4 framework, compiled into CSS.
Stars: ✭ 119 (+142.86%)
Mutual labels:  grid, grid-layout
Grd
A CSS grid framework using Flexbox. Only 321 bytes (Gzipped).
Stars: ✭ 2,210 (+4410.2%)
Mutual labels:  grid, grid-layout
React Native Grid List
🌁 Grid list component implemented with FlatList
Stars: ✭ 74 (+51.02%)
Mutual labels:  grid, grid-layout
grid-container
A grid for the future, CSS Grid Layout + Web Components (Custom Elements v1 + Shadow DOM v1)
Stars: ✭ 51 (+4.08%)
Mutual labels:  grid, grid-layout
60gs
60GS - 60 Columns Grid System based on CSS Grid Layout
Stars: ✭ 65 (+32.65%)
Mutual labels:  grid, grid-layout
flex-box-grid
Responsive, mobile first Flexbox Grid
Stars: ✭ 39 (-20.41%)
Mutual labels:  grid, grid-layout
React Rasta
React Rasta is a powerful and flexible grid system for React
Stars: ✭ 88 (+79.59%)
Mutual labels:  grid, grid-layout
Grid Cheatsheet
CSS Grid cheat sheet
Stars: ✭ 83 (+69.39%)
Mutual labels:  grid, grid-layout
Popo
PoPo is the grid layout tool, the best choice for runtime layout.
Stars: ✭ 130 (+165.31%)
Mutual labels:  grid, grid-layout
Interior
Design system for the modern web.
Stars: ✭ 77 (+57.14%)
Mutual labels:  grid, grid-layout
Reactsimpleflexgrid
A way to quickly add a Grid Layout to your React app 🚀
Stars: ✭ 181 (+269.39%)
Mutual labels:  grid, grid-layout
Vue Grid Layout
A draggable and resizable grid layout, for Vue.js.
Stars: ✭ 5,170 (+10451.02%)
Mutual labels:  grid, grid-layout
Dragact
a dragger layout system with React style .
Stars: ✭ 710 (+1348.98%)
Mutual labels:  grid, grid-layout
gridbugs-ru
Перевод списка багов в CSS Grid Layout, курируемого Рейчел Эндрю
Stars: ✭ 27 (-44.9%)
Mutual labels:  grid, grid-layout
grid-garden
Solutions to CSS Grid Garden
Stars: ✭ 79 (+61.22%)
Mutual labels:  grid, grid-layout

DPVideoMerger-Swift

Platform Language: Swift 5 License Version Carthage compatible

Sequence Parallel Grid
Sequence Parallel Grid

Installation with CocoaPods

CocoaPods is a dependency manager for Objective-C & Swift. You can install it with the following command:

$ gem install cocoapods

Podfile

To integrate DPVideoMerger into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'

target 'TargetName' do
use_frameworks!
pod 'DPVideoMerger-Swift'
end

Then, run the following command:

$ pod install

Installation with Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate DPVideoMerger-Swift into your Xcode project using Carthage, specify it in your Cartfile:

github "Datt1994/DPVideoMerger-Swift"

Run carthage to build the framework and drag the framework (DPVideoMerger_Swift.framework) into your Xcode project.

Installation with Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler.

To add the library as package dependency to your Xcode project, select File > Swift Packages > Add Package Dependency and enter its repository URL https://github.com/Datt1994/DPVideoMerger-Swift.git

Add Manually

Download Project and copy-paste DPVideoMerger.swift file into your project

Usage

import AVKit

let fileURL = Bundle.main.url(forResource: "1", withExtension: "mp4")
let fileURL1 = Bundle.main.url(forResource: "2", withExtension: "mp4")
let fileURL2 = Bundle.main.url(forResource: "3", withExtension: "MOV")
let fileURL3 = Bundle.main.url(forResource: "4", withExtension: "mp4")
let fileURLs = [fileURL, fileURL1, fileURL2, fileURL3]


/// Multiple videos merge in one video with manage scale & aspect ratio
/// - Parameters:
///   - videoFileURLs: Video file path URLs, Array of videos that going to merge
///   - videoResolution: Output video resolution, (defult:  CGSize(width: -1, height: -1), find max width and height from provided videos)
///   - videoQuality: AVAssetExportPresetMediumQuality(default) , AVAssetExportPresetLowQuality , AVAssetExportPresetHighestQuality
///   - completion: Completion give  2 optional  values, 1)mergedVideoURL: URL path of successfully merged video   2)error: Gives Error object if some error occur in videos merging process
///   - mergedVideoURL: URL path of successfully merged video
///   - error: Gives Error object if some error occur in videos merging process
DPVideoMerger().mergeVideos(withFileURLs: fileURLs as! [URL], completion: {(_ mergedVideoFile: URL?, _ error: Error?) -> Void in
    if error != nil {
        let errorMessage = "Could not merge videos: \(error?.localizedDescription ?? "error")"
        let alert = UIAlertController(title: "Error", message: errorMessage, preferredStyle: .alert)
        alert.addAction(UIAlertAction(title: "OK", style: .default, handler: { (a) in
        }))
        self.present(alert, animated: true) {() -> Void in }
        return
    }
    let objAVPlayerVC = AVPlayerViewController()
    objAVPlayerVC.player = AVPlayer(url: mergedVideoFile!)
    self.present(objAVPlayerVC, animated: true, completion: {() -> Void in
        objAVPlayerVC.player?.play()
    }) 
})


/// Merge  videos to grid matrix layout
/// - Parameters:
///   - videoFileURLs: Video file path URLs, Array of videos that going to grid merge
///   - matrix: Video matrix position (eg 3x3, 4x2, 1x3, ...) (default:- 2x2)
///   - audioFileURL: Optional audio file for Merged Video
///   - videoResolution: Output video resolution
///   - isRepeatVideo: Repeat Video on grid if one or more video have shorter duartion time then output video duration
///   - isRepeatAudio: Repeat Audio if Merged video have longer duartion time then provided Audio duration
///   - isAudio: Allow Audio for grid video (default :- true)
///   - videoDuration: Output video duration (defult:  -1, find max duration from provided  videos)
///   - videoQuality: AVAssetExportPresetMediumQuality(default) , AVAssetExportPresetLowQuality , AVAssetExportPresetHighestQuality
///   - completion: completion give  2 optional  values, 1)mergedVideoURL: URL path of successfully grid merged video  2)error: gives Error object if some error occur in videos merging process
///   - mergedVideoURL: URL path of successfully grid merged video
///   - error: gives Error object if some error occur in videos merging process
DPVideoMerger().gridMergeVideos(withFileURLs: fileURLs, videoResolution: CGSize(width: 1000, height: 1000), completion: {(_ mergedVideoFile: URL?, _ error: Error?) -> Void in
    if error != nil {
        let errorMessage = "Could not merge videos: \(error?.localizedDescription ?? "error")"
        let alert = UIAlertController(title: "Error", message: errorMessage, preferredStyle: .alert)
        alert.addAction(UIAlertAction(title: "OK", style: .default, handler: { (a) in
        }))
        self.present(alert, animated: true) {() -> Void in }
        return
    }
    let objAVPlayerVC = AVPlayerViewController()
    objAVPlayerVC.player = AVPlayer(url: mergedVideoFile!)
    self.present(objAVPlayerVC, animated: true, completion: {() -> Void in
        objAVPlayerVC.player?.play()
    })
})
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].