Page MenuHomePhabricator

File extension ".mp4" does not match the detected MIME type of the file (video/webm).
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Upload a .mp4 video file format to the tool.
  • After manipulations (i.e crop/trim .etc), upload the video to commons

What happens?:
We are encountered with an error, with the `code: 'verification-error'. Here is the full error

error: {
videocuttool        | [1]     code: 'verification-error',
videocuttool        | [1]     info: 'File extension ".mp4" does not match the detected MIME type of the file (video/webm).',
videocuttool        | [1]     details: [ 'filetype-mime-mismatch', 'mp4', 'video/webm' ],
videocuttool        | [1]     '*': 'See https://commons.wikimedia.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/> for notice of API deprecations and breaking changes.'
videocuttool        | [1]   },
videocuttool        | [1]   servedby: 'mw2416'
videocuttool        | [1] }

What should have happened instead?:
The video should have been uploaded to commons (as it got converted to webm format, and got downloaded into the server section successfully).

Other information (browser name/version, screenshots, etc.):
Here is the screenshot for the same

Screenshot 2023-03-29 at 02.31.11.png (1×2 px, 1 MB)

Note the output on the top is for responseAll, which gives response for all the concurrent requests made on the videos.

Event Timeline

Gopavasanth subscribed.

Hi @Reputation22 Ideally we need to change the file name of the resultant output file to webm. As at this point of time its no more MP4 file.

image.png (877×1 px, 190 KB)

Also, When user is trying to upload new MP4 file to the tool (Drag drop / Select file). Tool is accepting videos which are in lower case. i.e .mp4 but its throwing an error "File Not Supported" if its in .MP4. We need to fix that as well.

Hey @Gopavasanth, i thought irrespective of the fact that the client shows .mp4 extension, the file on the server which we are uploading to the commons should be of .webm format
I mean this is the expected behaviour. I may be wrong. I'll have to check if the file name on uploading has a .mp4 extension to it. If thats the case (as reflected in the client), I'll change the file name to be the updated file name in .webm or .ogv format.

Also will fix the client side issues of .mp4 and .MP4. Thanks for the help :)

Change 921629 had a related patch set uploaded (by Reputation22; author: Reputation22):

[labs/tools/VideoCutTool@master] Fix upload to commons for mp4 videos

https://gerrit.wikimedia.org/r/921629

Change 921629 merged by jenkins-bot:

[labs/tools/VideoCutTool@master] Fix upload to commons for mp4 videos

https://gerrit.wikimedia.org/r/921629