Skip to content

Commit c0595e9

Browse files
Merge pull request #54683 from nextcloud/chore/preview/remove-avconv-support
2 parents 86b69c7 + 4b2a93c commit c0595e9

4 files changed

Lines changed: 5 additions & 16 deletions

File tree

config/config.sample.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1429,7 +1429,7 @@
14291429
/**
14301430
* Custom path for ffmpeg binary
14311431
*
1432-
* Defaults to ``null`` and falls back to searching ``avconv`` and ``ffmpeg``
1432+
* Defaults to ``null`` and falls back to searching ``ffmpeg``
14331433
* in the configured ``PATH`` environment
14341434
*/
14351435
'preview_ffmpeg_path' => '/usr/bin/ffmpeg',

lib/private/Preview/Movie.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,7 @@ private function generateThumbNail(int $maxX, int $maxY, string $absPath, int $s
135135

136136
$binaryType = substr(strrchr($this->binary, '/'), 1);
137137

138-
if ($binaryType === 'avconv') {
139-
$cmd = [$this->binary, '-y', '-ss', (string)$second,
140-
'-i', $absPath,
141-
'-an', '-f', 'mjpeg', '-vframes', '1', '-vsync', '1',
142-
$tmpPath];
143-
} elseif ($binaryType === 'ffmpeg') {
138+
if ($binaryType === 'ffmpeg') {
144139
if ($this->useHdr($absPath)) {
145140
// Force colorspace to '2020_ncl' because some videos are
146141
// tagged incorrectly as 'reserved' resulting in fail if not forced.

lib/private/PreviewManager.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -373,14 +373,11 @@ protected function registerCoreProviders() {
373373

374374
$this->registerCoreProvidersOffice();
375375

376-
// Video requires avconv or ffmpeg
376+
// Video requires ffmpeg
377377
if (in_array(Preview\Movie::class, $this->getEnabledDefaultProvider())) {
378378
$movieBinary = $this->config->getSystemValue('preview_ffmpeg_path', null);
379379
if (!is_string($movieBinary)) {
380-
$movieBinary = $this->binaryFinder->findBinaryPath('avconv');
381-
if (!is_string($movieBinary)) {
382-
$movieBinary = $this->binaryFinder->findBinaryPath('ffmpeg');
383-
}
380+
$movieBinary = $this->binaryFinder->findBinaryPath('ffmpeg');
384381
}
385382

386383

tests/lib/Preview/MovieTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ class MovieTest extends Provider {
2626

2727
protected function setUp(): void {
2828
$binaryFinder = Server::get(IBinaryFinder::class);
29-
$movieBinary = $binaryFinder->findBinaryPath('avconv');
30-
if (!is_string($movieBinary)) {
31-
$movieBinary = $binaryFinder->findBinaryPath('ffmpeg');
32-
}
29+
$movieBinary = $binaryFinder->findBinaryPath('ffmpeg');
3330

3431
if (is_string($movieBinary)) {
3532
parent::setUp();

0 commit comments

Comments
 (0)