3

Say I want to have streaming audio on my site. There is no fancy player on my site: the page simply links directly to the audio file, shifting the burden of streaming onto the user's internet browser.

What audio file format is the best for flexibility across all devices, including computers, tablets, and smartphones? I understand some operating systems are fussy with certain file types, with the stock browser unequipped to play the file, forcing the user to download supplementary extensions or software to stream the audio, so I am trying to avoid this.

Obviously the file will have to be a small size; thus, it will be converted from its original format and compressed. So, for instance, .wav wouldn't work here.

Note: I know very little; don't assume that I am on your level!

2

The most universally recognized lossy audio format in 2016 is MPEG-4 AAC audio.

Every device from the 21st century that can play audio video uses ISO/IEC 14496 MPEG-4. The playback decoding is done in hardware within the device rather than software on the general purpose CPU, which is very important in mobile applications where CPU resources are limited.

The lossy audio format in MPEG-4 is Advanced Audio Coding (AAC) which provides very good audio quality in very low bandwidth. It is not only universally supported in playback systems but also in production tools.

You can find out more about MPEG-4 AAC on the Advanced Audio Coding – Wikipedia page.

You can simply link to an AAC file with a hyperlink:

<a href="/audio_file.m4a" type="audio/mp4">Audio File</a>

… and then optionally, use JavaScript to replace that hyperlink at run time with an audio tag and/or sophisticated audio player if the browser supports that.

Your Web server is almost certainly setup to support MPEG-4 audio, but if not, you would want to have a line like this in your httpd configuration or htaccess file:

AddType audio/mp4 .m4a

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.