-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Cannot upload video with .MOV extension - wrong MIME type #1913
Comments
Forgot to mention - if I renamed the file with a .qt extension - it works without errors. Also my *.MOV filename is all in caps if it matters. |
Is the file something you can share with us for troubleshooting? |
LOL! interestingly I can't upload it to github as .MOV so I've zipped it up. It does play OK with Media Player Classic in Windows 11. |
Might be something funky with MOV as container format going on, possibly in combination with the H.265 codec. When I rename this file to just .mp4 it gets uploaded via web without issues and on the server it corrects the MIME type to Edit: it doesn't correct to |
At the end of the day you can only upload files that pass our content type check. The question or "issue", more generally, is "why does x send Looks like there is even an exif tag for mime type and it is set to |
Hmm, I wonder if there actually is some MOV's that are actually non-quicktime videos according to exiftool.. |
Yeah, there's a few different ways to address the issue, which I did not give an opinion about, but that's what is happening and why it is happening 😄 |
LOL! I must check my ADHD on these things... Googled high and low and found this gem: So - I did what it said and is indeed very OS specific. In Windows, need to update Registry at: The current key I have for Content Type is video/mov. Changed it to video/quicktime and reloaded the video at my Immich web instance and it worked! So it is very OS/client specific then. May have to consider to allow video/mov or check with exiftool during upload. Loving Immich so far! Thanks for a great app. |
I think accepting video/mov would be an acceptable solution. |
Ouch - I ran into the same for .AVI files which is video/avi instead of video/x-msvideo. I guess I have to go thru the registry to set it up manually then. At least on the videos and images that I care to upload to Immich. https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types |
We can probably add support this this one as well. Can you open a separate issue to track it? |
Support for MOV should be implemented as of #2045, eg included in Immich version 1.52.0. |
Unable to upload recorded video format to MP4, this cup of Android 10. |
The bug
Uploading .MOV files will throw a 400undefined error notification. File uploaded from Windows 11 Microsoft Edge and Chrome. Although interestingly enough, if I copied the file from PC to my Android phone and uploaded it, it'll work with Android Samsung Internet browser. In logs, no matter both PC and mobile Adroid - this error is on the server logs:
[Nest] 1 - 03/01/2023, 2:03:02 PM ERROR [AssetUploadConfig] Unsupported file type .MOV file MIME type video/mov
[Nest] 1 - 03/01/2023, 2:03:11 PM ERROR [ExpressAdapter] Premature close
Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
at new NodeError (node:internal/errors:372:5)
at ServerResponse.onclose (node:internal/streams/end-of-stream:142:30)
at ServerResponse.emit (node:events:539:35)
at Socket.onServerResponseClose (node:_http_server:236:23)
at Socket.emit (node:events:539:35)
at TCP. (node:net:709:12)
[Nest] 1 - 03/01/2023, 2:11:54 PM ERROR [ExpressAdapter] Premature close
Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
at new NodeError (node:internal/errors:372:5)
at ServerResponse.onclose (node:internal/streams/end-of-stream:142:30)
at ServerResponse.emit (node:events:539:35)
at Socket.onServerResponseClose (node:_http_server:236:23)
at Socket.emit (node:events:539:35)
at TCP. (node:net:709:12)
[Nest] 1 - 03/01/2023, 2:11:57 PM ERROR [ExpressAdapter] Premature close
Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
at new NodeError (node:internal/errors:372:5)
at ServerResponse.onclose (node:internal/streams/end-of-stream:142:30)
at ServerResponse.emit (node:events:539:35)
at Socket.onServerResponseClose (node:_http_server:236:23)
at Socket.emit (node:events:539:35)
at TCP. (node:net:709:12)
[Nest] 1 - 03/01/2023, 2:11:57 PM ERROR [ExpressAdapter] Premature close
Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
at new NodeError (node:internal/errors:372:5)
at ServerResponse.onclose (node:internal/streams/end-of-stream:142:30)
at ServerResponse.emit (node:events:539:35)
at Socket.onServerResponseClose (node:_http_server:236:23)
at Socket.emit (node:events:539:35)
at TCP. (node:net:709:12)
[Nest] 1 - 03/01/2023, 2:11:57 PM ERROR [ExpressAdapter] Premature close
Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
at new NodeError (node:internal/errors:372:5)
at ServerResponse.onclose (node:internal/streams/end-of-stream:142:30)
at ServerResponse.emit (node:events:539:35)
at Socket.onServerResponseClose (node:_http_server:236:23)
at Socket.emit (node:events:539:35)
at TCP. (node:net:709:12)
[Nest] 1 - 03/01/2023, 2:11:58 PM ERROR [ExpressAdapter] Premature close
Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
at new NodeError (node:internal/errors:372:5)
at ServerResponse.onclose (node:internal/streams/end-of-stream:142:30)
at ServerResponse.emit (node:events:539:35)
at Socket.onServerResponseClose (node:_http_server:236:23)
at Socket.emit (node:events:539:35)
at TCP. (node:net:709:12)
The OS that Immich Server is running on
Docker - Linux de524314c912 6.1.14-0-virt #1-Alpine SMP PREEMPT_DYNAMIC Sat, 25 Feb 2023 20:58:04 +0000 x86_64 Linux. Host is in Hyper-v: Linux docker 6.1.14-0-virt #1-Alpine SMP PREEMPT_DYNAMIC Sat, 25 Feb 2023 20:58:04 +0000 x86_64 Linux
Version of Immich Server
v1.49.0
Version of Immich Mobile App
v1.49.0
Platform with the issue
Your docker-compose.yml content
Your .env content
Reproduction steps
Additional information
Unsupported file type .MOV file MIME type video/mov. This seems to have taken the file extension and place as video/>fileextension<. It should be "video/quicktime" as MIME type. File was extracted from iPhone to PC using Windows Photos.
The text was updated successfully, but these errors were encountered: