You are here

public function TranscoderAbstractionFactoryFfmpeg::getFileInfo in Video 7.2

Get file informations

Return value

Associative array with file informations like duration, dimensions

Overrides TranscoderAbstractionFactory::getFileInfo

3 calls to TranscoderAbstractionFactoryFfmpeg::getFileInfo()
TranscoderAbstractionFactoryFfmpeg::execute in transcoders/TranscoderAbstractionFactoryFfmpeg.inc
TranscoderAbstractionFactoryFfmpeg::extractFrames in transcoders/TranscoderAbstractionFactoryFfmpeg.inc
Extract frames from the current video.
TranscoderAbstractionFactoryFfmpeg::setAspectRatioOptions in transcoders/TranscoderAbstractionFactoryFfmpeg.inc
Set aspect ratio and size related transcoder options.

File

transcoders/TranscoderAbstractionFactoryFfmpeg.inc, line 379
File containing class TranscoderAbstractionFactoryFfmpeg

Class

TranscoderAbstractionFactoryFfmpeg
Class that handles FFmpeg transcoding.

Code

public function getFileInfo() {
  $file = $this->settings['input']['uri'];
  $cid = 'video:file:' . md5($file);
  $cache = cache_get($cid);
  if (!empty($cache->data)) {
    return $cache->data;
  }
  $data = $this->transcoder
    ->getFileInfo();
  cache_set($cid, $data, self::INFO_CACHE, time() + 7 * 24 * 3600);
  return $data;
}