Closed Bug 1924066 Opened 1 year ago Closed 1 year ago

Support HEVC on MacOS

Categories

(Core :: Audio/Video: Playback, enhancement, P1)

Unspecified
macOS
enhancement

Tracking

()

RESOLVED FIXED
136 Branch
Tracking Status
relnote-firefox --- 136+
firefox136 --- fixed

People

(Reporter: 428rinsuki+bugzilla.mozilla.org, Assigned: alwu)

References

(Blocks 2 open bugs)

Details

User Story

https://mozilla-hub.atlassian.net/browse/FFXP-2567
platform-scheduled:2025-04-01

Attachments

(5 files)

Currently, Firefox for macOS doesn't support HEVC codecs at all. any HEVC video file will not able to play, example https://tests.caniuse.com/?feat=hevc .

but, macOS 10.13 or later have a support for en/decoding HEVC via VideoToolbox (and Apple itself heavily using HEVC, e.g. https://developer.apple.com/videos/ requires HEVC support for 4K ), It would be good to see HEVC support in Firefox for macOS.

since Firefox already have a HEVC support for Windows (maybe behind the flag?), It makes sense to also have a HEVC support for macOS.

OS: Unspecified → macOS

Thanks for the report. We deliberately don't support HEVC at the moment, and prefer VP9 or AV1 (that also work in hardware on recent macOS).

Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Duplicate of bug: hevc-missing
Resolution: --- → DUPLICATE

(In reply to Paul Adenot (:padenot) from comment #1)

Thanks for the report. We deliberately don't support HEVC at the moment, and prefer VP9 or AV1 (that also work in hardware on recent macOS).

*** This bug has been marked as a duplicate of bug 1889731 ***

Thanks for reply!

We deliberately don't support HEVC at the moment

Can I see reason of this in somewhere? I guess this is related to patents, but Windows WMF implementation is already in codebase (maybe implemented before than that decide?)

also then why Bug 1842838 is still open?

prefer VP9 or AV1 (that also work in hardware on recent macOS).

VP9 hardware-accelerated decoding is supported on many Macs (which can run latest macOS), but hardware-accelerated VP9 (or AV1) encoding is (sadly) still not supported on latest Apple Silicon Mac (this is one of reason to use HEVC on macOS)

Flags: needinfo?(padenot)

Can I see reason of this in somewhere? I guess this is related to patents, but Windows WMF implementation is already in codebase (maybe implemented before than that decide?)

It is there, but not shipped, mostly for testing.

Flags: needinfo?(padenot)

Bug 1889731 is used for the webcompat team to track their HEVC issues, so I would like to keep this separate and block our meta bug. We do have a plan to support HEVC on MacOS, but we just haven't started it yet. I'm still thinking if we should implement it via Videotoolbox, or utilize ffmpeg, which have videotoolbox hardware decoding path.

Blocks: hevc
Status: RESOLVED → REOPENED
No longer duplicate of bug: hevc-missing
Ever confirmed: true
Resolution: DUPLICATE → ---

We haven't decided if this should be supported via Videotoolbox or via FFmpeg, but I prefer the latter.

Summary: Support HEVC via VideoToolbox.framework → Support HEVC on MacOS
Severity: -- → S2

We're currently doing precursor development work to support this across all platforms.

User Story: (updated)
User Story: (updated)

(In reply to Alastor Wu [:alwu] from comment #5)

We haven't decided if this should be supported via Videotoolbox or via FFmpeg, but I prefer the latter.

We use Videotoolbox directly for all other codecs on macOS. Is there a reason we wouldn't want to do the same for HEVC?

Flags: needinfo?(alwu)

The idea here is to attempt to consolidate decoding (and encoding) on ffmpeg, including hardware. HEVC on macOS is low-risk.

As what Paul mentioned, our final goal is to deprecate platform decoder and only use ffmpeg. But now we will still need to add HEVC videotoolbox support first.

Assignee: nobody → alwu
Severity: S2 → S3
Flags: needinfo?(alwu)
Priority: -- → P2
Attachment #9459484 - Attachment description: WIP: Bug 1924066 - implement HEVC support on MacOS by using the platform decoder. → WIP: Bug 1924066 - part1 : implement HEVC support on MacOS by using the platform decoder.
Depends on: 1941890
Attachment #9459484 - Attachment description: WIP: Bug 1924066 - part1 : implement HEVC support on MacOS by using the platform decoder. → Bug 1924066 - part1 : implement HEVC support on MacOS by using the platform decoder.
Priority: P2 → P1
Blocks: 1942396
Blocks: 1942400
Blocks: 1942404

Depends on D234760

As we're just caring what decoder is being used, we can set video as loop
which prevents video decoder from being destroyed when the decoding is
completed.

In addition, only waiting for the play promise is enough, because it will
be resolved when the first frame is decoded, which means the decoder has
been determined.

Depends on D234761

Pushed by alwu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8ed7ee4bc410 part1 : implement HEVC support on MacOS by using the platform decoder. r=media-playback-reviewers,padenot https://hg.mozilla.org/integration/autoland/rev/5d23a815972a part2 : print error code for VTSessionCopyProperty. r=media-playback-reviewers,padenot https://hg.mozilla.org/integration/autoland/rev/70500f932b55 part3 : add hevc track info for MP4Decoder on MacOS. r=media-playback-reviewers,padenot https://hg.mozilla.org/integration/autoland/rev/b9603d838029 part4 : enable HEVC tests on MacOS. r=media-playback-reviewers,padenot https://hg.mozilla.org/integration/autoland/rev/2ab38f908263 part5 : make the test more robust. r=media-playback-reviewers,padenot

Release Note Request (optional, but appreciated)
[Why is this notable]: Adding HEVC support on MacOS
[Affects Firefox for Android]: No
[Suggested wording]: HEVC playback is now supported on MacOS
[Links (documentation, blog post, etc)]: No

relnote-firefox: --- → ?

Added to the Fx136 nightly release notes, please allow 30 minutes for the site to update.
Keeping the relnote-firefox flag as ? to keep it on the radar for inclusion in the final Fx136 release notes.

Blocks: 1944991
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: