Audio Params (#344)
* 🚀 video profile and level * add missing getter * add missing use statement * add missing return $this * 1 test fixed * fix other tests and clean up We MUST rewrite them. They are too complex when it comes to new features * trim trailing whitespaces * fix typo * 🚀 support for additional params in audio
This commit is contained in:
parent
4cfcabd7b5
commit
cb7d850338
8 changed files with 196 additions and 85 deletions
|
|
@ -91,6 +91,13 @@ class Audio extends AbstractStreamableMedia
|
|||
$commands[] = '-ac';
|
||||
$commands[] = $format->getAudioChannels();
|
||||
}
|
||||
// If the user passed some additional parameters
|
||||
if (null !== $format->getAdditionalParameters()) {
|
||||
foreach ($format->getAdditionalParameters() as $additionalParameter) {
|
||||
$commands[] = $additionalParameter;
|
||||
}
|
||||
}
|
||||
|
||||
$commands[] = $outputPathfile;
|
||||
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -72,6 +72,8 @@ class Video extends Audio
|
|||
if ($format instanceof VideoInterface) {
|
||||
if (null !== $format->getVideoCodec()) {
|
||||
$filters->add(new SimpleFilter(array('-vcodec', $format->getVideoCodec())));
|
||||
$filters->add(new SimpleFilter(array('-vprofile', $format->getProfile())));
|
||||
$filters->add(new SimpleFilter(array('-level', $format->getLevel())));
|
||||
}
|
||||
}
|
||||
if ($format instanceof AudioInterface) {
|
||||
|
|
@ -121,11 +123,9 @@ class Video extends Audio
|
|||
}
|
||||
|
||||
// If the user passed some additional parameters
|
||||
if ($format instanceof VideoInterface) {
|
||||
if (null !== $format->getAdditionalParameters()) {
|
||||
foreach ($format->getAdditionalParameters() as $additionalParameter) {
|
||||
$commands[] = $additionalParameter;
|
||||
}
|
||||
if (null !== $format->getAdditionalParameters()) {
|
||||
foreach ($format->getAdditionalParameters() as $additionalParameter) {
|
||||
$commands[] = $additionalParameter;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue