mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
fix(server): extract motion photo android single frame (#3903)
This commit is contained in:
parent
d0a06739d8
commit
e510e733cd
7 changed files with 163 additions and 147 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { GenericContainer } from 'testcontainers';
|
||||
import { PostgreSqlContainer } from '@testcontainers/postgresql';
|
||||
import { GenericContainer } from 'testcontainers';
|
||||
export default async () => {
|
||||
process.env.NODE_ENV = 'development';
|
||||
process.env.TYPESENSE_API_KEY = 'abc123';
|
||||
|
|
|
|||
23
server/test/fixtures/media.stub.ts
vendored
23
server/test/fixtures/media.stub.ts
vendored
|
|
@ -7,10 +7,21 @@ const probeStubDefaultFormat: VideoFormat = {
|
|||
};
|
||||
|
||||
const probeStubDefaultVideoStream: VideoStreamInfo[] = [
|
||||
{ height: 1080, width: 1920, codecName: 'hevc', codecType: 'video', frameCount: 100, rotation: 0, isHDR: false },
|
||||
{
|
||||
index: 0,
|
||||
height: 1080,
|
||||
width: 1920,
|
||||
codecName: 'hevc',
|
||||
codecType: 'video',
|
||||
frameCount: 100,
|
||||
rotation: 0,
|
||||
isHDR: false,
|
||||
},
|
||||
];
|
||||
|
||||
const probeStubDefaultAudioStream: AudioStreamInfo[] = [{ codecName: 'aac', codecType: 'audio' }];
|
||||
const probeStubDefaultAudioStream: AudioStreamInfo[] = [
|
||||
{ index: 0, codecName: 'aac', codecType: 'audio', frameCount: 100 },
|
||||
];
|
||||
|
||||
const probeStubDefault: VideoInfo = {
|
||||
format: probeStubDefaultFormat,
|
||||
|
|
@ -25,6 +36,7 @@ export const probeStub = {
|
|||
...probeStubDefault,
|
||||
videoStreams: [
|
||||
{
|
||||
index: 0,
|
||||
height: 1080,
|
||||
width: 400,
|
||||
codecName: 'hevc',
|
||||
|
|
@ -34,6 +46,7 @@ export const probeStub = {
|
|||
isHDR: false,
|
||||
},
|
||||
{
|
||||
index: 1,
|
||||
height: 1080,
|
||||
width: 400,
|
||||
codecName: 'h7000',
|
||||
|
|
@ -48,6 +61,7 @@ export const probeStub = {
|
|||
...probeStubDefault,
|
||||
videoStreams: [
|
||||
{
|
||||
index: 0,
|
||||
height: 0,
|
||||
width: 400,
|
||||
codecName: 'hevc',
|
||||
|
|
@ -62,6 +76,7 @@ export const probeStub = {
|
|||
...probeStubDefault,
|
||||
videoStreams: [
|
||||
{
|
||||
index: 0,
|
||||
height: 2160,
|
||||
width: 3840,
|
||||
codecName: 'h264',
|
||||
|
|
@ -76,6 +91,7 @@ export const probeStub = {
|
|||
...probeStubDefault,
|
||||
videoStreams: [
|
||||
{
|
||||
index: 0,
|
||||
height: 480,
|
||||
width: 480,
|
||||
codecName: 'h264',
|
||||
|
|
@ -90,6 +106,7 @@ export const probeStub = {
|
|||
...probeStubDefault,
|
||||
videoStreams: [
|
||||
{
|
||||
index: 0,
|
||||
height: 2160,
|
||||
width: 3840,
|
||||
codecName: 'h264',
|
||||
|
|
@ -102,7 +119,7 @@ export const probeStub = {
|
|||
}),
|
||||
audioStreamMp3: Object.freeze<VideoInfo>({
|
||||
...probeStubDefault,
|
||||
audioStreams: [{ codecType: 'audio', codecName: 'aac' }],
|
||||
audioStreams: [{ index: 0, codecType: 'audio', codecName: 'aac', frameCount: 100 }],
|
||||
}),
|
||||
matroskaContainer: Object.freeze<VideoInfo>({
|
||||
...probeStubDefault,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue