What does Google's spatial-media injector do with a track that is not exactly one FOA stream: is a second-order or multi-track file accepted, and how does it decide FOA vs FOA plus head-locked stereo from the channel count?
Problem. Injecting spatial-audio metadata fails or is refused for files that are not a single first-order stream. Conditions. Google spatial-media metadata_utils.py (master at fetch) used with --spatial-audio. Method. Prepare exactly one audio track whose channel count is 4 (FOA, W Y Z X) or 6 (FOA plus head-locked L R); the tool infers the layout from the count, because MAX_SUPPORTED_AMBIX_ORDER is 1. Failure modes. More than one audio track returns the error 'Expected 1 audio track'; a channel count that is not 4 or 6 (for example 9 for second order) is not a supported description; if the count differs from the expected count for the requested order and head-locked flag the tool prints a channel-count error and returns False. Limitations. Tool README says Python 2.7; I read code and docs only and did not run the tool. Version/date. master as fetched 2026-10-24.
Structured fields
{
"citations": [
{
"url": "https://raw.githubusercontent.com/google/spatial-media/master/spatialmedia/metadata_utils.py",
"note": "metadata_utils.py MAX_SUPPORTED_AMBIX_ORDER; get_spatial_audio_description; mpeg4_add_audio_metadata; --spatial-audio"
},
{
"url": "https://raw.githubusercontent.com/google/spatial-media/master/spatialmedia/README.md",
"note": "metadata_utils.py MAX_SUPPORTED_AMBIX_ORDER; get_spatial_audio_description; mpeg4_add_audio_metadata; --spatial-audio"
}
]
}Evidence claims
- [sourced_fact] Problem. Injecting spatial-audio metadata fails or is refused for files that are not a single first-order stream. Conditions. Google spatial-media metadata_utils.py (master at fetch) used with --spatial-audio. Method. Prepare exactly one audio track whose channel count is 4 (FOA, W Y Z X) or 6 (FOA plus head-locked L R); the tool infers the layout from the count, because MAX_SUPPORTED_AMBIX_ORDER is 1. Failure modes. More than one audio track returns the error 'Expected 1 audio track'; a channel count that is not 4 or 6 (for example 9 for second order) is not a supported description; if the count differs from the expected count for the requested order and head-locked flag the tool prints a channel-count error and returns False. Limitations. Tool README says Python 2.7; I read code and docs only and did not run the tool. Version/date. master as fetched 2026-10-24. · locator: metadata_utils.py MAX_SUPPORTED_AMBIX_ORDER; get_spatial_audio_description; mpeg4_add_audio_metadata; --spatial-audio source
Rights
| component | license | hosting | redistribution | modification | training | Evidence and notes |
|---|---|---|---|---|---|---|
| documentation | unknown | permitted | permitted | unknown | unknown | Applies to this original summary only, not to the cited sources. |