diff --git a/docs/raw-videos.md b/docs/raw-videos.md index e3e33d50..a77d56c2 100644 --- a/docs/raw-videos.md +++ b/docs/raw-videos.md @@ -29,7 +29,9 @@ natively. Accordingly, CyTube only supports a few codecs: **Video** + * MP4 (AV1) * MP4 (H.264) + * WebM (AV1) * WebM (VP8) * WebM (VP9) * Ogg/Theora diff --git a/player/raw-file.coffee b/player/raw-file.coffee index 1b036e2b..47b20dce 100644 --- a/player/raw-file.coffee +++ b/player/raw-file.coffee @@ -1,12 +1,13 @@ codecToMimeType = (codec) -> switch codec - when 'mov/h264' then 'video/mp4' + when 'mov/h264', 'mov/av1' then 'video/mp4' when 'flv/h264' then 'video/flv' - when 'matroska/vp8', 'matroska/vp9' then 'video/webm' + when 'matroska/vp8', 'matroska/vp9', 'matroska/av1' then 'video/webm' when 'ogg/theora' then 'video/ogg' when 'mp3' then 'audio/mp3' when 'vorbis' then 'audio/ogg' when 'aac' then 'audio/aac' + when 'opus' then 'audio/opus' else 'video/flv' window.FilePlayer = class FilePlayer extends VideoJSPlayer diff --git a/src/custom-media.js b/src/custom-media.js index 9a1289cc..a43c920d 100644 --- a/src/custom-media.js +++ b/src/custom-media.js @@ -24,6 +24,7 @@ const SOURCE_CONTENT_TYPES = new Set([ 'audio/aac', 'audio/ogg', 'audio/mpeg', + 'audio/opus', 'video/mp4', 'video/ogg', 'video/webm' diff --git a/src/ffmpeg.js b/src/ffmpeg.js index 02225974..7d8e77a3 100644 --- a/src/ffmpeg.js +++ b/src/ffmpeg.js @@ -80,13 +80,16 @@ var acceptedCodecs = { "flv/h264": true, "matroska/vp8": true, "matroska/vp9": true, - "ogg/theora": true + "ogg/theora": true, + "mov/av1": true, + "matroska/av1": true }; var acceptedAudioCodecs = { "mp3": true, "vorbis": true, - "aac": true + "aac": true, + "opus": true }; var audioOnlyContainers = {