3D Stereo Video
Packed side-by-side or top-bottom stereo video is supported on all platforms.
For best results, pad the video size to a multiple to 16 pixels. This will guarantee accurate left-right extraction on all platforms.
The stereo packing format of the video will be detected automatically by AVPro Video if the correct metadata is embedded during encoding. There are two standards for specifying stereo:
- Currently the st3d box / atom is supported on all platforms (except DirectShow API in Windows, and MediaPlayer API on Android). This is the best method to use.
- Stereo videos without the above atom may also have stereo data embedded as "SEI FPA (frame packing arrangement)", however this automatic detection of this is currently only supported on Windows.
If the auto-detection is not able to determine the stereo packing format (perhaps because the information is not encoded into the video file), then the packing format can be explicitly set via the MediaReference asset, or as a fallback MediaHint in the MediaPlayer when not loading from a MediaReference.
Stereo packing hints can also be set via scripting:
// Setting the fallback stereo packing on the MediaPlayer when loading videos via the Path MediaSource MediaHints hints = mediaPlayer.FallbackMediaHints; hints.stereoPacking = StereoPacking.TopBottom; mediaPlayer.FallbackMediaHints = hints;
Getting Stereo Packing Mode
The stereo packing mode that is either automatically detected, or manually specified can be retrieved via scripting:
// Get the stereo packing mode that is used StereoPacking videoStereoPacking = mediaPlayer.TextureProducer.GetTextureStereoPacking();
Forcing Stereo Eye Mode
It's possible to force the eye mode as well via scripting:
// Use the static VideoRender class to force a stereo eye mode on a material (eg Material used in ApplyToMesh/ApplyToMaterial) VideoRender.SetupStereoEyeModeMaterial(material, StereoEye.Left);
Be sure to include the UpdateMultiPassStereo component if your stereo application will run in multi-pass mode.