Closed Bug 1230784 Opened 4 years ago Closed 4 years ago

Video distortion on 5+ min videos on YouTube

Categories

(Firefox for Android :: Audio/Video, defect)

45 Branch
defect
Not set

Tracking

()

VERIFIED FIXED
Firefox 46
Tracking Status
firefox42 --- affected
firefox43 --- affected
firefox44 --- verified
firefox45 --- verified
firefox46 --- verified
b2g-v2.5 --- fixed
fennec 43+ ---

People

(Reporter: tw-bugs-firefox, Assigned: snorp)

References

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Android 6.0; Mobile; rv:45.0) Gecko/45.0 Firefox/45.0
Build ID: 20151205030208

Steps to reproduce:

Open a video on mobile YouTube, preferably one that is 7 minutes or longer. Watch the video in full screen. It will eventually distort into a stretched version of only a few rows/columns of pixels of itself (unviewable). See here for an example of this phenomenon: https://youtu.be/e9jdCKKT5N0
Tested on latest nightly (2015-12-05) and latest main build (42.0.2).


Actual results:

Video distorted itself.


Expected results:

Video dimensions remain appropriate.
Attached file logcat of event
Example video was taken down. I made another one with Big Buck Bunny instead: https://youtu.be/0JY_dgedteI
5:55 or so showcases the glitch.
I have tried to get relevant info from adb logcat multiple times but no luck. The event in the video was around 14:35:35. Log attached...
I have seen this on the 5x. What device are you using?
Status: UNCONFIRMED → NEW
tracking-fennec: --- → ?
Ever confirmed: true
Flags: needinfo?(tw-bugs-firefox)
My bad... Nexus 6P.
Flags: needinfo?(tw-bugs-firefox)
This is fairly bad. Might be Android 6.0 or 5x/6p specific. Have anyone who can look into this?
Flags: needinfo?(snorp)
Summary: Video distortion after an indeterminate amount of viewing → Video distortion on 5+ min videos on YouTube
I can reproduce this on Nightly, 6P. Seemed to distort after about 6 minutes. Nothing interesting in logcat. It looks like it could be a compositing problem (busted triangle strip?), but I'm not sure how that could happen.
Flags: needinfo?(snorp)
Benoit, Nicolas, does this seem like compositor bustage to you? See comment #1
Flags: needinfo?(nical.bugzilla)
Flags: needinfo?(bgirard)
A couple other interesting notes:

1) Once the corruption occurs, seeking to the beginning of the file still results in corrupted output.
2) If I exit fullscreen, everything else on the page looks fine, but the video remains corrupted

I am sorta thinking this is MSE specific or even YouTube specific. Anthony, have you ever seen anything like this?
Flags: needinfo?(ajones)
I can reproduce this on vimeo too, which I don't believe is using MSE. That probably narrows it down to either decoder weirdness (unlikely) or compositor/gfx badness.
This seems to be yet another bug caused by us copying the video surface for presentation. Time to rip it out for real -- causing more problems than it solves at this point.
Assignee: nobody → snorp
Flags: needinfo?(nical.bugzilla)
Flags: needinfo?(bgirard)
Flags: needinfo?(ajones)
This has caused a lot of problems, we should just stop. It's possible now that video/audio could
be out of sync by a few frames, but in practice I don't really notice anything.
Attachment #8700048 - Flags: review?(jyavenard)
Attachment #8700048 - Flags: review?(esawin)
Attachment #8700048 - Flags: review?(esawin) → review+
Attachment #8700048 - Flags: review?(jyavenard) → review+
https://hg.mozilla.org/mozilla-central/rev/6e4e4e058354
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 46
tracking-fennec: ? → 43+
Comment on attachment 8700048 [details] [diff] [review]
Don't copy SurfaceTexture contents when presenting video on Android

Approval Request Comment
[Feature/regressing bug #]: Marshmallow?
[User impact if declined]: Distorted video after about 5 minutes on Android 6.0 devices
[Describe test coverage new/current, TreeHerder]: Nightly
[Risks and why]: Low, but there is a possibility for slight AV sync issues. I haven't seen anything in testing.
[String/UUID change made/needed]: None
Attachment #8700048 - Flags: approval-mozilla-release?
Attachment #8700048 - Flags: approval-mozilla-beta?
Attachment #8700048 - Flags: approval-mozilla-aurora?
tw-bugs-firefox@galac.tk, could you please verify this issue is fixed as expected on a latest Nightly build? Thanks!
Flags: needinfo?(tw-bugs-firefox)
Comment on attachment 8700048 [details] [diff] [review]
Don't copy SurfaceTexture contents when presenting video on Android

Taking this in Aurora45 for now, will wait a few days of additional verification before uplifting to Beta44.
Attachment #8700048 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
It is absolutely fixed! :-) Thank you! I tested it for at least an hour the other day. I didn't reply earlier ith findings because someone else marked it fixed. (I am kind of new to the bug tracker.)
Flags: needinfo?(tw-bugs-firefox)
(In reply to tw-bugs-firefox from comment #17)
> It is absolutely fixed! :-) Thank you! I tested it for at least an hour the
> other day. I didn't reply earlier ith findings because someone else marked
> it fixed. (I am kind of new to the bug tracker.)

Fantastic. Thank you for a prompt reply!
Status: RESOLVED → VERIFIED
Comment on attachment 8700048 [details] [diff] [review]
Don't copy SurfaceTexture contents when presenting video on Android

The fix was verified, Beta44+
Attachment #8700048 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
has problems to apply to beta:

grafting 321565:a8de44cf17d3 "Bug 1230784 - Don't copy SurfaceTexture contents when presenting video on Android r=esawin,jya a=ritu"
merging dom/media/platforms/android/AndroidDecoderModule.cpp
warning: conflicts while merging dom/media/platforms/android/AndroidDecoderModule.cpp! (edit, then use 'hg resolve --mark')
abort: unresolved conflicts, can't continue
(use hg resolve and hg graft --continue)
Flags: needinfo?(snorp)
Duplicate of this bug: 1234284
Duplicate of this bug: 1224313
I was able to reproduce the issue on Firefox for Android 44 Beta 7 using Nexus 6 (Android 6.0).
Verified as fixed on Firefox for Android 44 Beta 8.
Verified as fixed on:
Device: Nexus 6 (Android 6.0)
Build: Firefox for Android 46.0a1 (2016-01-17)
Comment on attachment 8700048 [details] [diff] [review]
Don't copy SurfaceTexture contents when presenting video on Android

Mozilla-release branch is now Fx44 and this patch already landed in Beta44. Clearing out the m-r:? flag.
Attachment #8700048 - Flags: approval-mozilla-release?
Verified as fixed on:
Device: Nexus 6 (Android 6.0)
Build: Firefox for Android 45.0a2 (2016-01-24)
You need to log in before you can comment on or make changes to this bug.