                         }
                         
                         videoInput.appendSampleBuffer(videoSampleBuffer)
+                        videoBuffers += 1
                         lastVideoPts = CMSampleBufferGetPresentationTimeStamp(videoSampleBuffer)
                         
                         if VideoMergeManagerPrintPts {

        // Audio output
        let audioTracks = asset.tracksWithMediaType(AVMediaTypeAudio)
        if audioTracks.count > 0 {
            audioOutput = AVAssetReaderTrackOutput(track: asset.tracksWithMediaType(AVMediaTypeAudio).first!, outputSettings: nil)
            if assetReader!.canAddOutput(audioOutput!) {
                assetReader!.addOutput(audioOutput!)
            }

                            }
                            
                            audioInput!.appendSampleBuffer(audioSampleBuffer)
                            audioBuffers += 1
                            lastAudioPts = currentPts
                            lastAudioDuration = duration
                            
