MP2 files won’t render or play

Please make sure you can check all of these points below before opening an issue:

(You don’t have to post this section)

  • [x ] I have checked the FAQ and it doesn’t solve my problem.
  • [x ] I have checked the documentation and it doesn’t solve my problem
  • [x ] I have searched for already open issues which desribe my problem.
  • [x ] The issue I’m having is related to and caused by wavesurfer.js, not by other software (which maybe packages and uses wavesurfer incorrectly) – In that case you should open the issue on the respective project pages.

Please make sure you provide the following information (if applicable):

Wavesurfer.js version(s):


Browser and operating system version(s):

Chrome, Firefox, Windows 10, Ubuntu 20.04

Code needed to reproduce the issue:

Use behaviour needed to reproduce the issue:

Get a MP3 file and convert to MP2, wavesurfer won’t be able to reproduce it. On the codepen example I got the MP3 file used on wavesurfer docs example and converted to MP2 using audacity(I also tested using ffmpeg) and that MP2 won’t load.

If you want to test from another audio from scratch that’s the command I use with ffmpeg:
ffmpeg -y -v error -i {file-path} -f WAV -acodec mp2 -ar 44100 {output_path}

Read more here: Source link