mirror of
https://github.com/immich-app/immich.git
synced 2024-12-04 10:34:56 +02:00
ee49f470b7
* added transcode configs for nvenc,qsv and vaapi * updated dev docker compose * added software fallback * working vaapi * minor fixes and added tests * updated api * compile libvips * move hwaccel settings to `hwaccel.yml` * changed default dockerfile, moved `readdir` call * removed unused import * minor cleanup * fix for arm build * added documentation, minor fixes * added intel driver * updated docs styling * uppercase codec and api names * formatting * added tests * updated docs * removed semicolons * added link to `hwaccel.yml` * added newlines * added `hwaccel` section to docker-compose.prod.yml * ensure mesa drivers are installed * switch to mimalloc for sharp * moved build version and sha256 to json * let libmfx set the render device * possible fix for vp9 on qsv * updated tests * formatting * review suggestions * semicolon * moved `LD_PRELOAD` to start script * switched to jellyfin's ffmpeg package * fixed dockerfile * use cqp instead of icq for qsv vp9 * updated dockerfile * added sha256sum for other platforms * fixtures
97 lines
2.4 KiB
TypeScript
97 lines
2.4 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[] = [
|
|
{ height: 1080, width: 1920, codecName: 'hevc', codecType: 'video', frameCount: 100, rotation: 0 },
|
|
];
|
|
|
|
const probeStubDefaultAudioStream: AudioStreamInfo[] = [{ codecName: 'aac', codecType: 'audio' }];
|
|
|
|
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: [
|
|
{
|
|
height: 1080,
|
|
width: 400,
|
|
codecName: 'hevc',
|
|
codecType: 'video',
|
|
frameCount: 100,
|
|
rotation: 0,
|
|
},
|
|
{
|
|
height: 1080,
|
|
width: 400,
|
|
codecName: 'h7000',
|
|
codecType: 'video',
|
|
frameCount: 99,
|
|
rotation: 0,
|
|
},
|
|
],
|
|
}),
|
|
noHeight: Object.freeze<VideoInfo>({
|
|
...probeStubDefault,
|
|
videoStreams: [
|
|
{
|
|
height: 0,
|
|
width: 400,
|
|
codecName: 'hevc',
|
|
codecType: 'video',
|
|
frameCount: 100,
|
|
rotation: 0,
|
|
},
|
|
],
|
|
}),
|
|
videoStream2160p: Object.freeze<VideoInfo>({
|
|
...probeStubDefault,
|
|
videoStreams: [
|
|
{
|
|
height: 2160,
|
|
width: 3840,
|
|
codecName: 'h264',
|
|
codecType: 'video',
|
|
frameCount: 100,
|
|
rotation: 0,
|
|
},
|
|
],
|
|
}),
|
|
videoStreamVertical2160p: Object.freeze<VideoInfo>({
|
|
...probeStubDefault,
|
|
videoStreams: [
|
|
{
|
|
height: 2160,
|
|
width: 3840,
|
|
codecName: 'h264',
|
|
codecType: 'video',
|
|
frameCount: 100,
|
|
rotation: 90,
|
|
},
|
|
],
|
|
}),
|
|
audioStreamMp3: Object.freeze<VideoInfo>({
|
|
...probeStubDefault,
|
|
audioStreams: [{ codecType: 'audio', codecName: 'aac' }],
|
|
}),
|
|
matroskaContainer: Object.freeze<VideoInfo>({
|
|
...probeStubDefault,
|
|
format: {
|
|
formatName: 'matroska,webm',
|
|
formatLongName: 'Matroska / WebM',
|
|
duration: 0,
|
|
},
|
|
}),
|
|
};
|