MediaExporter
in package
uses
ForwardsCalls, HandlesAdvancedMedia, HandlesConcatenation, HandlesFrames, HandlesTimelapse, HasProgressListener
Tags
Table of Contents
Properties
- $concatWithAudio : bool
- $concatWithTranscoding : bool
- $concatWithVideo : bool
- $driver : PHPFFMpeg
- $lastPercentage : float
- $lastRemaining : float
- $maps : Collection
- $mustBeAccurate : bool
- $onProgressCallback : Closure
- $returnFrameContents : bool
- $timelapseFramerate : float
- $visibility : string
- $afterSavingCallbacks : array<string|int, mixed>
- Callbacks that should be called directly after the underlying library completed the save method.
- $format : FormatInterface
- $toDisk : Disk
Methods
- __call() : mixed
- Forwards the call to the driver object and returns the result if it's something different than the driver object itself.
- __construct() : mixed
- accurate() : self
- addFormatOutputMapping() : mixed
- addTileFilter() : self
- Calls the callable with a TileFactory instance and adds the freshly generated TileFilter.
- afterSaving() : self
- Adds a callable to the callbacks array.
- asTimelapseWithFramerate() : self
- concatWithTranscoding() : self
- dd() : void
- Dump the final command and end the script.
- getAccuracy() : bool
- getCommand() : mixed
- Returns the final command, useful for debugging purposes.
- getFrameContents() : string
- getProcessOutput() : ProcessOutput
- inFormat() : self
- onProgress() : HasProgressListener|MediaExporter
- Setter for the callback.
- save() : mixed
- toDisk() : mixed
- unaccurate() : self
- withVisibility() : mixed
- addTimelapseParametersToFormat() : mixed
- getDisk() : Disk
- getMediaOpener() : MediaOpener
- runAfterSavingCallbacks() : mixed
- addConcatFilterAndMapping() : mixed
- applyProgressListenerToFormat() : void
- Only calls the callback if the percentage is below 100 and is different from the previous emitted percentage.
- prepareSaving() : Media|null
- saveWithMappings() : MediaOpener
Properties
$concatWithAudio
protected
bool
$concatWithAudio
= false
$concatWithTranscoding
protected
bool
$concatWithTranscoding
= false
$concatWithVideo
protected
bool
$concatWithVideo
= false
$driver
protected
PHPFFMpeg
$driver
$lastPercentage
protected
float
$lastPercentage
$lastRemaining
protected
float
$lastRemaining
= 0
$maps
protected
Collection
$maps
$mustBeAccurate
protected
bool
$mustBeAccurate
= false
$onProgressCallback
protected
Closure
$onProgressCallback
$returnFrameContents
protected
bool
$returnFrameContents
= false
$timelapseFramerate
protected
float
$timelapseFramerate
$visibility
protected
string
$visibility
$afterSavingCallbacks
Callbacks that should be called directly after the underlying library completed the save method.
private
array<string|int, mixed>
$afterSavingCallbacks
= []
$format
private
FormatInterface
$format
$toDisk
private
Disk
$toDisk
Methods
__call()
Forwards the call to the driver object and returns the result if it's something different than the driver object itself.
public
__call(mixed $method, mixed $arguments) : mixed
Parameters
- $method : mixed
- $arguments : mixed
__construct()
public
__construct(PHPFFMpeg $driver) : mixed
Parameters
- $driver : PHPFFMpeg
accurate()
public
accurate() : self
Return values
selfaddFormatOutputMapping()
public
addFormatOutputMapping(FormatInterface $format, Media $output, array<string|int, mixed> $outs[, mixed $forceDisableAudio = false ][, mixed $forceDisableVideo = false ]) : mixed
Parameters
- $format : FormatInterface
- $output : Media
- $outs : array<string|int, mixed>
- $forceDisableAudio : mixed = false
- $forceDisableVideo : mixed = false
addTileFilter()
Calls the callable with a TileFactory instance and adds the freshly generated TileFilter.
public
addTileFilter(callable $withTileFactory) : self
Parameters
- $withTileFactory : callable
Return values
selfafterSaving()
Adds a callable to the callbacks array.
public
afterSaving(callable $callback) : self
Parameters
- $callback : callable
Return values
selfasTimelapseWithFramerate()
public
asTimelapseWithFramerate(float $framerate) : self
Parameters
- $framerate : float
Return values
selfconcatWithTranscoding()
public
concatWithTranscoding([bool $hasVideo = true ][, bool $hasAudio = true ]) : self
Parameters
- $hasVideo : bool = true
- $hasAudio : bool = true
Return values
selfdd()
Dump the final command and end the script.
public
dd([string $path = null ]) : void
Parameters
- $path : string = null
getAccuracy()
public
getAccuracy() : bool
Return values
boolgetCommand()
Returns the final command, useful for debugging purposes.
public
getCommand([string $path = null ]) : mixed
Parameters
- $path : string = null
getFrameContents()
public
getFrameContents() : string
Return values
stringgetProcessOutput()
public
getProcessOutput() : ProcessOutput
Return values
ProcessOutputinFormat()
public
inFormat(FormatInterface $format) : self
Parameters
- $format : FormatInterface
Return values
selfonProgress()
Setter for the callback.
public
onProgress(Closure $callback) : HasProgressListener|MediaExporter
Parameters
- $callback : Closure
Return values
HasProgressListener|MediaExportersave()
public
save([string $path = null ]) : mixed
Parameters
- $path : string = null
toDisk()
public
toDisk(mixed $disk) : mixed
Parameters
- $disk : mixed
unaccurate()
public
unaccurate() : self
Return values
selfwithVisibility()
public
withVisibility(string $visibility) : mixed
Parameters
- $visibility : string
addTimelapseParametersToFormat()
protected
addTimelapseParametersToFormat() : mixed
getDisk()
protected
getDisk() : Disk
Return values
DiskgetMediaOpener()
protected
getMediaOpener() : MediaOpener
Return values
MediaOpenerrunAfterSavingCallbacks()
protected
runAfterSavingCallbacks([Media $outputMedia = null ]) : mixed
Parameters
- $outputMedia : Media = null
addConcatFilterAndMapping()
private
addConcatFilterAndMapping(Media $outputMedia) : mixed
Parameters
- $outputMedia : Media
applyProgressListenerToFormat()
Only calls the callback if the percentage is below 100 and is different from the previous emitted percentage.
private
applyProgressListenerToFormat(EventEmitterInterface $format) : void
Parameters
- $format : EventEmitterInterface
prepareSaving()
private
prepareSaving([string $path = null ]) : Media|null
Parameters
- $path : string = null
Return values
Media|nullsaveWithMappings()
private
saveWithMappings() : MediaOpener