Dear John,

Thanks so much for your message!

As you said, ffmpeg is a command line solution. Is there any way to generate a .flv file programmatically with an embedded Sound object in it?

Thanks once again,

Leo

----- Original Message ----- From: "Jon Bradley" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <flashcoders@chattyfig.figleaf.com>
Sent: Tuesday, November 28, 2006 8:31 AM
Subject: Re: [Flashcoders] How to send Audio objects as MP3 via XML-RPC?



On Nov 28, 2006, at 5:29 AM, Leo Burd wrote:

Hello there,

I am new to Flash and I am wondering what is the best way to send Audio objects via XML-RPC. More specifically, I wonder if anyone could send me suggestions on:

a) How to convert a Sound object to MP3 programatically?

You need an MP3 encoding library. If you want a command line solution that you may be able to hack to work in a server environment, I'd look into ffmpeg.

b) How to convert the resulting MP3 into a base64 string

PHP has a base64 library. Look there for starters. I believe you can pass it an argument to encode a file (which would be the mp3 file on your server).

To encode the MP3 into a base64 string dynamically is going to kill your server CPU. You're better off running a chron job on your server to execute PHP code to encode the file when placed in a certain directory. If the base64 version is already encoded, don't do anything, just send the stored encoded version.

c) How to send the base64 string to my server via XML-RPC

I don't know if XML-RPC is not going to handle that amount of data very effectively. The base64 encoded version of the MP3 file will be huge.

BTW, shall I use AS2 or AS3 for this?

I don't know if it will matter. Once you have the base64 encoded string in Flash, what do you plan to do with it? I don't see how you'll be able to attach it to a sound object. I never tried this though, so the sound object "should" be able to take the raw mp3 data and use it, but who know?

This whole process may be best done with a socket connection with AS3 and using binary data to send the result directly to a sound object.

good luck.

jon
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to