Page MenuHomePhabricator

Audio WebM file marked as MEDIATYPE_VIDEO
Closed, ResolvedPublic


SELECT img_media_type, img_major_mime, img_minor_mime
FROM image
WHERE img_name="Teetar_Bird_Calls.webm"\G
*************************** 1. row ***************************
img_media_type: VIDEO
img_major_mime: video
img_minor_mime: webm

Which describes the audio file as being video with MIME type of video/webm
Total of 30 files, first reported in Nov 2013

Event Timeline

I'll run a query to check if there's other files like this, or if some webm files have been correctly labelled as audio.

MarkTraceur triaged this task as High priority.
MarkTraceur moved this task from Untriaged to Doing on the Multimedia board.

I'll take a look at this, it seems like we're mislabelling some files and should fix it ASAP to avoid further problems.

Change 364256 had a related patch set uploaded (by MarkTraceur; owner: MarkTraceur):
[mediawiki/core@master] Add (hacky) check for webm audio files

Change 364256 merged by jenkins-bot:
[mediawiki/core@master] Add (hacky) check for webm audio files

Do you have any idea how many of these webm audio files have gotten the incorrect mime type, and should we try to fix those?

There's no way to tell without running a maintenance script on every webm file to check the tracks...but on the bright side, I think there are relatively few webm files on our servers, so we could probably run it relatively quickly.

@MarkTraceur you'd need a very specific maintenance script. Dispenser was detecting this, by string matching on the the actual metadata field. If you purge all webm files, you'll requeue a lot of very high resolution media files for transcoding and that is not very desirable.

SELECT img_name
FROM image
WHERE img_media_type="VIDEO"
AND img_major_mime="video" AND img_minor_mime="webm"
/* Yes it was always properly detect in img_metadata */
AND img_metadata LIKE '%s:9:"mime_type";s:10:"audio/webm";%';

Since the patch was merged that detects these files, I think this bug could get closed...if a maintenance script for fixing files is desired, we can open a new task.