Support 10-bit HEVC and AV1 for WMF decoder
Categories
(Core :: Audio/Video: Playback, defect, P2)
Tracking
()
People
(Reporter: yannis, Assigned: alwu)
References
(Blocks 2 open bugs, Regression)
Details
(Keywords: regression)
Attachments
(7 files)
64.08 KB,
application/json
|
Details | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
STR:
- Open Firefox Nightly on Windows.
- Navigate to this page.
- A message appears: "Video can't be played because the file is corrupt."
Expected behavior:
- A play button appears and the video can be viewed by clicking on it.
mozregression brought me to bug 1857097 and indeed:
- having
media.wmf.hevc.enabled=1
(default on Nightly) reproduces the issue in all release channels; - having
media.wmf.hevc.enabled=0
(default on Release) fixes the issue in all release channels.
Here is a Media playback profile from 120 release (after setting media.wmf.hevc.enabled=1
). I am using Windows 11 23H2 22635.2771 (this is an insider preview build). Attachment is my about:support
.
Updated•1 year ago
|
Comment 1•1 year ago
|
||
:alwu, since you are the author of the regressor, bug 1857097, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
Comment 2•1 year ago
|
||
Alastor, this is the failure:
LogMessages — (PlatformDecoderModule) WMFDecoderModule::CreateVideoDecoder failed for manager with description wmf HEVC codec hardware video decoder - D3D11, unknown with result: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - MediaResult __cdecl mozilla::WMFVideoMFTManager::InitInternal(void): Fail to set the decoder media types.
Something https://searchfox.org/mozilla-central/source/dom/media/platforms/wmf/WMFVideoMFTManager.cpp#374-453 fails. Yannis has a laptop that can decode HEVC (standard recent Mozilla-issues DELL XPS iirc).
Reporter | ||
Comment 3•1 year ago
|
||
(In reply to Paul Adenot (:padenot) from comment #2)
Yannis has a laptop that can decode HEVC (standard recent Mozilla-issues DELL XPS iirc).
I reported this bug from my desktop machine but the issue also reproduces on the laptop.
Assignee | ||
Comment 4•1 year ago
•
|
||
I will check it later. As HEVC is still disabled by default on Release channel, I will need to finish other higher priority tasks first, before going back this bug. Keep NI.
Updated•11 months ago
|
Updated•10 months ago
|
Updated•9 months ago
|
Assignee | ||
Comment 7•2 months ago
|
||
After a preliminary investigation, this seems related with 10 bits HEVC, and our current implementation doesn't support that. When creating the HEVC decoder, we expect to it to return NV12, which is used for 8 bits. We might need more plumbing to make this work. As the media engine playback is able to play that video, we should be able to make it work for our pipeline, given that we use WMF framework as well.
Assignee | ||
Updated•2 months ago
|
Assignee | ||
Comment 8•2 months ago
|
||
By using the new marcos, it would show error via logging or error for
the failure function, instead of a general ENSURE_TRUE check.
Assignee | ||
Comment 9•2 months ago
|
||
Depends on D223444
Assignee | ||
Comment 10•2 months ago
|
||
Based on [1], IMFTransform::GetOutputAvailableType()
won't guarantee
to return a full list of support type. Some MFTs would even can not
provide an accurate list of output types until the MFT receives the
first input sample.
Therefore, we should set the last available type if we can't find the
compatible type, instead of throwing and error.
Depends on D223445
Assignee | ||
Comment 11•2 months ago
|
||
HEVC 8bit video (1 second long)
ffmpeg -ss 0 -t 1 -i gizmo.mp4 -c:v libx265 -pix_fmt yuv420p -crf 28 > -preset fast gizmo_hevc_8bit_420.mp4
HEVC 10bit video (1 second long)
ffmpeg -ss 0 -t 1 -i gizmo.mp4 -c:v libx265 -pix_fmt yuv420p10le -crf > 28 -x265-params profile=main10 gizmo_hevc_10bit_420.mp4
Depends on D223446
Assignee | ||
Comment 12•2 months ago
•
|
||
I will add tests for 10-bit AV1 as well.
Updated•2 months ago
|
Assignee | ||
Comment 13•2 months ago
|
||
AV1 8-bit (1 second long)
ffmpeg -ss 0 -t 1 -i gizmo.mp4 -c:v libaom-av1 -pix_fmt yuv420p -crf 30 -b:v 0 -strict experimental gizmo_av1_8bit_420.webm
AV1 10-bit (1 second long)
ffmpeg -ss 0 -t 1 -i gizmo.mp4 -c:v libaom-av1 -pix_fmt yuv420p10le -crf 30 -b:v 0 -strict experimental gizmo_av1_8bit_420.webm
Depends on D223447
Assignee | ||
Comment 14•2 months ago
|
||
When running hevc test on the try server, the MFT on the try server has
MFVideoFormat_NV12 and MFVideoFormat_IYUV on its list. If we choose last
available type, it would be MFVideoFormat_IYUV, causing 10-bit hevc
failed to play on the try server.
As we know what format is usually used for video and audio, we should
use the preferred type first if we can't find the compatible type. If
none of them are found, then the last available type should be used as
a final fallback option.
Comment 15•2 months ago
|
||
Comment 16•2 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/5aa8aa1746ea
https://hg.mozilla.org/mozilla-central/rev/ed7d59402624
https://hg.mozilla.org/mozilla-central/rev/1a2813cf2c44
https://hg.mozilla.org/mozilla-central/rev/cd492f952446
https://hg.mozilla.org/mozilla-central/rev/d1d339952b54
https://hg.mozilla.org/mozilla-central/rev/8c15f96caa8f
Assignee | ||
Comment 18•2 months ago
|
||
No, as HEVC is not enabled by default, and we already support AV1 10-bit in software decoding. This bug allows us to use hardware decoding for 10-bit AV1, which doesn't seem important enough to add it in the release note.
Updated•2 months ago
|
Updated•2 months ago
|
Comment 19•8 days ago
|
||
I was able to reproduce the issue on Win10x64 using Firefox build 132.0a1 (2024-09-01).
Verified as fixed on Win10x64 using Firefox build 134.0a1 and 133.0b9.
Description
•