feat(server): Add support for .ts files (#27529)

This commit is contained in:
Ray
2026-04-06 09:50:05 -04:00
committed by GitHub
parent 564065a3ed
commit 136bd1e2eb
5 changed files with 18 additions and 14 deletions
+2 -2
View File
@@ -29,13 +29,13 @@ For the full list, refer to the [Immich source code](https://github.com/immich-a
## Video formats ## Video formats
| Format | Extension(s) | Supported? | Notes | | Format | Extension(s) | Supported? | Notes |
| :---------- | :-------------------- | :----------------: | :---- | | :---------- | :-------------------------- | :----------------: | :---- |
| `3GPP` | `.3gp` `.3gpp` | :white_check_mark: | | | `3GPP` | `.3gp` `.3gpp` | :white_check_mark: | |
| `AVI` | `.avi` | :white_check_mark: | | | `AVI` | `.avi` | :white_check_mark: | |
| `FLV` | `.flv` | :white_check_mark: | | | `FLV` | `.flv` | :white_check_mark: | |
| `M4V` | `.m4v` | :white_check_mark: | | | `M4V` | `.m4v` | :white_check_mark: | |
| `MATROSKA` | `.mkv` | :white_check_mark: | | | `MATROSKA` | `.mkv` | :white_check_mark: | |
| `MP2T` | `.mts` `.m2ts` `.m2t` | :white_check_mark: | | | `MP2T` | `.mts` `.m2ts` `.m2t` `.ts` | :white_check_mark: | |
| `MP4` | `.mp4` `.insv` | :white_check_mark: | | | `MP4` | `.mp4` `.insv` | :white_check_mark: | |
| `MPEG` | `.mpg` `.mpe` `.mpeg` | :white_check_mark: | | | `MPEG` | `.mpg` `.mpe` `.mpeg` | :white_check_mark: | |
| `MXF` | `.mxf` | :white_check_mark: | | | `MXF` | `.mxf` | :white_check_mark: | |
+1
View File
@@ -173,6 +173,7 @@ export const setupBaseMockApiRoutes = async (context: BrowserContext, adminUserI
'.mpeg', '.mpeg',
'.mpg', '.mpg',
'.mts', '.mts',
'.ts',
'.vob', '.vob',
'.webm', '.webm',
'.wmv', '.wmv',
@@ -111,6 +111,7 @@ const validVideos = [
'.mpg', '.mpg',
'.mts', '.mts',
'.mxf', '.mxf',
'.ts',
'.vob', '.vob',
'.webm', '.webm',
'.wmv', '.wmv',
+1
View File
@@ -83,6 +83,7 @@ describe('mimeTypes', () => {
{ mimetype: 'video/mp2t', extension: '.m2t' }, { mimetype: 'video/mp2t', extension: '.m2t' },
{ mimetype: 'video/mp2t', extension: '.m2ts' }, { mimetype: 'video/mp2t', extension: '.m2ts' },
{ mimetype: 'video/mp2t', extension: '.mts' }, { mimetype: 'video/mp2t', extension: '.mts' },
{ mimetype: 'video/mp2t', extension: '.ts' },
{ mimetype: 'video/mp4', extension: '.mp4' }, { mimetype: 'video/mp4', extension: '.mp4' },
{ mimetype: 'video/mpeg', extension: '.mpe' }, { mimetype: 'video/mpeg', extension: '.mpe' },
{ mimetype: 'video/mpeg', extension: '.mpeg' }, { mimetype: 'video/mpeg', extension: '.mpeg' },
+1
View File
@@ -114,6 +114,7 @@ const video: Record<string, string[]> = {
'.mpg': ['video/mpeg'], '.mpg': ['video/mpeg'],
'.mts': ['video/mp2t'], '.mts': ['video/mp2t'],
'.mxf': ['application/mxf'], '.mxf': ['application/mxf'],
'.ts': ['video/mp2t'],
'.vob': ['video/mpeg'], '.vob': ['video/mpeg'],
'.webm': ['video/webm'], '.webm': ['video/webm'],
'.wmv': ['video/x-ms-wmv'], '.wmv': ['video/x-ms-wmv'],