You're talking about massive processing tasks here, which aren't really suited for PHP. The problem isn't just with clients waiting for a script to finish executing, but also with hammering the webservers. There's only so many MaxClients a webserver allows. It may be useful for CLI apps, but keep in mind that you're talking about highly complex and specialized tasks, and interfacing them from PHP can only be as complex, so what's the gain really when you can execute external programs?

Extracting movie snaps is interesting but it also could be resource intensive. You'd need to decode to raw video, then grab the frame (a frame at a random position isn't always complete in compressed video, thus the need for decoding). I have no thorough video knowledge, but this is what I ended up doing when I needed this and similar functionality (movie snaps and 10 second previews). Got the job done with mplayer and mencoder.

Resizing videos for online use isn't just *that*. You'd probably want to encode (to flv, or whatever you're using) the video and fiddle with different video aspects/properties while at that. You'd also need to reencode the audio part. So you'd need to expose a very complicated API - provided you find a library suited for all this.

I'd say leave this to specialized projects.

V

Tijnema ! wrote:
On 3/21/07, Antony Dovgal <[EMAIL PROTECTED]> wrote:
On 03/21/2007 12:08 PM, Tijnema ! wrote:
> Like i said, video resizing might be useful for sites like youtube.

I'm sure they don't do it each time the video is viewed.

Nope, they do it when uploading the video.


> And what i'm trying to do with audio is more extending the limits of
> PHP. Ever wanted to become a web DJ?

Nope.
Some others might ;)
and there are of course a lot of ohter possibilities of usage.


>> There is a bunch of mature opensource utilities (transcoder, lame, oggenc etc.) and you >> can always use them to convert WAV to MP3 and AVI to OGG, it's just a matter of implementation. > What about WMA? do you know a library/encoder dat does convert from/to WMA?

That windows-only format? I've never seen anybody using it.
Well, i got huge music collection out here, just checking my main dir
with 3104 songs, it says 2674 MP3, 320 WMA and 110 other file formats.

> Well, video files are just a set of frames, so if a PECL extension is
> able to read video files, they already need to be decoded, and so, all
> work is done already, it shoudl be very easy to also create other
> formats then.

Are you really going to create videos on the fly?
Yeah why not? what about setting up a stream? Having an movie showed
at your homepage where you create that videos from your admin panel :)

Tijnema

--
Wbr,
Antony Dovgal



--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to