Here's my php file's code <? extension_loaded('ffmpeg') or die('Error in loading ffmpeg'); $ffmpegMov = new ffmpeg_movie('path/to/video.mpg'); $bitrate = $ffmpegMov->getBitRate(); unlink('path/to/video.mpg'); /* Here's the all other codes & I'll use $bitrate later... */ ?> PHP: now the problem is video.mpg cannot be deleted with this command: unlink('path/to/video.mpg'); as it is opened by FFMPEG-PHP extension >> new ffmpeg_movie('path/to/video.mpg'); now what is the close command of ffmpeg-php...so i can add that before unlink..so the file will be unlinked.
I read the ffmpeg API documentation http://ffmpeg-php.sourceforge.net/doc/api/ffmpeg_movie.php. There are no "close" methods, just methods to get the properties of the video and/or audio file. Exception is thrown, because you are trying to delete when ffmpeg still has a handle to the file. I have not worked with ffmpeg, but will take a look at it if you send me the project source code.