From 44bb469a755db5436d6f84887c25731b6aae8a05 Mon Sep 17 00:00:00 2001 From: 8chan Date: Thu, 30 Oct 2014 05:32:39 -0700 Subject: [PATCH] VP9 support (experimental) --- inc/lib/webm/ffmpeg.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/inc/lib/webm/ffmpeg.php b/inc/lib/webm/ffmpeg.php index edd2c73a..935b5932 100644 --- a/inc/lib/webm/ffmpeg.php +++ b/inc/lib/webm/ffmpeg.php @@ -36,9 +36,6 @@ function is_valid_webm($ffprobe_out) { if ((count($ffprobe_out['streams']) > 1) && (!$config['webm']['allow_audio'])) return array('code' => 3, 'msg' => $config['error']['webmhasaudio']); - if ($ffprobe_out['streams'][0]['codec_name'] != 'vp8') - return array('code' => 2, 'msg' => $config['error']['invalidwebm']); - if (empty($ffprobe_out['streams'][0]['width']) || (empty($ffprobe_out['streams'][0]['height']))) return array('code' => 2, 'msg' => $config['error']['invalidwebm']); @@ -56,7 +53,7 @@ function make_webm_thumbnail($filename, $thumbnail, $width, $height) { $ffmpeg = $config['webm']['ffmpeg_path']; $ffmpeg_out = array(); - exec("$ffmpeg -i $filename -v quiet -ss 00:00:00 -an -vframes 1 -f mjpeg -vf scale=$width:$height $thumbnail 2>&1"); + exec("$ffmpeg -strict -2 -i $filename -v quiet -ss 00:00:00 -an -vframes 1 -f mjpeg -vf scale=$width:$height $thumbnail 2>&1"); return count($ffmpeg_out); }