immich
immich copied to clipboard
Video duration is 0:00
The bug
I have two relatively large (6gb) 4k videos that were uploaded from the Android app. In the timeline their duration displays as 0:00 but when opening them, the duration is correct.
The OS that Immich Server is running on
Ubuntu 22.04
Version of Immich Server
v1.95.1
Version of Immich Mobile App
v1.95.0
Platform with the issue
- [ ] Server
- [X] Web
- [ ] Mobile
Your docker-compose.yml content
N/A
Your .env content
N/A
Reproduction steps
1. Open the website and note the duration showing as 0:00
Additional information
No response
Does this specifically happen with 4k files? Is there anything special going on with it? A certain format?
I haven't seen it happen before or after so this is all I have to go on.
I took them with my phone's camera, so nothing special that I can think of, unless Android does something internally to the video when it's that large.
They do record in h.265, but I have other videos like that from the device and they don't have this issue.
Adding a metadata for the same scenario will hopefully help with this issue.
# exiftool version: 12.73
exiftool -json -api largefilesupport=1 library/user/2023/2023-08-26/IMG_0621.MOV
[{
"SourceFile": "library/user/2023/2023-08-26/IMG_0621.MOV",
"ExifToolVersion": 12.73,
"FileName": "IMG_0621.MOV",
"Directory": "library/user/2023/2023-08-26",
"FileSize": "11 GB",
"FileModifyDate": "2023:08:29 00:20:35+08:00",
"FileAccessDate": "2024:02:27 23:51:12+08:00",
"FileInodeChangeDate": "2024:02:27 23:51:11+08:00",
"FilePermissions": "-rw-r--r--",
"FileType": "MOV",
"FileTypeExtension": "mov",
"MIMEType": "video/quicktime",
"MajorBrand": "Apple QuickTime (.MOV/QT)",
"MinorVersion": "0.0.0",
"CompatibleBrands": ["qt "],
"MediaDataSize": 11173832872,
"MediaDataOffset": 36,
"MovieHeaderVersion": 0,
"CreateDate": "2023:08:26 03:32:34",
"ModifyDate": "2023:08:26 03:56:58",
"TimeScale": 600,
"Duration": "0:24:24",
"PreferredRate": 1,
"PreferredVolume": "100.00%",
"PreviewTime": "0 s",
"PreviewDuration": "0 s",
"PosterTime": "0 s",
"SelectionTime": "0 s",
"SelectionDuration": "0 s",
"CurrentTime": "0 s",
"NextTrackID": 6,
"TrackHeaderVersion": 0,
"TrackCreateDate": "2023:08:26 03:32:34",
"TrackModifyDate": "2023:08:26 03:56:58",
"TrackID": 1,
"TrackDuration": "0:24:24",
"TrackLayer": 0,
"TrackVolume": "0.00%",
"ImageWidth": 3840,
"ImageHeight": 2160,
"CleanApertureDimensions": "3840x2160",
"ProductionApertureDimensions": "3840x2160",
"EncodedPixelsDimensions": "3840x2160",
"GraphicsMode": "ditherCopy",
"OpColor": "32768 32768 32768",
"CompressorID": "hvc1",
"SourceImageWidth": 3840,
"SourceImageHeight": 2160,
"XResolution": 72,
"YResolution": 72,
"CompressorName": "HEVC",
"BitDepth": 24,
"VideoFrameRate": 59.975,
"Balance": 0,
"AudioFormat": "mp4a",
"AudioChannels": 2,
"AudioBitsPerSample": 16,
"AudioSampleRate": 44100,
"PurchaseFileFormat": "mp4a",
"Warning": "[minor] The ExtractEmbedded option may find more tags in the media data",
"MatrixStructure": "1 0 0 0 1 0 0 0 1",
"ContentDescribes": "Track 1",
"MediaHeaderVersion": 0,
"MediaCreateDate": "2023:08:26 03:32:34",
"MediaModifyDate": "2023:08:26 03:56:58",
"MediaTimeScale": 600,
"MediaDuration": "0:24:24",
"MediaLanguageCode": "und",
"GenMediaVersion": 0,
"GenFlags": "0 0 0",
"GenGraphicsMode": "ditherCopy",
"GenOpColor": "32768 32768 32768",
"GenBalance": 0,
"HandlerClass": "Data Handler",
"HandlerVendorID": "Apple",
"HandlerDescription": "Core Media Data Handler",
"MetaFormat": "mebx",
"HandlerType": "Metadata Tags",
"Make": "Apple",
"Model": "iPhone 14",
"Software": 16.6,
"CreationDate": "2023:08:26 11:32:34+08:00",
"ImageSize": "3840x2160",
"Megapixels": 8.3,
"AvgBitrate": "61.1 Mbps",
"Rotation": 90
}]
The exifInfo returned by the API:
{
"make": null,
"model": null,
"exifImageWidth": null,
"exifImageHeight": null,
"fileSizeInByte": 6535485408,
"orientation": "6",
"dateTimeOriginal": "2023-08-26T04:22:13.000Z",
"modifyDate": "2023-09-01T08:45:51.000Z",
"timeZone": "UTC",
"lensModel": null,
"fNumber": null,
"focalLength": null,
"iso": null,
"exposureTime": null,
"latitude": null,
"longitude": null,
"city": null,
"state": null,
"country": null,
"description": "",
"projectionType": null
}
I have the same issue with a video 2.21gb in size.
I think it's a bug with extracting the metadata of large files. If I manually 'Refresh metadata' then it results in the following error in the logs.
WARN [Error: File not found - /usr/src/app/upload/library/admin/2023/PXL_20231225_034847173.TS.mp4.xmp
However there never was an .xmp file associated with this video.
#6293 suggests that running the sidecar metadata sync job should clean up the non-existent sidecarPath, however running the job and refreshing the metadata results in the same error in the log.
Just adding my two cents here - same issue. I was able to get it to upload by using IP instead of DNS name (using NPM proxy - thanks for the tip to fix that!). I have a 2+ gig video - uploaded, and it's missing parts of the metadata The duration shows 0:00, the location is missing, the resolution is missing, etc.
I've been looking at the source file - and everything looks to be there - so still trying to see if I can find anything to "fix" it. If there is any information that I can share to help diagnose/fix this - please let me know.
Thanks DeadEnd
Update: I did some digging and found that somehow some of the exif data is missing on the video. There is no DateTimeOriginal, but there is a ModifyDate... odd... Anyway, not sure if it happened during upload, or if the file was missing it that I uploaded. I'm working on finding a copy that isn't missing the data and will upload that and see if it fixes my issue.