Open Brice187 opened 3 days ago
Can you share a file that this issue happens on? Ideally in a .zip
The error is in video-related code, but that's a jpeg. Are you sure it's the correct file?
oops. here we go:
# check where issue happens
/tmp kubectl -n immich logs immich-server-76f48fd794-l9brc | grep -A 12 "Invalid unit value N/A" | grep '"id":'
...
"id": "1f550aa4-c6db-49b1-87e8-5be412a95d2f"
...
# sha256 sum the correct file
root@immich-server-76f48fd794-l9brc:/usr/src/app# sha256sum upload/encoded-video/14065f40-2ef9-46a7-b562-f331a94f504b/1f/55/1f550aa4-c6db-49b1-87e8-5be412a95d2f.mp4
03e60b1795dca1a11cc14d585e211c0da29cb7ef6e15ee52cd2ebaff16ef41d9 upload/encoded-video/14065f40-2ef9-46a7-b562-f331a94f504b/1f/55/1f550aa4-c6db-49b1-87e8-5be412a95d2f.mp4
b.mp4.zip sha256: 03e60b1795dca1a11cc14d585e211c0da29cb7ef6e15ee52cd2ebaff16ef41d9
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'b.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf61.1.100
Duration: 00:00:00.04, start: 0.000000, bitrate: 32170 kb/s
Stream #0:0[0x1](und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(progressive), 960x720 [SAR 1:1 DAR 4:3], 32004 kb/s, 25 fps, 25 tbr, 12800 tbn (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
encoder : Lavc61.3.100 libx264
I think the issue is
Duration: 00:00:00.04
Being only a fraction of a second, but the video parsing takes the seconds
component of the duration:
https://github.com/immich-app/immich/blob/45517ab7aedcf488da6610587a01200decd01cbe/server/src/services/metadata.service.ts#L692-L694
I would like to work on this. I am new to this repo. Can you please tell me how to reproduce this? I am not able to reproduce this issue. Does this happen just for uploading this video? I am using the latest code
Thanks! Yes, just uploading the video should reproduce it. Admittedly I haven't reproduced it in Immich myself, I just ran ffprobe
on the file and manually looked for weird metadata (finding that subsecond Duration).
I think the issue is
Duration: 00:00:00.04
Being only a fraction of a second, but the video parsing takes the
seconds
component of the duration:
But still the function fromObject
even accepts fractional component of seconds.
let x = Duration.fromObject({ seconds: 0.004 }).toFormat('hh:mm:ss.SSS');
console.log(x);
yeilds 00:00:00.004
.
cannot reproduce this with the docker compose setup, although it looks like it is trying to process the string "N/A". thought it might be an issue with the fluent-ffmpeg library https://github.com/fluent-ffmpeg/node-fluent-ffmpeg/issues/1195. But after looking through, I believe the ffmpeg CLI is returning the string N/A instead. Wondering how are the ffmpeg binaries configured?
The bug
The OS that Immich Server is running on
Debian Host (running in k3s v1.31.1+k3s1)
Version of Immich Server
v1.118.2
Version of Immich Mobile App
not mobile related
Platform with the issue
Your docker-compose.yml content
Your .env content