electronish Posted November 4, 2006 Share Posted November 4, 2006 If I have a folder and there is some .avi video file in it. Now, I want to compress this file using a particular codec and store it in another folder. Is this possible using PhP ? I want the whole task to be automatic, like the script will read the folder for any new avi files , every n seconds, then on finding a new file , will encode it (using a codec which is preinstalled) and store it on another folder ? Well, I am very new to this PhP and still am learning it, So basically i wanted to know if there is any script already for it ? Or it can be developed ? Link to comment https://forums.phpfreaks.com/topic/26183-video-encoding-using-php/ Share on other sites More sharing options...
Zane Posted November 4, 2006 Share Posted November 4, 2006 Well if you're using Linux you should be able to use theshell_exec() function or theexec() function to encode them from the command line essentiallyfrom PHPIf you're running Windows you'll have to add the Encoders Program directory to your apache/iis list of available foldersi.e make it a virtual directoryandrun something like this$conversion = `encoder.exe {$filename} {$outputName}`;echo $conversion;NOTICE those are not quotes but backticksto the left of the 1 key on your keyboard. Link to comment https://forums.phpfreaks.com/topic/26183-video-encoding-using-php/#findComment-119742 Share on other sites More sharing options...
electronish Posted November 5, 2006 Author Share Posted November 5, 2006 Thanks for your support. I will work on it and ask you more questions if needed. Link to comment https://forums.phpfreaks.com/topic/26183-video-encoding-using-php/#findComment-119878 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.