PeerTube icon indicating copy to clipboard operation
PeerTube copied to clipboard

Confusing error when using video/mov mimetype for uploading .mov files

Open karcsesz opened this issue 1 year ago • 1 comments

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.

image

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

  1. Install an application that changes the .mov mimetype to video/mov (not sure which one it is yet, but my hunch is Premiere)
  2. Try to upload a file with .mov extension to PeerTube
  3. Get rejected for invalid file type even though the error clearly lists .mov as 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

karcsesz avatar Oct 11 '24 21:10 karcsesz

I am on windows also and have had the same issue with .mov's . I have forgotten to report this issue.

stevespaw avatar Oct 14 '24 13:10 stevespaw

Thanks! Should be fixed by https://github.com/Chocobozzz/PeerTube/commit/150d9f197df285e0b9ff77ba9a129309986d0973

Chocobozzz avatar Oct 22 '24 09:10 Chocobozzz