Simple Machines Community Forum

SMF Development => Bug Reports => Fixed or Bogus Bugs => Topic started by: AndalayBay on January 01, 2022, 07:27:43 PM

Title: SMF 2.1 RC4 WMV files have Wrong Mime Type
Post by: AndalayBay on January 01, 2022, 07:27:43 PM
I uploaded a bunch of files to check their mime types and .wmv was set to 'video/x-ms-asf'. It should be 'video/x-ms-wmv'.

I searched on GitHub and didn't find an open issue, so I'm reporting it here.
Title: Re: SMF 2.1 RC4 WMV files have Wrong Mime Type
Post by: Sesquipedalian on January 02, 2022, 02:31:59 AM
MIME types are determined by the underlying libraries that PHP uses, not by SMF. So this isn't something we could change.

But moreover, video/x-ms-asf isn't actually wrong. See https://stackoverflow.com/questions/53672122/why-wmv-files-have-mime-type-video-x-ms-asf-instead-of-video-x-ms-wmv.
Title: Re: SMF 2.1 RC4 WMV files have Wrong Mime Type
Post by: AndalayBay on January 02, 2022, 03:03:37 PM
Well SMF displays an error. "No video with supported format and MIME type found." I can play the video with Windows media player on my machine.

I had inserted the attachment in my post. I can click on the actual attachment and it will download it and play it in media player. So I guess the embed doesn't work. *shrug*
Title: Re: SMF 2.1 RC4 WMV files have Wrong Mime Type
Post by: Arantor on January 02, 2022, 03:57:37 PM
Fairly sure Firefox (and possibly Chrome?) can't integrate with the media player codecs for playing such videos like that... there's a reason most video services convert it to MP4 and other related formats, so the browsers will actually play it.

Certainly a quick search online gives me any number of suggestions for installing codecs to make it be supported, and/or services to convert it to a format they can actually play because WMV is not one of the standard online video formats. (Historically advice was to provide MP4/H.264, Ogg Theora+Vorbis, and WebM but I think MP4/H.264 won the encoding wars.)
Title: Re: SMF 2.1 RC4 WMV files have Wrong Mime Type
Post by: AndalayBay on January 02, 2022, 04:20:02 PM
It's pretty rare we would have somebody uploading a wmv, but if we do, I'll tell them not to embed it in a post.

Thanks for the explanation Arantor.