Closed Bug 1552354 Opened 5 months ago Closed 5 months ago

Video without audio ended too early before it really reaches to the end

Categories

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

defect

Tracking

()

VERIFIED FIXED
mozilla69
Tracking Status
firefox68 --- verified
firefox69 --- verified

People

(Reporter: Dolske, Assigned: alwu)

References

Details

Attachments

(1 file)

Not sure if this is actually a video issue or a site compat issue, but starting here...

https://twitter.com/elakdawalla/status/1129141958306197504

In Nightly, the "GIF" (really a <video>) in this tweet is a 2-frame (presumably) before/after animation. In Nightly I get the "After" showing for ~1 second, and then a very very brief (milliseconds) flash of the "Before" image, and then it loops.

In Chrome I see the Before and After frames alternating at ~1Hz, which is what I'd expect.

(In the blog post linked from the tweet, the actual GIF plays correctly in both Firefox and Chrome.)

Alastor, this might be looping related, if you want to have a look?

Flags: needinfo?(alwu)
Priority: -- → P2

I found that there are two different issues here. Both of them are not related with looping, you can reproduce the issue via visiting video url [1] directly.

On OSX, the problem is that we ended the video promise too early, so that we couldn't show the last frame with enough duration. The issue reported in this bug is this one.

On Linux, we got another issue, which is the video playback can't start properly. The playback would stop immediately after we start the video. The reason is that the video frames decoder returned have incorrect duration 0.

[1] https://video.twimg.com/tweet_video/D6uEne2VsAAXGpp.mp4

Assignee: nobody → alwu
Flags: needinfo?(alwu)

We should resolve video playing promise until we finish playing a last frame. Otherwise, it would cause playback to be ended earlier than its orignal duration.

Attachment #9066527 - Attachment description: Bug 1552354 - resolve video promise until we finish playing a last frame. → Bug 1552354 - resolve video promise when we finish playing the last frame.

Add NI as a reminder to uplift the change to 68.

Flags: needinfo?(alwu)
Pushed by alwu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cb68d12e0c5d
resolve video promise when we finish playing the last frame. r=jya
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
Flags: needinfo?(alwu)
Summary: Playback difference in Chrome vs Firefox → Video without audio ended too early before it really reaches to the end

Comment on attachment 9066527 [details]
Bug 1552354 - resolve video promise when we finish playing the last frame.

Beta/Release Uplift Approval Request

  • User impact if declined: Video would end up too early before it really reaches to the end
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce:
  1. goto https://video.twimg.com/tweet_video/D6uEne2VsAAXGpp.mp4
  2. to see whether video is playing exact 2 seconds (1 second per frame)

Note. This video can't playback well on Linux, that is another issue. (Bug 1553899)

  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This patch doesn't change playback pipeline behaviors, it delays to end video only when we pop out last video frame from our video queue and video hasn't really reach to the end. And the delay time is really tiny, which is usually below 1s.
  • String changes made/needed: None
Attachment #9066527 - Flags: approval-mozilla-beta?
Flags: qe-verify+
QA Whiteboard: [qa-triaged]

Hi, I reproduced this issue in older versions of Firefox but This issue no longer occurs in 69.0a1 (2019-05-24). I will mark this issue accordingly.

Comment on attachment 9066527 [details]
Bug 1552354 - resolve video promise when we finish playing the last frame.

approved for 68.0b5

Attachment #9066527 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Duplicate of this bug: 1555534

This issue is verified as Fixed in Beta 69.0b3, on Mac and Windows, I will mark it accordingly.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triaged]
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.