Audio conversion ffmpeg

Hello,
I want to create an app for mac and windows that converts an mp3 file to different qualities.

For example:

I have a file named “foo.mp3” - 100MB 320kbs

My app will convert this file to different qualities in this way:

“foo_for_web_3G.mp3” - 100KB 96kbs
“foo_for_web_wifi.mp3” - 180KB 128kbs
etc…

I would like to use ffmpeg and run the command line tool with shell class, but how can I do with cross platform?
Do you have an example?

Regards

You do know that will have several legal issues when you want to publish such app?
Be prepared to pay a lot of royalties if you use audio codecs like AAC, MP3, … - trust me, they will ask for it even if your app is small.

That said, when you only use open source libs like ogg, flac, … you are save.
In short compile a FFmpeg without AAC (including the FFmpeg native encoder), MP3 , … Support.

ffmpeg -i input.wav -codec:a libmp3lame -qscale:a 2 output.mp3

or similar.

[quote=176786:@Christoph De Vocht]You do know that will have several legal issues when you want to publish such app?
Be prepared to pay a lot of royalties if you use audio codecs like AAC, MP3, … - trust me, they will ask for it even if your app is small.

That said, when you only use open source libs like ogg, flac, … you are save.
In short compile a FFmpeg without AAC (including the FFmpeg native encoder), MP3 , … Support.[/quote]

Yes, I know but this app is for internal use.
@Christian Schmitz ok, but on ffmpeg website witch download type I must chose (for cross platform)? https://www.ffmpeg.org/download.html

all you need.

Maybe Mac, Win, and a few linux ones?

Download packages and look for ffmpeg command line tool inside.

an old project of mine. It uses lame to convert.
maybe it helps you.

Download

Hello Axel,
many thanks, is really useful :slight_smile: