Editing media files?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Ree
Forum Regular
Posts: 592
Joined: Fri Jun 10, 2005 1:43 am
Location: LT

Editing media files?

Post by Ree »

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.
Ree
Forum Regular
Posts: 592
Joined: Fri Jun 10, 2005 1:43 am
Location: LT

Post by Ree »

Hello? :)
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

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.
Post Reply