How/where to encode MV-HEVC stereo video?

Where can I find sample video, sample encoding apps, viewing apps, etc?

I see specs, high level explanations, etc. but not finding any samples or command lines or app documentation to explain how to make and view these files.

Thank you, looking forward to promoting a spatial video rich future.

Answered by Vision Pro Engineer in 790025022

Here is sample code to write MV-HEVC. https://developer.apple.com/documentation/avfoundation/media_reading_and_writing/converting_side-by-side_3d_video_to_multiview_hevc_and_spatial_video For playback, there are some APIs mentioned in this video: https://developer.apple.com/videos/play/wwdc2024/10166/

Also curious on this. The visionOS (beta 3) SDK does include a sample Spatial Photo in the Photos app, but I've not come across any sample MV-HEVC videos or tools to convert any media into MV-HEVC. It's worth nothing that there are some AVAssetExportPresets that support MV-HEVC (such as this AVAssetExportPresetMVHEVC1440x1440, but I've not been able to get it to work with any media; it just throws an error off the bat.

Not sure if this is it, but when you open a movie in quicktime, you can do export > 4k> and choose HEVC. I used that to convert a video which I'm trying to show as a 360 video using the script from here: https://developer.apple.com/forums/thread/734081 Although it seems strange that there is no better way to show 360 content to the user, let alone stereoscopic 360 content. @Apple, any tips?

You can encode a left/right stereoscopic video into MV-HEVC on Halocline, https://haloclinetech.com. I am directly involved in the app's production, so I would be happy to help out with any of your needs.

Hi, I would like read the left and right image from an apple 3D Spatioal Video (mv-hevc). I have a code for read 2D Videos with AVAssetImageGenerator. Can you help me with Xcode, Objective C?

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];
}

Has anybody found a way to convert Full Side by Side 3D videos to the MV-HEVC format in 4K? I've used the app Spatialify to convert my 3D content to 1080P MV-HEVC but am not finding anything that will do this for 4K. Is it Possible? With the Vision Pro launching Friday, I'd think there would be an official Apple converter to use to perform this task

If you want the end of this video (around 8:20) https://www.youtube.com/watch?v=BHtKOxGEiAw

You'll see the 3D guru Hugh Hou talk about using this free command line tool from Mike Swanson:

https://blog.mikeswanson.com/spatial

It works ready well.

The Spatialfy app works too, but I like the control, performance and overall look of the final product using the command line.

Accepted Answer

Here is sample code to write MV-HEVC. https://developer.apple.com/documentation/avfoundation/media_reading_and_writing/converting_side-by-side_3d_video_to_multiview_hevc_and_spatial_video For playback, there are some APIs mentioned in this video: https://developer.apple.com/videos/play/wwdc2024/10166/

It is worth noting that the Apple MV-HEVC decoder does not currently support ALPHA.
I ended up making my own video player to get spatial video with alpha.

How/where to encode MV-HEVC stereo video?
 
 
Q