ios – Extract the 3D Stereo Images from a 3D Video in Apple Format mv-hevc


I would like to extract both 3D stereo images (left/right) from a 3D spatial video in mv-hevc Apple format.

Here is my code to read a 2D Video:

NSURL *inputVideoURL = [NSURL fileURLWithPath:inputVideoPath]; 
AVURLAsset *inputAsset = [AVURLAsset URLAssetWithURL:inputVideoURL options:nil];
AVAssetImageGenerator *imageGenerator = [AVAssetImageGenerator assetImageGeneratorWithAsset:inputAsset]; 

for (int i=1;i<=maxx;i++) { 
    CMTime time = CMTimeMake(i, (int32_t)frameRate); //CMTimeMakeWithSeconds(i * (1.0 / frameRate), CGImageRef imageRef = [imageGenerator copyCGImageAtTime:time actualTime:NULL error:&error]; 
    UIImage *image=nil; 
    image = [UIImage imageWithCGImage:imageRef];
}

Latest articles

spot_imgspot_img

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

spot_imgspot_img