Skip to main content
Douglas McCarroll
Inspiring
December 11, 2018
Question

Compressing Audio as MP3

  • December 11, 2018
  • 1 reply
  • 591 views

Hi All,

I have an AIR app that runs on Mac and Windows. I'd like to a) read a WAV file, b) compress the data in MP3 format, then c) save the compressed data as a file.

I can do (a) and (c). Any thoughts on how to do (b)?

I have the impression that there's Actionscript code out there that will do this, but perhaps it is a bit slow. A Mac/Windows native extension would be ideal, but as far as I can see no such native extension exists. So I'd welcome all suggestions, including ActionScript libraries.
Also, if I end up using ActionScript, I'm wondering if I should use workers to speed up the process. I haven't used workers in the past. Does this approach make sense in this case?

Thanks in advance,

Douglas

This topic has been closed for replies.

1 reply

Inspiring
December 12, 2018

Yeah I do it using workers and an Alchemy based little library (probably no longer under development) called "shineMP3_achemy.swc", no extension necessary.

Yeah I can see the project is archived here: Google Code Archive - Long-term storage for Google Code Project Hosting.

Using it is very straight forward and easy to set with a worker as well (recommended).

Douglas McCarroll
Inspiring
December 12, 2018

Thanks flexercised and ASWC.

ASWC and All -

The Shine MP3 encoder looks very interesting, but I don't see a way to set the bitrate for the MP3 files that it creates.

I'm guessing that it will create audio files that are higher quality than I need, and larger than I want. My app plays spoken voice rather than music, and I'd like to encode at 40 kbps.

I'm wondering if it might be possible to rebuild the SWC. I see what looks like C code in the lib folder, and lib/shine seems to be an XCode project. So perhaps it creates a SWC based on C code - perhaps by using FlasCC (the Flash C++ Compiler) ... ?

But it looks as though FlasCC isn't being used much anymore - in fact, I can't even find a place to download the FlasCC SDK.

As may be obvious, I'm delving into areas where I have no experience, and perhaps this line of thinking is impractical. I'd welcome any feedback, from "forget it" to ideas on how to move forward with this approach.

Douglas