ios - Reading from two files one after other using avassetreader -
What do I need to merge two movie files? I want to read from the files and write the sample in a different file. How can I read a file and then continue to read the second file. So that I can continuously get sample buffers which can be combined with AVAssetwritter. You need to create an AVMutableComposition, add an AVMutableCompositionTrack and then add each property to AVMutableCompositionTrack.
Here is another question that shows the process adequately.
Once you have AVMutableComposition, you have to associate it with your AVAssetReader. After that, what you are looking for is what it is.
However, if you just want to have a basic stitch (with audio), then note that using AVAssetExport avoids the need to bother with the asset reader and the assetverter and will export once In AVMutableComposition
Note that if you also want audio, then this is another track on your AVMutableComposition.
Comments
Post a Comment