MonoGame/MonoGame · error · NotSupportedException
XMA is not a supported encoding format. It is specific to th
Error message
XMA is not a supported encoding format. It is specific to the Xbox 360.
What it means
Thrown explicitly by DefaultAudioProfile.ConvertToFormat when ConversionFormat.Xma is requested. XMA (Xbox Media Audio) is an Xbox 360-only codec not supported by the cross-platform ffmpeg-based pipeline, so the request is rejected up front with NotSupportedException.
Source
Thrown at MonoGame.Framework.Content.Pipeline/Audio/DefaultAudioProfile.cs:316
// XNA seems to preserve the bit size of the input
// format when converting to PCM.
if (content.Format.BitsPerSample == 8)
ffmpegCodecName = "pcm_u8";
else if (content.Format.BitsPerSample == 32 && content.Format.Format == 3)
ffmpegCodecName = "pcm_f32le";
else
ffmpegCodecName = "pcm_s16le";
ffmpegMuxerName = "wav";
//format = 0x0001; /* WAVE_FORMAT_PCM */
break;
case ConversionFormat.WindowsMedia:
// Windows Media Audio 2
ffmpegCodecName = "wmav2";
ffmpegMuxerName = "asf";
//format = 0x0161; /* WAVE_FORMAT_WMAUDIO2 */
break;
case ConversionFormat.Xma:
throw new NotSupportedException(
"XMA is not a supported encoding format. It is specific to the Xbox 360.");
case ConversionFormat.ImaAdpcm:
// ADPCM IMA WAV
ffmpegCodecName = "adpcm_ima_wav";
ffmpegMuxerName = "wav";
//format = 0x0011; /* WAVE_FORMAT_IMA_ADPCM */
break;
case ConversionFormat.Aac:
// AAC (Advanced Audio Coding)
// Requires -strict experimental
ffmpegCodecName = "aac";
ffmpegMuxerName = "ipod";
//format = 0x0000; /* WAVE_FORMAT_UNKNOWN */
break;
case ConversionFormat.Vorbis:
// Vorbis
ffmpegCodecName = "libvorbis";
ffmpegMuxerName = "ogg";View on GitHub (pinned to 1d71bbd0ff)
Solutions
- Choose a supported format: ConversionFormat.Pcm, Adpcm, ImaAdpcm, WindowsMedia, Aac, Vorbis, or Mp3.
- If targeting Xbox 360 specifically, use the Xbox 360 platform toolchain (not the open-source pipeline).
- Update the processor's ConversionFormat property in the .mgcb to a non-XMA value.
- Remove or replace any Xma references in content processor parameters.
Example fix
// before DefaultAudioProfile.ConvertToFormat(content, ConversionFormat.Xma, quality, file); // throws // after DefaultAudioProfile.ConvertToFormat(content, ConversionFormat.Adpcm, quality, file);
Defensive patterns
Strategy: validation
Validate before calling
// Reject XMA before conversion
if (formatType == ConversionFormat.Xma)
throw new ArgumentOutOfRangeException(nameof(formatType), "XMA is Xbox 360 only; choose a supported format.");
DefaultAudioProfile.ConvertToFormat(content, formatType, quality, file); Try / catch
try { ConvertToFormat(content, fmt, quality, file); }
catch (NotSupportedException ex) when (ex.Message.Contains("XMA"))
{ /* pick Pcm/Adpcm/etc. instead */ } Prevention
- Never select ConversionFormat.Xma outside the Xbox 360 toolchain.
- Audit migrated XNA projects for stale XMA references in processor parameters.
- Default new projects to PCM/ADPCM/Vorbis.
When it happens
Trigger: Calling ConvertToFormat (or a processor/config that selects XMA) with ConversionFormat.Xma. Typically arises from a .mgcb or processor parameter inherited from an XNA/Xbox 360 project targeting XMA output.
Common situations: Migrating an old XNA Xbox 360 project whose content was configured for XMA. A processor defaulting to Xma. A misconfigured conversion format enum.
Related errors
- ffmpeg exited with non-zero exit code: {ffmpegStdout} {ffmp
- Could not read the audio data from file "{Path.GetFileName(F
- Incorrect file type! Expected '.wav' but found '.{_fileType}
- Calculated block align does not match RIFF {_format.BlockAli
- Probed channel count does not match RIFF: {_format.ChannelCo
AI-assisted analysis of MonoGame/MonoGame@1d71bbd0ff (2026-08-13).
Data as JSON: /api/errors/33d55eac4737bb3c.
Report an issue: GitHub.