✨ Set stream codecs properly
This commit is contained in:
parent
9abcb9ec1b
commit
e869ff2a59
4 changed files with 149 additions and 11 deletions
46
src/Format/DefaultVideo.php
Normal file
46
src/Format/DefaultVideo.php
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
|
||||
namespace Danjones\FFMpeg\Format;
|
||||
|
||||
use FFMpeg\Format\Video\DefaultVideo as BaseVideo;
|
||||
|
||||
class DefaultVideo extends BaseVideo
|
||||
{
|
||||
protected bool $supportsBFrames = false;
|
||||
|
||||
public function __construct($codec)
|
||||
{
|
||||
$this->setVideoCodec($codec);
|
||||
$this->kiloBitrate = 0;
|
||||
$this->modulus = 0;
|
||||
}
|
||||
|
||||
public function setVideoCodec($videoCodec)
|
||||
{
|
||||
$this->videoCodec = $videoCodec;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getAvailableVideoCodecs()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getAvailableAudioCodecs()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
public function supportBFrames()
|
||||
{
|
||||
return $this->supportsBFrames;
|
||||
}
|
||||
|
||||
public function setSupportBFrames(bool $supports = true): static
|
||||
{
|
||||
$this->supportsBFrames = $supports;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue