Playing mp4 audio

I have been using the FMOD API to play mp3 audio from file with no problems but when I plug in an mp4 file all of the FMOD_RESULTs return OK but no sound plays.

Is there an extra step or something that is needed to play the audio track from an mp4 file?

Ed

MP4 is a multipurpose/video format that isn’t supported in the FMOD API. You can see a list of all supported formats at the following link:

https://www.fmod.com/resources/documentation-api?version=2.02&page=core-api-sound.html#fmod_sound_type

Richard,

This is where I got the idea that .mp4 was supported. Down the page a bit is this

FMOD_SOUND_TYPE_MEDIA_FOUNDATION
Microsoft Media Foundation decoder (.asf, .wma, .wmv, .mp4, .m4a). Platform provided decoder, available only on UWP.

Now maybe it is that last bit about UWP. I don’t know what that means but does it mean that if I get the UWP decoder that I can then use mp4?

Ed

My mistake - I’ve double checked with our development team and they’ve informed me that the three instances mp4 is supported (Android, iOS, UWP) is tied to the method it has been built with. I believe it isn’t possible to simply grab the decoder from within a baked UWP app and use it elsewhere. We would not be able to provide any support for if this was somehow managed.

Richard,

Thank you for getting back to me. That saves me time researching UWP only to discover that it was a blind alley.

Ed

Richard,

Is it possible, then, to play the audio from an AVI video file?

Ed

AVI is a container format which could contain all kinds of audio formats. We don’t supports parsing AVI, so FMOD probably wouldn’t be able to find the audio unless it was MP3. You can use FMOD_MPEGSEARCH which might be able to find the MP3.

https://www.fmod.com/resources/documentation-api?version=2.02&page=core-api-common.html#fmod_mode

Richard,

Thanks for pointing me in the right direction. I take a look at that.

Ed