From 3507f5ef5573c76a10cc8c03a426801003e27f17 Mon Sep 17 00:00:00 2001 From: graciousgrey Date: Wed, 6 Dec 2023 11:59:53 +0100 Subject: [PATCH] Add support for .mxf files #3935 --- pkg/fs/file_exts.go | 1 + pkg/fs/file_exts_test.go | 3 +++ pkg/fs/file_types.go | 1 + pkg/media/formats.go | 1 + 4 files changed, 6 insertions(+) diff --git a/pkg/fs/file_exts.go b/pkg/fs/file_exts.go index 89d1facac..c12a350b8 100644 --- a/pkg/fs/file_exts.go +++ b/pkg/fs/file_exts.go @@ -96,6 +96,7 @@ var Extensions = FileExtensions{ ".mp": VideoMP4, ExtMP4: VideoMP4, // .mp4 ".m4v": VideoM4V, + ".mxf": VideoMXF, ".3gp": Video3GP, ".3g2": Video3G2, ".flv": VideoFlash, diff --git a/pkg/fs/file_exts_test.go b/pkg/fs/file_exts_test.go index 1b5d916d4..4d764a785 100644 --- a/pkg/fs/file_exts_test.go +++ b/pkg/fs/file_exts_test.go @@ -28,4 +28,7 @@ func TestFileExtensions_Known(t *testing.T) { t.Run("mp", func(t *testing.T) { assert.True(t, Extensions.Known("file.mp")) }) + t.Run("mxf", func(t *testing.T) { + assert.True(t, Extensions.Known("file.mxf")) + }) } diff --git a/pkg/fs/file_types.go b/pkg/fs/file_types.go index c9338b189..3dd29827b 100644 --- a/pkg/fs/file_types.go +++ b/pkg/fs/file_types.go @@ -39,6 +39,7 @@ const ( VideoMP2 Type = "mp2" // MPEG-2, H.222/H.262 VideoMP4 Type = "mp4" // MPEG-4 Container based on QuickTime, can contain AVC, HEVC,... VideoM4V Type = "m4v" // Apple iTunes MPEG-4 Container, optionally with DRM copy protection + VideoMXF Type = "mxf" // Material Exchange Format VideoAVI Type = "avi" // Microsoft Audio Video Interleave (AVI) Video3GP Type = "3gp" // Mobile Multimedia Container, MPEG-4 Part 12 Video3G2 Type = "3g2" // Similar to 3GP, consumes less space & bandwidth diff --git a/pkg/media/formats.go b/pkg/media/formats.go index 8d20ceee8..11ca4595f 100644 --- a/pkg/media/formats.go +++ b/pkg/media/formats.go @@ -32,6 +32,7 @@ var Formats = map[fs.Type]Type{ fs.VideoM4V: Video, fs.VideoMKV: Video, fs.VideoMOV: Video, + fs.VideoMXF: Video, fs.Video3GP: Video, fs.Video3G2: Video, fs.VideoFlash: Video,