RuKoder.ru RUKODER.ru
29 АВГ 2018
79

soluble-mediatools - php обертка для video conversions, transcoding, querying, thumbnailing, wraps around ffmpeg and ffprobe

PHP
<?php
use Soluble\MediaTools\Video\Config\FFProbeConfig;
use Soluble\MediaTools\Video\Exception\InfoReaderExceptionInterface;
use Soluble\MediaTools\Video\VideoInfoReader;

$infoReader = new VideoInfoReader(new FFProbeConfig('/path/to/ffprobe'));

try {
    $videoInfo = $infoReader->getInfo('/path/video.mp4');
} catch (InfoReaderExceptionInterface $e) {
    // see below for exceptions
}

$duration = $videoInfo->getDuration();
$frames   = $videoInfo->getNbFrames();
$width    = $videoInfo->getWidth();
$height   = $videoInfo->getHeight();

// Or alternatively
['width' => $width, 'height' => $height] = $videoInfo->getDimensions();
       

https://github.com/soluble-io/soluble-mediatools/

Комментарии (187)

  • LobertvoivyBL от 23.08.2023 в 18:55:58
    бонусы Gama Casino
    1 1
  • JsosephWharpSI от 24.08.2023 в 11:06:04
    мобильная версия гама казино
    2 0
  • DavidTumJsasonElutsHM от 02.12.2023 в 00:20:46
    гостиница с почасовой оплатой в Москве
    0 0
  • LorevengepRL от 04.12.2023 в 18:00:36
    catalog2you.ru
    1 2
  • DichaelrowJR от 04.12.2023 в 21:48:47
    cat casino
    0 0
  • OLanekamSC от 04.12.2023 в 22:05:44
    ]deloteca.ru
    0 0
  • DichaelrowSC от 05.12.2023 в 00:01:17
    ]официальный сайт гама казино
    2 0
  • StephenKnoreSX от 11.12.2023 в 01:18:53
    0 1
  • ShanekamSX от 11.12.2023 в 23:38:27
    I'm not sure why but this website is loading very slow for me. Is anyone else having this problem or is it a issue on my end? I'll check back later on and see if the problem still exists. Cryptocurrency roulette games