Skip to content

Commit d3c3b77

Browse files
Add ability to disable -b:v (#300)
* Add ability to disable -b:v * Follows the changes to PHP-FFMpeg #767 * Disable to addition -b:v in AdvancedOutputMapping.php if the kilo bitrate is set to 0 * Update composer.json Co-authored-by: Pascal Baljet <[email protected]>
1 parent 3c4375b commit d3c3b77

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"illuminate/filesystem": "^6.0|^7.0|^8.0",
3232
"illuminate/log": "^6.0|^7.0|^8.0",
3333
"illuminate/support": "^6.0|^7.0|^8.0",
34-
"php-ffmpeg/php-ffmpeg": "^0.17.0"
34+
"php-ffmpeg/php-ffmpeg": "^0.17.0|^0.18.0"
3535
},
3636
"require-dev": {
3737
"league/flysystem-memory": "^1.0",

src/FFMpeg/AdvancedOutputMapping.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function apply(AdvancedMedia $advancedMedia): void
5858
if ($this->format instanceof DefaultVideo) {
5959
$parameters = $this->format->getAdditionalParameters() ?: [];
6060

61-
if (!in_array('-b:v', $parameters)) {
61+
if (!in_array('-b:v', $parameters) && $this->format->getKiloBitrate() !== 0) {
6262
$parameters = ['-b:v', $this->format->getKiloBitrate() . 'k'] + $parameters;
6363
}
6464

0 commit comments

Comments
 (0)