Opened 7 weeks ago
Last modified 7 weeks ago
#64693 new defect (bug)
Video Block: Unexpected Behavior with Supported and Unsupported Formats
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | trunk |
| Component: | Media | Keywords: | |
| Focuses: | docs | Cc: |
Description
I tested video format support in WordPress 7.0 by generating multiple test videos in different formats.
According to the official documentation for the Video Block:
https://developer.wordpress.org/themes/classic-themes/functionality/media/video/
The supported formats are listed as:
mp4
m4v
webm
ogv
flv
However, during testing I observed the following:
Formats that work (not listed in documentation)
.mov — uploads and plays correctly in both admin and frontend.
Formats that partially work
.avi — uploads, but does not play correctly.
.wmv — uploads, but does not play correctly.
Formats that do not work as expected
.ogv — uploads, but does not display correctly in admin or frontend (although it is listed as supported).
.flv — cannot be uploaded, although it is listed as supported in the documentation.
Questions:
Is it possible to restrict uploads in WordPress so that only fully supported video formats are allowed?
Is there an official way to validate which video formats are fully supported and guaranteed to work correctly with the Video Block?
Is the documentation outdated, or has format support changed in recent versions?
Thank you in advance for clarification.
Change History (3)
#2
follow-up:
↓ 3
@
7 weeks ago
I'd additionally note that the documentation you're linking to is *not* for the Video Block; it's for the video shortcode, a classic editor feature that renders videos using the MediaElement.js library.
This is the documentation for the video block: https://wordpress.org/documentation/article/video-block/
I still agree that there's a need to update some documentation around both of these, but we should be sure that we're testing and comparing against the right documentation.
#3
in reply to:
↑ 2
@
7 weeks ago
Replying to joedolson:
I'd additionally note that the documentation you're linking to is *not* for the Video Block; it's for the video shortcode, a classic editor feature that renders videos using the MediaElement.js library.
This is the documentation for the video block: https://wordpress.org/documentation/article/video-block/
I still agree that there's a need to update some documentation around both of these, but we should be sure that we're testing and comparing against the right documentation.
I’ve checked the documentation, but it doesn’t mention supported video formats. I thought they would all work the same way.
On my site, a client uploaded a video in .avi format and it doesn’t work. I was very surprised that WP core allows uploading any format without filtering them. This wasn't even in the Media Library (which would make sense), but in the Video Block.
There are several filters that allow you to modify which mime types are allowed to be uploaded, for example the
upload_mimesfilter.It's not about what the video block supports. That just renders a
<video>element on the web page. It's about what formats/codecs your browser supports. Browser support can vary quite a bit for various reasons such as licensing.For example,
movis typically only supported in Safari. Other browsers can play it too, depending on what codec the video actually uses under the hood. That's whymovis generally not recommended for web-safe usage.A recent change here is that for example Chrome dropped support for the Theora codec (i.e,
.ogv), see https://chromestatus.com/feature/5158654475239424.But yes, I'd say the documentation there needs some updating/clarification.