Confusing error when using video/mov mimetype for uploading .mov files
Describe the current behavior
Apparently on some Windows installs (like my friend's live media production machine) the system-wide mimetype registry has a nonstandard record for .mov files under HKEY_CLASSES_ROOT.
As web browsers defer to this registry to figure out the uploaded video's mimetype, the upload request sends video/mov instead of the standard video/quicktime that PeerTube is currently set up to accept, therefore the user is faced with an error telling them their format isn't supported even though .mov will be listed as a supported extension.
Steps to reproduce
- Install an application that changes the
.movmimetype to video/mov (not sure which one it is yet, but my hunch is Premiere) - Try to upload a file with
.movextension to PeerTube - Get rejected for invalid file type even though the error clearly lists
.movas a valid format
Describe the expected behavior
PeerTube either returns a different, more descriptive error, or caves and accepts video/mov mimetype for .mov files as well as video/quicktime even though it isn't standard, as this seems to be a somewhat common issue.
Another project that ran into this: https://github.com/immich-app/immich/issues/1913
It might also be nice to log the rejected mimetype with the returned error to simplify troubleshooting similar issues.
Additional information
-
PeerTube instance:
- URL: https://pt.thishorsie.rocks
- Version: v6.3.2
- NodeJS version: v18.19.0
- Ffmpeg version: 5.1.6-0+deb12u1
-
Browser name, version and platforms on which you could reproduce the bug: Windows 10, both Chrome 129.0.6668.90 and Firefox 131.0.2, probably every browser that relies on OS mimetypes
I am on windows also and have had the same issue with .mov's . I have forgotten to report this issue.
Thanks! Should be fixed by https://github.com/Chocobozzz/PeerTube/commit/150d9f197df285e0b9ff77ba9a129309986d0973