public function process(ThingInterface $thing, $sourcePath, array $options = null)
    {
        $tmpPath = tempnam(sys_get_temp_dir(), 'Dadatata');

        $pb = new ProcessBuilder([$this->bin]);
        $pb->add('-y');
        $pb->add('-i')->add($sourcePath);
        $pb->add('-f')->add('mjpeg');
        $pb->add('-vf')->add('thumbnail');
        $pb->add('-frames:v')->add(1);
        $pb->add($tmpPath);

        $process = $pb->getProcess();
        $code    = $process->run();

        $x = $process->getOutput();
        $y = $process->getErrorOutput();

        return [$tmpPath];
    }
public function process(ThingInterface $thing, $sourcePath, array $options = null)
    {
        $tmpPath = tempnam(sys_get_temp_dir(), 'Dadatata');

        $pb = new ProcessBuilder([$this->bin]);
        $pb->add('-y');
        $pb->add('-i')->add($sourcePath);
        $pb->add('-f')->add('mjpeg');
        $pb->add('-vf')->add('thumbnail');
        $pb->add('-frames:v')->add(1);
        $pb->add($tmpPath);

        $process = $pb->getProcess();
        $code    = $process->run();

        $x = $process->getOutput();
        $y = $process->getErrorOutput();

        return [$tmpPath];
    }
@param ThingInterface $thing
@param                $sourcePath

@return array Paths to generated files