Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Asterisk itself can transcode many audio formats such as g722, alaw and ulaw to name a few. However the Asterisk is unable to convert many files into HTML5 compatible audio types. What is an "HTML5 compatible audio file". Before HTML5, there was no standard for playing audio files on a web page. Before HTML5, audio files could only be played with a plug-in (like quicktime). With HTML5 audio files are able to be played back natively in your browser!

Great! So generate the HTML5 files for me

Unfortunately every browser supports a different format of audio file. We can't just generate a wav file and expect all browsers to understand it. Here is a quick list of the different formats supported by different browsers:

BrowserOperating systemFormats supported by different web browsers
WAV PCMMP3MP4 AACADTS AACOgg VorbisWebMVorbisOgg OpusWebM Opus
Google ChromeAll supportedYesYesYesYes9Yes25
(since v31 in Windows)
Yes
Internet ExplorerWindowsNo99NoNoNoNoNo
Mozilla FirefoxAll supported3.5OS-dependent[a]OS-dependent[a]No3.54.015.028.0[11]
OperaAll supported11.00OS-dependent[b]OS-dependent[b]No10.5010.6014Yes
SafariOS X3.13.1YesYesManual installNoNoNo

Ok. So can you generate the different formats?

This is where the fun begins. Unfortunately due to licensing and legalities we are not able to distribute anything that makes MP3 or MP4 (M4A) files. However it's not illegal for you to compile the binaries for these programs yourself.

So what do I have to do?

There are different options for different types of files. After looking at the table above you need to decide what you want to support. After the libraries have been installed FreePBX will automatically detect them and use them to create files.

WAV

WAV files can be generated through either Asterisk itself or through SOX. In nearly all distributions you can download and install SOX through rpm repositories (yum install sox or apt-get install sox)

OGG (OGA)

OGG/OGA files can be generated through SOX. You can download and install SOX through rpm repositories (yum install sox or apt-get install sox)

MP3

MP3 files are usually generated through a program called LAME. There are several install guides for LAME online. A good starting point would be: http://lame.sourceforge.net/

MP4 (M4A)

MP4/M4A files are usually generated through a program called FFMPEG. There are several install guides for FFMPEG online. A good starting point would be: https://www.ffmpeg.org/

  • No labels