toto88x Posted June 11, 2014 Share Posted June 11, 2014 Hi, Is there a "best format" to use for audio files in Phaser? It should:- Work across all browsers- Have a good audio quality- Not weight too much Should I use mp3, wav, or ogg? Or maybe something else?Thanks! ylluminarious 1 Link to comment Share on other sites More sharing options...
lewster32 Posted June 11, 2014 Share Posted June 11, 2014 Use mp3 and ogg together to get the best coverage; the loader will accept both for the same sound, just pass both paths in an array rather than a single string. I'd probably avoid wav for web use in the same way you should avoid bmp files for images. Link to comment Share on other sites More sharing options...
rich Posted June 11, 2014 Share Posted June 11, 2014 mp3 and ogg (although beware of the time it takes to decode them on mobile) and m4a for iOS. Link to comment Share on other sites More sharing options...
valueerror Posted June 11, 2014 Share Posted June 11, 2014 http://www.w3schools.com/html/html5_audio.asp have a look at the table on this site Link to comment Share on other sites More sharing options...
tackle Posted June 11, 2014 Share Posted June 11, 2014 What about the license issue with mp3? Aren't you supposed to pay for using it if it's used on more than xx copies? Right now I'm using m4a and ogg for music and wav for quick sound effects. Link to comment Share on other sites More sharing options...
lewster32 Posted June 11, 2014 Share Posted June 11, 2014 I'm pretty sure the use of the mp3 format is license-free, it's the encoding and decoding of the formats which is tied to a license. You don't need to worry about it. In my testing I've found mp3 and ogg fine for short sound effects, though for music (which takes a while to decode on mobile) having m4a for iOS devices is a smart move. Link to comment Share on other sites More sharing options...
AshleyScirra Posted June 11, 2014 Share Posted June 11, 2014 Technically, using MP3 makes you liable for a $2500 fee if your game is played over 5000 times. Flash is exempt from this rule but HTML5 is not. MPEG-4 AAC on the other hand plays everywhere MP3 does, is better quality, and does not have a use fee (only the encoders are charged for). A couple of years ago we confirmed all of this with an MP3 licensing representative while developing Construct 2. (It only uses AAC and does not in fact even support playing MP3s.) You should not touch MP3 with a barge pole. renatodarrigo, ZoomBox, drhayes and 7 others 10 Link to comment Share on other sites More sharing options...
lewster32 Posted June 12, 2014 Share Posted June 12, 2014 I stand corrected. Very useful information Ashley! Link to comment Share on other sites More sharing options...
rich Posted June 13, 2014 Share Posted June 13, 2014 Are there any known cases of them actually enforcing this though? (to web based games) Link to comment Share on other sites More sharing options...
enpu Posted June 13, 2014 Share Posted June 13, 2014 I have always used m4a and ogg, no need for mp3? Link to comment Share on other sites More sharing options...
AshleyScirra Posted June 19, 2014 Share Posted June 19, 2014 Are there any known cases of them actually enforcing this though? (to web based games) What's the point in even risking it if AAC is a better quality format, supported everywhere MP3 is, and is free to use? You can risk it if you like, but then MP3 licensing have every right to come and charge you $2500 per game, and you are absolutely required to pay. Link to comment Share on other sites More sharing options...
lukaMis Posted June 23, 2014 Share Posted June 23, 2014 Does Phaser support AAC?How about browsers: Windows, mac, ios, android , windows phone / tablet? Link to comment Share on other sites More sharing options...
lewster32 Posted June 23, 2014 Share Posted June 23, 2014 See this table; the article itself is worth a read too: https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats#Browser_compatibility lukaMis 1 Link to comment Share on other sites More sharing options...
webcaetano Posted November 23, 2015 Share Posted November 23, 2015 Without .mp3 there's no extension for IE 11I tested all this extensions:✓ .mp3 workingx .wav not workingx .aac not workingx .mp4 not workingx .m4a not workingx .ogg not working In Chrome : ✓ .mp3 working✓ .ogg not working✓ .wav not workingx .aac not workingx .mp4 not workingx .m4a not working Link to comment Share on other sites More sharing options...
AshleyScirra Posted November 23, 2015 Share Posted November 23, 2015 IE and Edge support MPEG-4 AAC. Construct 2 games have used it for a long time for IE support. You probably did not encode the audio correctly. Link to comment Share on other sites More sharing options...
kleepklep Posted January 7, 2016 Share Posted January 7, 2016 I tried all AAC encoding profiles and was unable to load and play any of the files with an AAC extension. I suppose because IE supports AAC in MP4, which I take to mean AAC audio inside an MP4 video file, not an AAC audio file. Link to comment Share on other sites More sharing options...
staff0rd Posted February 8, 2016 Share Posted February 8, 2016 I've recently been testing some sounds (all mp3) across browsers in UIWebView on iOS. Often, but not 100% of the time, the sounds quality is substantially lower than expected when playing on iOS, with static clearly audible. Is this because I'm using mp3 rather than m4a? Link to comment Share on other sites More sharing options...
staff0rd Posted February 8, 2016 Share Posted February 8, 2016 Actually, these seems power related. I ended up supplying both mp3 and m4a files to the audio loader. If I start the game while the device (iPhone 5s) is charging, everything is normal. If I start the game while it is not charging (cable unplugged), then the music plays slightly slower, and has dropped in quality with audible static. Link to comment Share on other sites More sharing options...
staff0rd Posted February 9, 2016 Share Posted February 9, 2016 Never mind, the charging symptom was a red herring - I was able to get it to break whilst charging. The issue was solved via this thread. On a related note this did allow me to successfully play mp3s on iPhone 5s. Link to comment Share on other sites More sharing options...
Coopewt Posted September 22, 2017 Share Posted September 22, 2017 MP3 was developed as part of the MPEG video standard and has become a highly popular format for music files used in a wide variety of portable media players and cell phones.A Vorbis audio file which uses a Vorbis codec audio stream in an Ogg file format container. Both the Ogg file container and the Vorbis audio codec are open standards maintained by Xiph.org Foundation. Vorbis audio has a higher quality than MP3 audio and is compatible with AAC audio and WMA audio.Anyway, these audio formats can convert http://www.videoconverterfactory.com/tips/m4a-to-wav.html M4A files are used in Apple products such as iPods, iPhones, and iPads. Sorenson Squeeze supports exporting a M4A file with the AAC or AAC Plus audio codecs. Link to comment Share on other sites More sharing options...
DavidPesta Posted December 8, 2017 Share Posted December 8, 2017 Good news for everyone who used to be worried about MP3 patents. The last important patent expired on April 16, 2017. As a result, the company that owned and enforced the MP3 as intellectual property terminated their licensing program on April 23, 2017: https://www.iis.fraunhofer.de/en/ff/amm/prod/audiocodec/audiocodecs/mp3.html This means you no longer need to worry about MP3 licensing issues. Because of this, Wikimedia now started to host MP3 files on their own websites: https://blog.wikimedia.org/2017/12/04/wikimedia-mp3-support/ Additionally, "Fedora received the permission to ship MP3 encoding from Red Hat Legal.": https://opensourceforu.com/2017/05/fedora-linux-add-native-mp3-support/ With Wikimedia and FOSS able to use MP3s unrestricted, it is now safe for the rest of us, and soon MP3 will become supported by devices and browsers that were once hindered by these patents and we will no longer need to accompany our MP3 files with a redundant version in OGG format. Here is another excellent article for further reading: https://www.vox.com/culture/2017/5/29/15653564/the-mp3-not-dead-license-expires-free blackmoondev 1 Link to comment Share on other sites More sharing options...
Recommended Posts