mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
refactor(server): video transcode processor (#2163)
* refactor(server): video transcode processor * refactor: rename shouldRotate to isVideoVertical, remove unnecessary await * refactor: rename getOptions to getFfmpegOptions to be clearer in that context * fix: optimal preset converting vertical videos already smaller than target resolution --------- Co-authored-by: Zack Pollard <zackpollard@ymail.com>
This commit is contained in:
@@ -18,6 +18,7 @@ import {
|
||||
mapUser,
|
||||
SearchResult,
|
||||
SharedLinkResponseDto,
|
||||
VideoInfo,
|
||||
} from '../src';
|
||||
|
||||
const today = new Date();
|
||||
@@ -704,3 +705,51 @@ export const searchStub = {
|
||||
facets: [],
|
||||
}),
|
||||
};
|
||||
|
||||
export const probeStub = {
|
||||
empty: { streams: [] },
|
||||
multiple: Object.freeze<VideoInfo>({
|
||||
streams: [
|
||||
{
|
||||
height: 1080,
|
||||
width: 400,
|
||||
codecName: 'h265',
|
||||
codecType: 'video',
|
||||
frameCount: 100,
|
||||
rotation: 0,
|
||||
},
|
||||
{
|
||||
height: 1080,
|
||||
width: 400,
|
||||
codecName: 'h7000',
|
||||
codecType: 'video',
|
||||
frameCount: 99,
|
||||
rotation: 0,
|
||||
},
|
||||
],
|
||||
}),
|
||||
noHeight: Object.freeze<VideoInfo>({
|
||||
streams: [
|
||||
{
|
||||
height: 0,
|
||||
width: 400,
|
||||
codecName: 'h265',
|
||||
codecType: 'video',
|
||||
frameCount: 100,
|
||||
rotation: 0,
|
||||
},
|
||||
],
|
||||
}),
|
||||
tooBig: Object.freeze<VideoInfo>({
|
||||
streams: [
|
||||
{
|
||||
height: 10000,
|
||||
width: 10000,
|
||||
codecName: 'h264',
|
||||
codecType: 'video',
|
||||
frameCount: 100,
|
||||
rotation: 0,
|
||||
},
|
||||
],
|
||||
}),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user