public function recordVideo($filename, $length, $timeUnit = self::TIMEUNIT_SECOND)
    {
        if (empty($filename)) {
            throw new \InvalidArgumentException('Filename required');
        }

        $this->valueArguments['output'] = $filename;

        $this->timeout($length, $timeUnit);

        $this->execute(
            $this->buildCommand()
        );
    }
public function recordVideo($filename, $length, $timeUnit = self::TIMEUNIT_SECOND)
    {
        if (empty($filename)) {
            throw new \InvalidArgumentException('Filename required');
        }

        $this->valueArguments['output'] = $filename;

        $this->timeout($length, $timeUnit);

        $this->execute(
            $this->buildCommand()
        );
    }
public function recordVideo ( $ filename , $ length , $ timeUnit = self :: TIMEUNIT_SECOND ) { if ( empty ( $ filename ) ) { throw new \ InvalidArgumentException ( 'Filename required' ) ; } $ this -> valueArguments [ 'output' ] = $ filename ; $ this -> timeout ( $ length , $ timeUnit ) ; $ this -> execute ( $ this -> buildCommand ( ) ) ; }
Record a video clip for the specified amount of time and save with the given filename

Time unit can be one of: `Raspicam::TIMEUNIT_MINUTE`, `Raspicam::TIMEUNIT_SECOND`,
`Raspicam::TIMEUNIT_MILLISECOND`, `Raspicam::TIMEUNIT_MICROSECOND`.

**Example:**
```php
// Record a 5s video clip with default settings (1080p30)
$camera->recordVideo('video.h264', 5);
```

@param string    $filename
@param int|float $length   Time how long to keep recording.
@param string    $timeUnit Optional. Time unit for $length. Default: `Raspicam::TIMEUNIT_SECOND`
Record a video clip for the specified amount of time and save with the given filename