Open Bug 1880289 Opened 2 years ago Updated 2 years ago

Video playback issue caused by ORB

Categories

(Core :: Audio/Video: Playback, defect)

Firefox 122
defect

Tracking

()

UNCONFIRMED

People

(Reporter: ondrej.perutka, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:122.0) Gecko/20100101 Firefox/122.0

Steps to reproduce:

We have an issue with playback of fragmented MP4 video when used as a video element source. However, if I try to open the MP4 URL directly in a new tab, the video shows up without any problem.

There is a simple HTML file in the attachment to reproduce the issue.

Actual results:

The dev tools console says the following:

A resource is blocked by OpaqueResponseBlocking, please check browser console for details.

The browser console shows:

The resource at "https://..." was blocked by OpaqueResponseBlocking.
Reason: "after sniff: media request".

The page itself displays:

No video with supported format and MIME type found.

Expected results:

I'd expect that the video element should be able to play the video if the browser itself is able to play it in a standalone tab.

I haven't found any good documentation on (C)ORB, so I'm mostly guessing what happened here. I think that the browser blocks the content because, after sniffing the response body, it thinks that the content either does not match the Content-Type response header or that the video element wouldn't be able to process the content.

Funny thing is that if I enforce CORS by adding the crossorigin attribute to the video element, the playback works again without any issues. So my guess is that Firefox does not use (C)ORB policies if CORS is being used for the same request. Even though we could use this as a temporary workaround, I'd prefer if it worked out of the box. I've also tried using the X-Content-Type-Options: nosniff header to prevent Firefox from sniffing the content but it didn't do anything.

The video stream itself is generated using FFmpeg. Technically, it's an ISMV stream but it's essentially the same thing as fragmented MP4. It's still an ISO BMFF compliant stream. The reason why we're using ISMV instead of plain fragmented MP4 is actually also in Firefox. Apparently, Firefox requires fragmented MP4 files to have their duration set to -1 (as explained here in this very Bugzilla a couple of years back) even though presence of the mvex box within moov should be enough. The thing is that FFmpeg sets duration to -1 only for ISMV streams, so it's a bit Catch-22. We started using ISMV instead of plain fragmented MP4 because of Firefox and now Firefox does not like the content :)

The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core
Blocks: orb

The severity field is not set for this bug.
:jimm, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(jmathies)
Severity: -- → S3
Flags: needinfo?(jmathies)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: