Closed Bug 1905878 Opened 1 year ago Closed 2 months ago

VP9 playback stalls

Categories

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

Firefox 127
defect

Tracking

()

RESOLVED FIXED
146 Branch
Tracking Status
firefox146 --- fixed

People

(Reporter: jakea, Assigned: jhlin)

References

Details

Attachments

(6 files, 2 obsolete files)

Attached video screen.webm

Steps to reproduce:

https://static-misc-3.glitch.me/alpha-video-test/vp9-video.html

Actual results:

The video plays and loops as expected on Android Chrome, but on Android Firefox the video freezes (tested on a Pixel 8 pro).

(note: the video displays incorrectly in Chrome due to a different issue https://issues.chromium.org/issues/349610465)

Expected results:

The video should not freeze.

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)

https://share.firefox.dev/3AHrHJ5 is a profile of this by alwu, we can repro on all devices because this falls back to software decoding, and the decoding is annoyingly too close to the frame budget. Surely we can make the queue a bit deeper a smooth out the slowness.

Flags: needinfo?(jmathies)
Severity: -- → S3

This now works (e.g. on my Pixel 4 that is starting to show its age), likely thanks to Karl's recent work on video frame scheduling. Alastor, can you quickly check on the same device you used in comment 2? It was a Pixel 6.

Flags: needinfo?(alwu)

It's still same for me, many video frames were dropped during playback. Another profile on Nightly 135.

In addition, shouldn't we use hw vp9 decoder on Android? it was still sw decoding in my both profiles, and I wonder if it's related with bug 1931941. John, could you provide some thought here? Thanks!

Flags: needinfo?(alwu) → needinfo?(jolin)

Hrm I updated my personal device to a Samsung S23, and now the video doesn't play for me...

We are having some trouble reproducing this.

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

It's still same for me, many video frames were dropped during playback. Another profile on Nightly 135.

In addition, shouldn't we use hw vp9 decoder on Android? it was still sw decoding in my both profiles, and I wonder if it's related with bug 1931941. John, could you provide some thought here? Thanks!

I think it falls back to sw decoding because AndroidDecoderModule explicitly rejects video with alpha.

The WebM has no audio track so I don't think our policy of dropping video frames to maintain a/v sync really matter much here. Maybe we can add an option to VideoSink to ignore the mock audio/system clock so it won't drop frames in scenario like this?

Flags: needinfo?(jolin)
Assignee: nobody → jolin
Priority: -- → P3
Priority: P3 → P2
Status: UNCONFIRMED → NEW
Ever confirmed: true

The default size was picked a long time ago and the Android system
has relaxed the limitation. This also mitigates frame-dropping issue
caused by SW/slow decoder with deeper queue.

See Also: → 863441
Pushed by jolin@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/1519a0346a0a https://hg.mozilla.org/integration/autoland/rev/0735b01aaa22 don't use SW VPX MediaCodec decoders. r=media-playback-reviewers,alwu https://github.com/mozilla-firefox/firefox/commit/6ccc0315b9f7 https://hg.mozilla.org/integration/autoland/rev/30d1c2d35eb7 increase default video queue max length on Android. r=geckoview-reviewers,nalexander,sotaro
Pushed by chorotan@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/a6fda1786121 https://hg.mozilla.org/integration/autoland/rev/cde4e2c0d669 Revert "Bug 1905878 - increase default video queue max length on Android. r=geckoview-reviewers,nalexander,sotaro" for causing mda failures at test_seamless_looping_cancel_looping_future_frames.html

Backed out for causing mda failures at test_seamless_looping_cancel_looping_future_frames.htm

Backout link

Push with failures

Failure log
Failure log wpt

Flags: needinfo?(jolin)

MediaDecoderStateMachine uses global/static values for video queue sizes
(https://searchfox.org/firefox-main/rev/4e8871487a9f97992e00d5c8105ef1d8cf3c88f3/dom/media/MediaDecoderStateMachine.cpp#152-165),
which are actually constraints of platform decoders. In some cases the same content
process could have more than one MDSMs that uses different platform decoders (e.g.
on Android one video can be decoded by MediaCodec but another by libvpx) and causes
suboptimal results. Moving the definition to PlatformDecoderModule for each
MDSM to get its own value ensures playback smoothness.

Attachment #9515083 - Attachment is obsolete: true
Attachment #9515084 - Attachment description: Bug 1905878 - p1: let PlatformDecoderModule define video decoding related properties. → Bug 1905878 - p1: let MediaDataDecoder define video decoding related properties.
Attachment #9489484 - Attachment is obsolete: true
Pushed by csabou@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/6576267517eb https://hg.mozilla.org/integration/autoland/rev/7fd855c62761 Revert "Bug 1905878 - p3: Use decode property when available. r=media-playback-reviewers,alwu" for causing gtest failures on MFTDecoder

Backed out for causing gtest failures on MFTDecoder.

Push with failures

Failure log

Backout link

Current media playbck pipeline setup satisfies the condition
but it's not so when running gtest.

Attachment #9522958 - Attachment description: WIP: Bug 1905878 - initialize WMF video manager on MTA thread. → Bug 1905878 - initialize WMF video manager on MTA thread.
Regressions: 1998875
Flags: needinfo?(jolin)
See Also: → 2004746
See Also: 2004746
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: