1

I try to switch to using webm video on my Wordpress site. For demo purposes I used the big buck bunny trailer demo.

I am using openlitespeed with cyberpanel as my webserver and I added this to the .htaccess:

AddType video/webm .webm

I also restarted the whole server after this change. However when I upload media files to wordpress it only jumps to another webpage after which it downloads the webm file itself. The file itself is good, as when I drag it into my browsers (Brave, Safari, Firefox Developer Edition) it plays flawlessly. I am running the latest Wordpress 5.6 and all my h.264 Mp4 files are playing back fine. If there's any additional information you need, tell me and I will add it.

Wordpress doesn't seem to recognize the WebM files as videos even. Regular h.264 mp4 files have a camera icon in the media library and when you click on them they play. Webm files do not do this.

mains without video icon, slidermz with video icon

I tried the demo above and one of my own video's encoded in VP9 wrapped in Webm, no different outcome there.

Michael de Borst
  • 302
  • 2
  • 5
  • 16

1 Answers1

1

OpenLiteSpeed only support rewrite rule in .htaccess, AddType wont work. Please add

webm = video/webm

to /usr/local/lsws/conf/mime.properties .

  • I added it to the config but it does not help. I confirmed both in the OLS web admin mime settings and in the actual config file that the change is reflected. I restarted both OLS (gracefully) and the entire server manually but it does not change anything. I re-uploaded the video's but WP media library still shows the same thing as above. Is there anything else I need to do? – Michael de Borst Dec 22 '20 at 11:54
  • WP media library need to recognize file with webm suffix and show the correct icon in media library. It need to be fixed in WordPress. Adding correct MIME type to mime.properties should tell web server to serve the file with correct "Content-Type". You may need to clear browser cache, or using incognito mode to test the webm URL directly. – George Wang Jan 06 '21 at 14:32