From ff2ce4d3ac0f0c77e5ee599fd445eee42c579c69 Mon Sep 17 00:00:00 2001 From: flashwave Date: Sun, 29 Jan 2023 21:29:20 +0000 Subject: [PATCH] Use faster method for extracting cover image. --- src/FFMPEG.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/FFMPEG.php b/src/FFMPEG.php index 629edd4..5b09d83 100644 --- a/src/FFMPEG.php +++ b/src/FFMPEG.php @@ -15,10 +15,11 @@ final class FFMPEG { } public static function grabFirstAudioCover(string $url): Stream { - return new ProcessStream( + return self::grabFirstVideoFrame($url); + /*return new ProcessStream( sprintf('ffmpeg -i %s -an -c:v png -f image2pipe -', escapeshellarg($url)), 'rb' - ); + );*/ } public static function probe(string $url): ?object {