Can you use .ogg AND .m4a on Mobile Exports?

Kudin

Villager
Member
Joined
Oct 18, 2015
Messages
21
Reaction score
5
First Language
English
Soooooo now that it's been released, can anybody answer this question? :)
 

Liak

Veteran
Veteran
Joined
Mar 13, 2012
Messages
1,788
Reaction score
270
First Language
German
Primarily Uses
I have a related question. I hope it's okay to ask it here instead of opening a new topic:

Why do we have everything as OGG and M4A? So it appears iPhone and iPad can't play OGG (right?), but why can't we just use only the M4a files? I'm asking because especially the music and sound files take up a lot of space.
 

KisaiTenshi

Veteran
Veteran
Joined
Oct 24, 2015
Messages
310
Reaction score
124
I have a related question. I hope it's okay to ask it here instead of opening a new topic:

Why do we have everything as OGG and M4A? So it appears iPhone and iPad can't play OGG (right?), but why can't we just use only the M4a files? I'm asking because especially the music and sound files take up a lot of space.
License issues. There is technically no issue in playing the "AAC" audio inside the M4A(MP4) container, but there are patents on the MP4 container AND the H.264 video codec.

The hardware decoding on the mobile devices covers this, but doesn't on stand-alone Chromium for the desktop systems. You're not allowed to distribute "mp4 decoders" without paying licensing fees. So Chrome and Firefox use the hardware decoding available on the OS, if it's available. Chromium does not. Therefor node-webkit does not.
 
Last edited by a moderator:

Liak

Veteran
Veteran
Joined
Mar 13, 2012
Messages
1,788
Reaction score
270
First Language
German
Primarily Uses
Ah, I see. So there's not actually a problem in removing the non-supported versions of the files for the respective distribution of the game, right? I make one distribution for iPhone/iPad and remove the OGG files and then make another one for PC where I remove the M4As?
 

KisaiTenshi

Veteran
Veteran
Joined
Oct 24, 2015
Messages
310
Reaction score
124
Ah, I see. So there's not actually a problem in removing the non-supported versions of the files for the respective distribution of the game, right? I make one distribution for iPhone/iPad and remove the OGG files and then make another one for PC where I remove the M4As?
This is what the game engine does:

