Skip to content

Gstreamer backend reports that video/mp4 mime type is not supported #450

@tharkum

Description

@tharkum

After implementation of supported selection of media element source from source children (PR servo/servo#39717) there was found that GStreamer backend is reporting that video/mp4 mime type is not supported while it is not true.

OK (video)
<video src="any-video-content.mp4">

OK (video + source without type)
<video><source src="any-video-content.mp4"></video>

FAIL (video + source with type)
<video><source src="any-video-content.mp4" type="video/mp4"></video>

See https://html.spec.whatwg.org/multipage/media.html#loading-the-media-resource:attr-source-type

Need to figure out reason why it happens (see backends/gstreamer/registry_scanner.rs)

Some associated WPT tests (canvas + video with wide gamut) on which it is reproduced with test expectation changes (mp4 vs webm):

  • /html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-video.html
  • /html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-video.html

NOTE: Some videos are encoded with H264 (High Profile) or H265 (Main 10 Profile) and both is decoding by Gstreamer eventually...
H264: html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0100.mp4
H265: html/canvas/element/manual/wide-gamut-canvas/resources/Rec2020-222000000.mp4

On local PC gst-inspect-1.0 reports the following plugins (ubuntu22.04)

$ gst-inspect-1.0 | grep h264
libav:  avdec_h264: libav H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 decoder
libav:  avenc_h264_omx: libav OpenMAX IL H.264 video encoder encoder
openh264:  openh264dec: OpenH264 video decoder
openh264:  openh264enc: OpenH264 video encoder
rtp:  rtph264depay: RTP H264 depayloader
rtp:  rtph264pay: RTP H264 payloader
typefindfunctions: video/x-h264: h264, x264, 264
uvch264:  uvch264deviceprovider (GstDeviceProviderFactory)
uvch264:  uvch264mjpgdemux: UVC H264 MJPG Demuxer
uvch264:  uvch264src: UVC H264 Source
va:  vah264dec: VA-API H.264 Decoder
videoparsersbad:  h264parse: H.264 parser
$ gst-inspect-1.0 | grep h265
libav:  avdec_h265: libav HEVC (High Efficiency Video Coding) decoder
rtp:  rtph265depay: RTP H265 depayloader
rtp:  rtph265pay: RTP H265 payloader
typefindfunctions: video/x-h265: h265, x265, 265
va:  vah265dec: VA-API H.265 Decoder
videoparsersbad:  h265parse: H.265 parser

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions