Editing media files?
Moderator: General Moderators
Editing media files?
Is it possible to actually edit any media files (say, change the bitrate of an uploaded mp3 file) using PHP? I guess it's not, but I thought I'd ask anyway.
It's certainly possible .. media files are just binary data, and there's functions in PHP for manipulating binary. But it'd be horrendously slow and very complicated to write. Use a program like LAME that has a command line interface and call it from PHP's system() or exec() functions..
Alternatively .. and even more complicated still .. take an open source MP3 encoder, and write a PHP extension based on it. Then you'd have the functionality built into PHP.
Alternatively .. and even more complicated still .. take an open source MP3 encoder, and write a PHP extension based on it. Then you'd have the functionality built into PHP.