← Back

Play G.711, G.721 and G.723 audio using the <audio> tag

The G.711 / G.721 / G.723 family is the telephony ADPCM lineage, and Sun released the reference implementation into the public domain. None of these codecs has a container of its own, and a bare bitstream does not say which of them you are holding — 3, 4 and 5 bits per sample divide too many stream lengths for a guess to be safe. Sun's own .au format says so in one header word, so libg711_1 reads that: mu-law (encoding 1), A-law (27), G.721 at 32 kbit/s (23) and G.723 at 24 or 40 kbit/s (25, 26). This clip is G.721. The two companding laws match ffmpeg's independent decoders with no differing sample at all; the three ADPCM rates match the same Sun code built natively, likewise exactly.

Code snippet

<audio is="universal-audio_1" src="testcard_g721.au" using="solver_minimal_1"
        with="libg711_1" controls> </audio>

Specifications :

The specifications of the test sequence are :

Format G.721 ADPCM 32 kbit/s in a Sun .au, 8 kHz mono, 10 s
FileSize 39 Ko
Solver solver_minimal_1