AudioManager.audioFileExt = function() { if (WebAudio.canPlayOgg() && !Utils.isMobileDevice()) { return '.ogg'; } else { return '.m4a'; }};AudioManager.shouldUseHtml5Audio = function() { // We use HTML5 Audio to play BGM instead of Web Audio API // because decodeAudioData() is very slow on Android Chrome. return Utils.isAndroidChrome();};AudioManager.createBuffer = function(folder, name) { var ext = this.audioFileExt(); var url = this._path + folder + '/' + encodeURIComponent(name) + ext; if (this.shouldUseHtml5Audio() && folder === 'bgm') { Html5Audio.setup(url); return Html5Audio; } else { return new WebAudio(url); }};A similar thing is done with Video:

Game_Interpreter.prototype.command261 = function() { if (!$gameMessage.isBusy()) { var name = this._params[0]; if (name.length > 0) { var ext = this.videoFileExt(); Graphics.playVideo('movies/' + name + ext); this.setWaitMode('video'); } this._index++; } return false;};Game_Interpreter.prototype.videoFileExt = function() { if (Graphics.canPlayVideoType('video/webm') && !Utils.isMobileDevice()) { return '.webm'; } else { return '.mp4'; }};Note that specific carve out in the game engine is looking for "can play ogg" and "is a not a mobile device"  to play ogg, otherwise it plays m4a. This implementation is a bit too naive since Chrome and Firefox do support wav as well (which might be preferred for sound effects to reduce audio latency) but then there is this footnote

To avoid patent issues, support for MPEG 4, H.264, MP3 and AAC is not built directly into Firefox on desktop and mobile (Android and Firefox OS). Instead it relies on support from the OS or hardware (the hardware also needs to be able to support the profile used to encode the video, in the case of MP4).
Basically there is no guarantee that the browser will have support, so ideally you would test once at game startup if the device can support video and audio formats, then check of those formats of audio exist in your startup sound, which if it fails, you then disable sound playback instead of trying to hamfistedly load the audio every time. Like as an example of this, I did a mobile export that exported m4a and ogg, which the menu worked (because it had no audio) but then threw an error when it displayed the first map because there was no .m4a for that map.
 

Otolitywi

Warper
Member
Joined
Jul 31, 2017
Messages
2
Reaction score
0
First Language
English
Primarily Uses
Other
HI MAN,
I think you can not make a mixture of M4A and OGG because they support by different coding, M4A is seldom compatible with devices except for Apple devices. If you want to play audio on devices other than Apple, then you’d better transfer M4A audio to WAV. Compared with M4A to MP3, M4A audio to WAV can keep the original audio quality. more info you can view: http://www.videoconverterfactory.com/tips/m4a-to-wav.html As for OGG, the Ogg container format can multiplex a number of independent streams for audio, video, text, and metadata. more info: https://en.wikipedia.org/wiki/Advanced_Audio_Coding In fact WAV is good enough for most audio
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,713
First Language
English
Primarily Uses
RMVXA
Are you sure that MV supports WAV? I think it doesn't, but I may be wrong.
 

Otolitywi

Warper
Member
Joined
Jul 31, 2017
Messages
2
Reaction score
0
First Language
English
Primarily Uses
Other
Are you sure that MV supports WAV? I think it doesn't, but I may be wrong.
yes, WAV can be supported, amny people will think that MP3 is compatible, acctually WAV too
 

Nza3

Villager
Member
Joined
Jul 27, 2017
Messages
29
Reaction score
1
First Language
english
Primarily Uses
RMMV
All I can say is if you are deploying your game to Android, make sure to have BOTH .ogg and .m4a files, and DO NOT, DO NOT, DO NOT have mp3 files. This will **** up your game when the files are being loaded unless you've configured it to be able to load mp3 files.

Sorry if it wasn't much help. But that's my experience. I had errors exporting my game to android, (and I'm still having errors with plugins, but at least now it starts and is fully playable) when I tried to use only .ogg or only .m4a files, and when I had lingering .mp3 files.

Hope it helped
 

corthew

Warper
Member
Joined
Oct 23, 2017
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMMV
So why don't they just set it up from the start to use a format that works across the board on all devices. Wav is out of course because, damn they're big. Mp3 on the other-hand is not and I'm not aware of a system that won't play them. Its the most used and distributed music format out there. I play them on my Iphone, my son on his Android, we play them on PC's and I'm pretty sure if Iphone plays them Mac does as well.
It just sounds like they've chosen two formats that have serious limits to what they can play on and that really seems silly to me when Mp3 is an option.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,425
Reaction score
7,710
First Language
German
Primarily Uses
RMMV
It just sounds like they've chosen two formats that have serious limits to what they can play on and that really seems silly to me when Mp3 is an option.
Unfortunately that is not an option, because we are not talking about personal use here.

There are only two options for companies who want to sell something in cases like this:
1) go with the Codecs that are included with the target system.
2) pay for Codecs that you have included yourself.

iOS and Android have different Codecs included, that is the reason why RMMV needs two different formats for its audios, if they had included their own Codecs they would have had to pay for every copy of MV sold, and quite a lot because MV is an engine to produce commercial games (which would have needed to play their own licence fees as well).

And no, MP3 is not an option at all. Just because personal use of mp3 is free does not mean that commercial distribution of a mp3 codec is free as well - Kodakawa would have had to pay for a mp3-distribution licence if they had used that.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.
time for a new avatar :)

Forum statistics

Threads
106,018
Messages
1,018,358
Members
137,803
Latest member
andrewcole
Top