buggedcom / phpvideotoolkit-v2

PHP Video Toolkit version 2 helps take the voodoo out of ffmpeg and provides a convenient object oriented wrapper around the ffmpeg programme.
Other
260 stars 86 forks source link

Problem with Extracting frames #76

Open cmandesign opened 8 years ago

cmandesign commented 8 years ago

Hello @buggedcom , thank you for making these awesome things . i am trying to use phpvideotoolkit for extracting some screenshoots with an interval ( from zero to 1/5 of video , i want to take 5 screenshoots ) and here is my code :

$parser = new MediaParser(); $data = $parser->getFileInformation($videoURL);

$process = $video->extractFrames(null, new TimeCode($data['duration']->total_seconds/5), '15/'.$data['duration']->total_seconds) ->save(BASE.'/output/'.$videoName.'.%timecode.jpg', null, Media::OVERWRITE_EXISTING);

$output = $process->getOutput(); $output = array_values($output);

$paths = array(); foreach ($output as $obj) { array_push($paths, str_replace("/usr/share/nginx/html/","http://10.143.67.216/",$obj->getMediaPath())); }

then when i execute the code , it works on some files and there are many files that wont work . !

here is the error : https://notepad.cc/qedoma8