Video transcoding extension, currently just supports changing the video container

This commit is contained in:
Matthew Barbour
2020-08-28 09:11:14 -05:00
parent 65aca09203
commit ecd860ec6d
12 changed files with 516 additions and 7 deletions

View File

@@ -98,8 +98,7 @@ class VideoFileHandler extends DataHandlerExtension
$event->image->video_codec = $video_codec;
$event->image->audio = $audio;
if($event->image->get_mime()==MimeType::MKV &&
($event->image->video_codec == "vp9" ||
$event->image->video_codec == "vp8")) {
VideoContainers::is_video_codec_supported(VideoContainers::WEBM,$event->image->video_codec)) {
// WEBMs are MKVs with the VP9 or VP8 codec
// For browser-friendliness, we'll just change the mime type
$event->image->set_mime(MimeType::WEBM);