Latest 1.0.0
License Apache 2.0
Platforms ios


For Swift :- DPVideoMerger-Swift

Installation with CocoaPods

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

$ gem install cocoapods


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

source ''
platform :ios, '8.0'

target 'TargetName' do
pod 'DPVideoMerger'

Then, run the following command:

$ pod install

Add Manually

Download Project and copy-paste DPVideoMerger.h & DPVideoMerger.m files into your project


    #import "DPVideoMerger.h"
    #import <AVKit/AVKit.h>
    #import <AVFoundation/AVFoundation.h>

    NSString *filePath = [[NSBundle mainBundle] pathForResource:@"1" ofType:@"mp4"];
    NSURL *fileURL = [NSURL fileURLWithPath:filePath];
    NSString *filePath1 = [[NSBundle mainBundle] pathForResource:@"2" ofType:@"mp4"];
    NSURL *fileURL1 = [NSURL fileURLWithPath:filePath1];
    NSString *filePath2 = [[NSBundle mainBundle] pathForResource:@"3" ofType:@"MOV"];
    NSURL *fileURL2 = [NSURL fileURLWithPath:filePath2];
    NSString *filePath3 = [[NSBundle mainBundle] pathForResource:@"4" ofType:@"mp4"];
    NSURL *fileURL3 = [NSURL fileURLWithPath:filePath3];

    NSArray *fileURLs = @[fileURL, fileURL1,fileURL2,fileURL3];

    [DPVideoMerger mergeVideosWithFileURLs:fileURLs completion:^(NSURL *mergedVideoFile, NSError *error) {
        if (error) {
            NSString *errorMessage = [NSString stringWithFormat:@"Could not merge videos: %@", [error localizedDescription]];
            UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Error" message:errorMessage preferredStyle:UIAlertControllerStyleAlert];
            [self presentViewController:alert animated:YES completion:nil];

        AVPlayerViewController *objAVPlayerVC = [[AVPlayerViewController alloc] init];
        objAVPlayerVC.player = [AVPlayer playerWithURL:mergedVideoFile];
        [self presentViewController:objAVPlayerVC animated:YES completion:^{
            [objAVPlayerVC.player play];

Latest podspec

    "name": "DPVideoMerger",
    "version": "1.0.0",
    "summary": "Multiple videos merge in one video with manage scale and aspect ratio for Objective C.",
    "homepage": "",
    "license": "Apache 2.0",
    "authors": {
        "Datt1994": "[email protected]"
    "platforms": {
        "ios": null
    "source": {
        "git": "",
        "tag": "1.0.0",
        "commit": "a489f35fb7dc6d553e47f93261a9d3a31f148c63"
    "public_header_files": "DPVideoMerger/DPVideoMerger/DPVideoMerger/DPVideoMerger.h",
    "source_files": "DPVideoMerger/DPVideoMerger/DPVideoMerger/DPVideoMerger.{h,m}"

Pin It on Pinterest

Share This