Supported audio file formats for Chrome?

12,680

You could test this sort of thing by trying to load a variety of sample files using a try...catch construct, and seeing which filetypes load and which don't. See this tutorial for loading files with the Web Audio API in Chrome.

Share:
12,680
dB'
Author by

dB'

Programmer, singer, PhD candidate. I ask a lot of questions.

Updated on July 02, 2022

Comments

  • dB'
    dB' almost 2 years

    I'm interested in using the Web Audio API. Unfortunately my audio files are are all in an esoteric format that Chrome can't decode. (They're .wavs, but sampled at 96 kHz with 32-bit float encoding.)

    Is there any way for me to query my browser (Chrome) to find out exactly which audio formats and encodings it supports?

    UPDATE

    I've found a list of file formats supported by Chrome here: https://sites.google.com/a/chromium.org/dev/audio-video

  • Albert H
    Albert H over 12 years
    Oh crap, didn't read your question carefully - you're talking about a newer API for audio manipulation.... either way, I think the regular <audio> API should still be a valid indicator of whether the file works or not.
  • dB'
    dB' over 12 years
    Hey Albert -- thanks for the response. This is a good start but I was actually hoping to find a way to get slightly more detailed information from the browser. I know that it can play SOME types of .wav files, but I need to find out which sample rates, bit depths and sample encodings it can handle, as well as how many audio channels it supports. Do you have any idea how to extract THAT kind of info?
  • dB'
    dB' over 12 years
    This is smart, thanks. I'm still surprised that there's not a more direct way to do it though...