Closed maximedupre closed 10 months ago
None of the configurations as stands support AIFF, unfortunately, but it's fairly straightforward to add (assuming you have Emscripten and so can compile libav.js). To do that, you've got two direct options:
(1) Create your own configuration by copying one of the existing config/ directories, then add the relevant AIFF steps, or
(2) Add a new entry in mkconfigs.js that has the following additions: "format-aiff", "codec-pcm_s16be", "codec-pcm_s32be", "codec-f32be"
, then just run mkconfigs.js to make your configuration.
You're not the first person to ask for AIFF, so maybe it's time to just have a variant that supports it (probably a "raw and lossless" variant). The variants that are here largely just reflect demand.
@Yahweasel should I do anything in particular when running emmake make
? It's only compiling the default
variant, so I must be missing something 😁
Use make build-<variant>
, e.g. make build-aiff
if you named your variant aiff
.
(By the way, although it's harmless, you don't need to use emmake make
for libav.js. Its Makefile calls emconfigure and emmake for the subprojects automatically, since it's only built to build with Emscripten anyway.)
I'm not sure if the lib supports AIFF or not, but I've tried all variants and it seems like I can't load such a file.
Error occurs at this call:
avformat_open_input_js(filename, fmt ? fmt : null, null)
My end goal is to be able to convert an AIFF file to a WAV file.
My code so far is
Thanks 🙏