mirror of
https://github.com/immich-app/immich.git
synced 2024-11-16 18:42:17 -07:00
f8ff342852
* set stream with `-map` flag * updated tests * fixed audio stream mapping * added bframe setting to config * updated api * added b-frame option in dashboard * updated tests and formatting * "Advanced" section for FFmpeg with extra options * updated api * updated tests and formatting * styling * made vp9 bitstream filters conditional on b-frames * fixed gop size condition * add cq override * simplified isEdited conditions * simplified conditional flow for cq mode * fixed dto * clarified cq mode in description * formatting * added npl setting * Adjusted b-frame title and description * fixed rebase * changed defaults for pascal compatibility, added temporal aq setting * updated api * added temporal aq to ui * polished dashboard * formatting
133 lines
3.0 KiB
TypeScript
133 lines
3.0 KiB
TypeScript
import { AudioStreamInfo, VideoFormat, VideoInfo, VideoStreamInfo } from '@app/domain';
|
|
|
|
const probeStubDefaultFormat: VideoFormat = {
|
|
formatName: 'mov,mp4,m4a,3gp,3g2,mj2',
|
|
formatLongName: 'QuickTime / MOV',
|
|
duration: 0,
|
|
};
|
|
|
|
const probeStubDefaultVideoStream: VideoStreamInfo[] = [
|
|
{
|
|
index: 0,
|
|
height: 1080,
|
|
width: 1920,
|
|
codecName: 'hevc',
|
|
codecType: 'video',
|
|
frameCount: 100,
|
|
rotation: 0,
|
|
isHDR: false,
|
|
},
|
|
];
|
|
|
|
const probeStubDefaultAudioStream: AudioStreamInfo[] = [
|
|
{ index: 1, codecName: 'aac', codecType: 'audio', frameCount: 100 },
|
|
];
|
|
|
|
const probeStubDefault: VideoInfo = {
|
|
format: probeStubDefaultFormat,
|
|
videoStreams: probeStubDefaultVideoStream,
|
|
audioStreams: probeStubDefaultAudioStream,
|
|
};
|
|
|
|
export const probeStub = {
|
|
noVideoStreams: Object.freeze<VideoInfo>({ ...probeStubDefault, videoStreams: [] }),
|
|
noAudioStreams: Object.freeze<VideoInfo>({ ...probeStubDefault, audioStreams: [] }),
|
|
multipleVideoStreams: Object.freeze<VideoInfo>({
|
|
...probeStubDefault,
|
|
videoStreams: [
|
|
{
|
|
index: 0,
|
|
height: 1080,
|
|
width: 400,
|
|
codecName: 'hevc',
|
|
codecType: 'video',
|
|
frameCount: 100,
|
|
rotation: 0,
|
|
isHDR: false,
|
|
},
|
|
{
|
|
index: 1,
|
|
height: 1080,
|
|
width: 400,
|
|
codecName: 'h7000',
|
|
codecType: 'video',
|
|
frameCount: 99,
|
|
rotation: 0,
|
|
isHDR: false,
|
|
},
|
|
],
|
|
}),
|
|
noHeight: Object.freeze<VideoInfo>({
|
|
...probeStubDefault,
|
|
videoStreams: [
|
|
{
|
|
index: 0,
|
|
height: 0,
|
|
width: 400,
|
|
codecName: 'hevc',
|
|
codecType: 'video',
|
|
frameCount: 100,
|
|
rotation: 0,
|
|
isHDR: false,
|
|
},
|
|
],
|
|
}),
|
|
videoStream2160p: Object.freeze<VideoInfo>({
|
|
...probeStubDefault,
|
|
videoStreams: [
|
|
{
|
|
index: 0,
|
|
height: 2160,
|
|
width: 3840,
|
|
codecName: 'h264',
|
|
codecType: 'video',
|
|
frameCount: 100,
|
|
rotation: 0,
|
|
isHDR: false,
|
|
},
|
|
],
|
|
}),
|
|
videoStreamHDR: Object.freeze<VideoInfo>({
|
|
...probeStubDefault,
|
|
videoStreams: [
|
|
{
|
|
index: 0,
|
|
height: 480,
|
|
width: 480,
|
|
codecName: 'h264',
|
|
codecType: 'video',
|
|
frameCount: 100,
|
|
rotation: 0,
|
|
isHDR: true,
|
|
},
|
|
],
|
|
}),
|
|
videoStreamVertical2160p: Object.freeze<VideoInfo>({
|
|
...probeStubDefault,
|
|
videoStreams: [
|
|
{
|
|
index: 0,
|
|
height: 2160,
|
|
width: 3840,
|
|
codecName: 'h264',
|
|
codecType: 'video',
|
|
frameCount: 100,
|
|
rotation: 90,
|
|
isHDR: false,
|
|
},
|
|
],
|
|
}),
|
|
audioStreamMp3: Object.freeze<VideoInfo>({
|
|
...probeStubDefault,
|
|
audioStreams: [{ index: 1, codecType: 'audio', codecName: 'aac', frameCount: 100 }],
|
|
}),
|
|
matroskaContainer: Object.freeze<VideoInfo>({
|
|
...probeStubDefault,
|
|
format: {
|
|
formatName: 'matroska,webm',
|
|
formatLongName: 'Matroska / WebM',
|
|
duration: 0,
|
|
},
|
|
}),
|
|
};
|