How can I play video with spacial audio stored locally on device?

How can I locally store a video file on my iPhone and play it with spacial audio support using AirPods?

I'm ok transcoding it into a format specific for this. The audio info from mediainfo for the track I'm interested in is below.

Audio #1
ID                                       : 2
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Codec ID                                 : A_AC3
Duration                                 : 1 h 46 min
Bit rate mode                            : Constant
Bit rate                                 : 640 kb/s
Channel(s)                               : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Bit depth                                : 16 bits
Compression mode                         : Lossy
Delay relative to video                  : -5 ms
Stream size                              : 488 MiB (7%)
Title                                    : Surround
Language                                 : English
Service kind                             : Complete Main
Default                                  : Yes
Forced                                   : No

Spatial audio changes the left right balance of any sound. You don’t have to encode anything other than having stereo sound.

  • https://support.apple.com/en-us/HT211775

Playing video from the files app works for me. Whether you choose local storage or Cloud storage, the processing of my head moving relative to the device works.