Add support for .mxf files #3935

This commit is contained in:
graciousgrey 2023-12-06 11:59:53 +01:00
parent 3d962e2382
commit 3507f5ef55
4 changed files with 6 additions and 0 deletions

View file

@ -96,6 +96,7 @@ var Extensions = FileExtensions{
".mp": VideoMP4,
ExtMP4: VideoMP4, // .mp4
".m4v": VideoM4V,
".mxf": VideoMXF,
".3gp": Video3GP,
".3g2": Video3G2,
".flv": VideoFlash,

View file

@ -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"))
})
}

View file

@ -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

View file

@ -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,