Help - Search - Members - Calendar
Full Version: cross platform mp3 encoder
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - Tech
josh909
Hi,
My aim is to create a cross platform application (preferably Flex/AIR) to batch convert WAVs->MP3s, zip them and upload them to a server where I have an ecommerce site.
My ideal encoder would be LAME but as far as I'm aware it's not possible to exec from within AIR. I've also looked at JLayer but I think encoding is restricted to MP3->WAV.
I've seen an mp3 encoder by Tritonus which extends JLayer but it too is dependent on LAME and is also restricted to Windows/Linux (I'm on OSX).
I guess I could write platform specific apps but I don't really know much about programming on Windows and don't really want to go and learn a whole new system!
Another possibility would be to create a web service or script hosted on my own server which could access LAME but I think it would be more efficient if the encoding was done client side.

Does anybody have any suggestions as to how to achieve cross platform encoding without using LAME?

Hope this makes some sense!

Many thanks,
Josh.
kawaiigardiner
QUOTE (josh909 @ Aug 5 2009, 22:43) *
Hi,
My aim is to create a cross platform application (preferably Flex/AIR) to batch convert WAVs->MP3s, zip them and upload them to a server where I have an ecommerce site.
My ideal encoder would be LAME but as far as I'm aware it's not possible to exec from within AIR. I've also looked at JLayer but I think encoding is restricted to MP3->WAV.
I've seen an mp3 encoder by Tritonus which extends JLayer but it too is dependent on LAME and is also restricted to Windows/Linux (I'm on OSX).
I guess I could write platform specific apps but I don't really know much about programming on Windows and don't really want to go and learn a whole new system!
Another possibility would be to create a web service or script hosted on my own server which could access LAME but I think it would be more efficient if the encoding was done client side.

Does anybody have any suggestions as to how to achieve cross platform encoding without using LAME?

Hope this makes some sense!

Many thanks,
Josh.


What kind of time frame are we looking at? how much C/C++ do you know?
josh909
Time frame is fairly open ended really. It's a personal project.
I know a little bit of C, C++. Comfortable with Obj-C. Have used CoreAudio and CoreFoundation quite a bit but mainly with AudioUnits.
I can access byte arrays and sample data in Flex but there's no mp3 encoder! would it be possible to make my own, or is that unrealistic?
DVDdoug
QUOTE
...but there's no mp3 encoder! would it be possible to make my own, or is that unrealistic?


That's possible... From the LAME website:
QUOTE
LAME is an educational tool to be used for learning about MP3 encoding. The goal of the LAME project is to use the open source model to improve the psycho acoustics, noise shaping and speed of MP3. LAME is not for everyone - it is distributed as source code only and requires the ability to use a C compiler...


QUOTE
My ideal encoder would be LAME but as far as I'm aware it's not possible to exec from within AIR.
I don't know anything about Flex/AIR... Perhaps if you study the LAME source code, you can figure-out how to access or execute it. If not, it seems like there are 3 possible approaches -

1. Write a "bridge program" that allows Flex/AIR and LAME to talk to each other.
2. Modify LAME so that Flex/Air can access it.
3. Re-write LAME to port it to Flex/Air.
rpp3po
Try Alchemy!
josh909
Thanks for the replies.

I did find some source codes on mp3-tech.org that show some simple implementations of encoding.The shine source seems to give a reasonable example of how it could be done.
I can get the byte, pcm and id3 data without too much trouble in flex so I'd imagine it should be possible to re-sample the data and wrap it up with the right headers. Not sure how fast flex would be though!
I don't really need the full range of functions that LAME has so a custom encoder could be the way to go (providing Flex & my brain are up to it!).

QUOTE
Try Alchemy!

Definitely sounds like it could help. Still reading the docs at the mo. Would rather let LAME do the dirty work if I can help it!

I'll keep ya posted wink.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.