Re: [PHP] Converting MP3 to FLV On-The-Fly

2009-06-07 Thread Michael Shadle
On Sun, Jun 7, 2009 at 11:23 AM,  wrote:

> These is a PHP binding for FFMPEG here:
> http://ffmpeg-php.sourceforge.net/, though most of the tutorials you will
> find are for the C API, for example http://www.dranger.com/ffmpeg/, which
> demonstrates how to implement a media player.

> Personally I would just skip using the API and use the CLI program to
> convert the media, and cache/ serve from the resulting file, much easier
> to implement.

+1

the ffmpeg-php module would be great if it got into PECL and got more
support. right now it has some flaws and is not fully featured. it can
be useful for things like identifying media but i am not sure how well
it would be for conversion and other things. A client of mine had a
conversion script created which leveraged ffmpeg-php for
identification of aspect ratio and other things, but then went to
system() for the conversion calls.

>> I thought of using FFMPEG but I have a bit of experience with it.

system("ffmpeg -i $inputfile output.wav"); i think is really a basic
example. tweak the audio specifics as you wish (man ffmpeg - it's got
a ton of options)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Converting MP3 to FLV On-The-Fly

2009-06-07 Thread hessiess
These is a PHP binding for FFMPEG here:
http://ffmpeg-php.sourceforge.net/, though most of the tutorials you will
find are for the C API, for example http://www.dranger.com/ffmpeg/, which
demonstrates how to implement a media player.

Personally I would just skip using the API and use the CLI program to
convert the media, and cache/ serve from the resulting file, much easier
to implement.

> I thought of using FFMPEG but I have a bit of experience with it.
> Any links or more specific directions would be great.
>
> On Sun, Jun 7, 2009 at 7:48 PM,  wrote:
>
>> > Hi Lista
>> >
>> > I'm trying to figure how I can turn MP3 files into FLV files on the
>> fly
>> > using PHP.
>> > I'm having a server and I can install 3rd party software in order to
>> > accomplish this conversion.
>> >
>> > I have never dealt before with music file comression or anything
>> similar
>> > so
>> > I don't know what I should look after or where I should look.
>> >
>> > Any idea would be very appreciated!
>> >
>> > Thanks!
>> > Nitsan
>> >
>>
>> You may want to use some sort of caching, converting media formats is
>> very
>> computationally demanding. You could use FFMPEG to do the conversion.
>>
>>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Converting MP3 to FLV On-The-Fly

2009-06-07 Thread Nitsan Bin-Nun
I don't have to let the user wait. The conversions will be done once 3 hours
using a cron job, they all will be listed in a mysql database.

On Sun, Jun 7, 2009 at 8:09 PM, Michael Shadle  wrote:

> I would also batch it. Keeping a user waiting (unless you have a
> "please wait..." screen, which still can take some time and be a bad
> user experience) in my experience hasn't been ideal and won't scale
> very well.
>
> On Sun, Jun 7, 2009 at 11:04 AM, Nitsan Bin-Nun
> wrote:
> > I thought of using FFMPEG but I have a bit of experience with it.
> > Any links or more specific directions would be great.
> >
> > On Sun, Jun 7, 2009 at 7:48 PM,  wrote:
> >
> >> > Hi Lista
> >> >
> >> > I'm trying to figure how I can turn MP3 files into FLV files on the
> fly
> >> > using PHP.
> >> > I'm having a server and I can install 3rd party software in order to
> >> > accomplish this conversion.
> >> >
> >> > I have never dealt before with music file comression or anything
> similar
> >> > so
> >> > I don't know what I should look after or where I should look.
> >> >
> >> > Any idea would be very appreciated!
> >> >
> >> > Thanks!
> >> > Nitsan
> >> >
> >>
> >> You may want to use some sort of caching, converting media formats is
> very
> >> computationally demanding. You could use FFMPEG to do the conversion.
> >>
> >>
> >
>


Re: [PHP] Converting MP3 to FLV On-The-Fly

2009-06-07 Thread Michael Shadle
I would also batch it. Keeping a user waiting (unless you have a
"please wait..." screen, which still can take some time and be a bad
user experience) in my experience hasn't been ideal and won't scale
very well.

On Sun, Jun 7, 2009 at 11:04 AM, Nitsan Bin-Nun wrote:
> I thought of using FFMPEG but I have a bit of experience with it.
> Any links or more specific directions would be great.
>
> On Sun, Jun 7, 2009 at 7:48 PM,  wrote:
>
>> > Hi Lista
>> >
>> > I'm trying to figure how I can turn MP3 files into FLV files on the fly
>> > using PHP.
>> > I'm having a server and I can install 3rd party software in order to
>> > accomplish this conversion.
>> >
>> > I have never dealt before with music file comression or anything similar
>> > so
>> > I don't know what I should look after or where I should look.
>> >
>> > Any idea would be very appreciated!
>> >
>> > Thanks!
>> > Nitsan
>> >
>>
>> You may want to use some sort of caching, converting media formats is very
>> computationally demanding. You could use FFMPEG to do the conversion.
>>
>>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Converting MP3 to FLV On-The-Fly

2009-06-07 Thread Nitsan Bin-Nun
I thought of using FFMPEG but I have a bit of experience with it.
Any links or more specific directions would be great.

On Sun, Jun 7, 2009 at 7:48 PM,  wrote:

> > Hi Lista
> >
> > I'm trying to figure how I can turn MP3 files into FLV files on the fly
> > using PHP.
> > I'm having a server and I can install 3rd party software in order to
> > accomplish this conversion.
> >
> > I have never dealt before with music file comression or anything similar
> > so
> > I don't know what I should look after or where I should look.
> >
> > Any idea would be very appreciated!
> >
> > Thanks!
> > Nitsan
> >
>
> You may want to use some sort of caching, converting media formats is very
> computationally demanding. You could use FFMPEG to do the conversion.
>
>


Re: [PHP] Converting MP3 to FLV On-The-Fly

2009-06-07 Thread hessiess
> Hi Lista
>
> I'm trying to figure how I can turn MP3 files into FLV files on the fly
> using PHP.
> I'm having a server and I can install 3rd party software in order to
> accomplish this conversion.
>
> I have never dealt before with music file comression or anything similar
> so
> I don't know what I should look after or where I should look.
>
> Any idea would be very appreciated!
>
> Thanks!
> Nitsan
>

You may want to use some sort of caching, converting media formats is very
computationally demanding. You could use FFMPEG to do the conversion.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Converting MP3 to FLV On-The-Fly

2009-06-07 Thread Nitsan Bin-Nun
Hi Lista

I'm trying to figure how I can turn MP3 files into FLV files on the fly
using PHP.
I'm having a server and I can install 3rd party software in order to
accomplish this conversion.

I have never dealt before with music file comression or anything similar so
I don't know what I should look after or where I should look.

Any idea would be very appreciated!

Thanks!
Nitsan