Gauri rawat
Gauri rawat

Reputation: 109

Can we merge two video in AVFoundation for implementing pause and play feature functionality

Can we merge two video for implementing pause/play feature in screen recording type application in cocoa.

I did't write code yet. Because first I want to be conform about it that this can be possible.

First start video recording on pressing "Play Button" than stop its session by pressing "pause Button" save its session AVCaptureSession into AVCaptureMovieFileOutput in a temporary directory.

On tapping "Resume Button" again session will be started now pressing "Stop Button" video save in temporary folder, then merge both video into single one and show it

Is it a right way of implementing pause/play functionality.If you have any other logic please share with me .

Upvotes: 0

Views: 336

Answers (1)

birukaze
birukaze

Reputation: 376

Yes, you can. Store captured samples in NSTemporaryDirectory and use AVMutableComposition to merge assets at the end of recording session.

Upvotes: 1

Related Questions