Code Monkey home page Code Monkey logo

mergevideos's Issues

merge 15 to 20 images

i have used MergeVideos library making 15 to 20 images from video but issue come

Domain = AVFoundationErrorDomain Code=-11839 "Cannot Decode" UserInfo={NSLocalizedDescription=Cannot Decode, NSUnderlyingError=0x10e16d6c0 {Error Domain=NSOSStatusErrorDomain Code=-12913 "(null)"}, NSLocalizedRecoverySuggestion=Stop any other actions that decode media and try again., NSLocalizedFailureReason=The decoder required for this media is busy.}

Video Output Size Not Adjusted

Great job on incorporating video orientation! However, the output is not correctly adjusted when merging multiple videos. So when one video is portrait the size is adjusted, but the output is never adjusted again when the video is landscape. The result is correct orientation but the width is cut-off for landscape videos.

My change was simply to set outputSize equal to videoSize when the video is not portrait.

 if assetInfo.isPortrait == true {
                videoSize.width = videoTrack.naturalSize.height
                videoSize.height = videoTrack.naturalSize.width
            }
            else
            {
                outputSize = videoSize
            }

How to make videos fill desired size?

I really like this framework but I need help with extra functionality. I want videos to fill the desired size (for example: 1080x1920). Because now landscape videos are not being filled. It would be great to get tips how I could achieve that. (basically something similar like videoGravity - aspectFill).

Video background noise

Hi,

I am merging 2 3 videos, final merged video contains some background noise in it,
Please update, is there a way to remove noise?
I was thinking that there might be some issue with UIIMagePickerController.
But it's the final video that contains noise.

Not working when you set custom duration

Video merge is not working if you set let duration = 0.5.toCMTime(). It says Error:Operation Stopped. (although it's working if you're not exporting it to URL but use this video as PlayerItem).
Another problem is that it's also not working if you want to merge for example 20-30 videos or more.(not working in all scenarios).

Any thoughts why?

Landscape video merging issue

Hi,
While merging one or more landscape videos shows a black screen . its audio get merged but the video is just a black screen

Black BG Clip issue

Hi,
Whenever I try to merge a video with an image, There is a blank clip added at the start of the video. How I can get rid of it?

Landscape issue

When the video is saved in the device or we play in AVPlayerController after selecting landscape videos for merging. When I rotate the device to landscape its landscape aspect ratio is breaking.
IMG_0316

Audio Issue

I found that the audio would cut-off in the second merged video. I believe the issue is with the implementation of the audioCompositionTrack. For that the startTime should be kCMTimeZero in all cases. Here is the correction I made which fixed the issue:

// Add audio track to audio composition at specific time

            if let audioTrack = audioTrack {
                try audioCompositionTrack?.insertTimeRange(CMTimeRangeMake(startTime, duration),
                                                           of: audioTrack,
                                                           at: insertTime)
            }

Cannot Open error while merging two videos

I am merging two videos with this code:

let urlVideo1 = Bundle.main.url(forResource: "gif2vid", withExtension: "mp4")
let urlVideo2 = Bundle.main.url(forResource: "mergedVideo", withExtension: "mp4")
let videoAsset1 = AVAsset(url: urlVideo1!)
let videoAsset2 = AVAsset(url: urlVideo2!)
KVVideoManager.shared.merge(arrayVideos: [videoAsset1, videoAsset2], completion: { (final_URL, error) in
        print("final_URL:=",final_URL as Any)
        print("Error:=",error?.localizedDescription ?? "")
})

It prints final_URL but video is not available there. It prints error: Cannot Open

merge issue

i am merging image with video but i's not working.

Black frame

It seems you haven't updated the source code with this gap. the problem remains. file date 19/10/21
Fix issue: merging videos shows black screen sometimes. (update videoCompositionInstructionForTrack function)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.