diff --git a/inc/lib/webm/ffmpeg.php b/inc/lib/webm/ffmpeg.php index e45c09bb..dfd22d81 100644 --- a/inc/lib/webm/ffmpeg.php +++ b/inc/lib/webm/ffmpeg.php @@ -62,7 +62,7 @@ function is_valid_webm($ffprobe_out) { $trackmap = locate_webm_tracks($ffprobe_out); // one video track - if (count($trackmap['videoat']) != 1) { + if (count($trackmap['videoat']) < 1) { return [ 'error' => [ 'code' => 2, @@ -70,6 +70,7 @@ function is_valid_webm($ffprobe_out) { ] ]; } + // If there's more than one video, yolo it $videoidx = $trackmap['videoat'][0]; $extension = pathinfo($ffprobe_out['format']['filename'], PATHINFO_EXTENSION);