Exemple #1
0
 /**
  * Returns the information we could find on the file
  * @return Array
  */
 public function getFileinfo()
 {
     if ($this->fileinfos == null) {
         $toret = parent::getFileinfo();
         // get the exif data
         try {
             /*
             $cls=new ReflectionClass('ffmpeg_movie');
             print '<xmp>';
             foreach($cls->getMethods() as $n) print '$toret[\'video.'.$n->name.'\'] = $movie->'.$n->name."();\n";
             print '</xmp>';
             */
             $movie = new ffmpeg_movie($this->fullpath, false);
             $toret['video.duration'] = $movie->getduration();
             $toret['video.framecount'] = $movie->getframecount();
             $toret['video.framerate'] = $movie->getframerate();
             $toret['video.filename'] = $movie->getfilename();
             $toret['video.comment'] = $movie->getcomment();
             $toret['video.title'] = $movie->gettitle();
             $toret['video.author'] = $movie->getauthor();
             $toret['video.artist'] = $movie->getartist();
             $toret['video.copyright'] = $movie->getcopyright();
             $toret['video.album'] = $movie->getalbum();
             $toret['video.genre'] = $movie->getgenre();
             $toret['video.year'] = $movie->getyear();
             $toret['video.tracknumber'] = $movie->gettracknumber();
             $toret['video.framewidth'] = $movie->getframewidth();
             $toret['video.frameheight'] = $movie->getframeheight();
             $toret['video.framenumber'] = $movie->getframenumber();
             $toret['video.pixelformat'] = $movie->getpixelformat();
             $toret['video.bitrate'] = $movie->getbitrate();
             $toret['video.hasaudio'] = $movie->hasaudio();
             $toret['video.hasvideo'] = $movie->hasvideo();
             $toret['video.videocodec'] = $movie->getvideocodec();
             $toret['video.audiocodec'] = $movie->getaudiocodec();
             $toret['video.videostreamid'] = $movie->getvideostreamid();
             $toret['video.audiostreamid'] = $movie->getaudiostreamid();
             $toret['video.audiochannels'] = $movie->getaudiochannels();
             $toret['video.audiosamplerate'] = $movie->getaudiosamplerate();
             $toret['video.audiobitrate'] = $movie->getaudiobitrate();
             $toret['video.videobitrate'] = $movie->getvideobitrate();
             $toret['video.pixelaspectratio'] = $movie->getpixelaspectratio();
             foreach ($toret as $k => $v) {
                 if ($v == '') {
                     unset($toret[$k]);
                 }
             }
             //$frm = $movie->getFrame(1);
         } catch (Exception $e) {
         }
         $this->fileinfos = $toret;
         return $this->fileinfos;
     } else {
         return $this->fileinfos;
     }
 }