Highlighted

Compressing Audio as MP3

Contributor ,
Dec 11, 2018

Copy link to clipboard

Copied

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

TOPICS
Development

Views

367

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Compressing Audio as MP3

Contributor ,
Dec 11, 2018

Copy link to clipboard

Copied

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

TOPICS
Development

Views

368

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Dec 11, 2018 0
Engaged ,
Dec 12, 2018

Copy link to clipboard

Copied

Not possible in actionscript. You would need and extension which uses ffmpeg or lame. An example is here: GitHub - tuarua/AVANE: Adobe Air Native Extension for building video encoding applications

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 12, 2018 0
Advocate ,
Dec 12, 2018

Copy link to clipboard

Copied

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).

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 12, 2018 0
Contributor ,
Dec 12, 2018

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 12, 2018 0