Bug 813826

Summary: glitches when playing youtube movies
Product: Red Hat Enterprise Linux 6 Reporter: Yonit Halperin <yhalperi>
Component: spice-serverAssignee: Yonit Halperin <yhalperi>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2CC: acathrow, cfergeau, dblechte, djasa, dyasny, mkenneth, mkrcmari, tdosek
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spice-server-0.10.1-9.el6 Doc Type: Bug Fix
Doc Text:
Cause When playing youtube html5 movies in google chrome, or moving the cursor over youtube flash movies, the display driver sometimes send to the spice server bitmaps that contain video frames, but are bigger than the previous frames sent. Consequence The bigger frames are not synchronized with the video stream, and their display time is independent of the display time of other frames. This appear to the user as glitches in the movie. Fix Attach such big bitmaps to the video stream they contain. Result Video playbacks that once suffered from glitches due to the above cause, should now be smooth, when the spice client runs with >= spice-gtk-0.11-9.el6
Story Points: ---
Clone Of:
: 815422 (view as bug list) Environment:
Last Closed: 2012-06-20 12:17:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 815422, 815426    
Bug Blocks: 820669    

Description Yonit Halperin 2012-04-18 14:04:41 UTC
Description of problem:

When playing flash movies in youtube (mainly in Windows7 guest, in all the browsers I tested: chrome, firefox and explorer), the streaming is not smooth
and goes forward and back, especially if the youtube time bar is viewable (full screen and not full screen).
It gets more noticeable as the connection to the server is more limited.

The cause:
Spice classifies images as video frames, by tracing high rate updates of a rectangle in the primary surface. In the above scenario, the server receives from the driver images which contain a rectangle that was classified as video stream, but are also bigger than this rectangle and were not attached to the stream, but were rather send to the client as a regular qxl command, which actually covers the video stream.
Since the video streams are delayed on the client side (due to de-jitter buffer & lip sync), and are not synchronized with the other qxl commands, the drawing of the "video containing" image, appear as a glitch. The slower the connection is, the video delay is bigger, and the glitch is more noticeable.

I've already proposed a solution upstream. It involves spice-protocol and spice-gtk as well.

**also noticed glitches problems in rhel6 guest, but there is an additional problem that cause them. I will open a bug for it as well.

Comment 2 Yonit Halperin 2012-04-24 08:26:17 UTC
More details about reproducing the bug:
google chrome: just play html5 movies on youtube. non full-screen and full-screen
firefox/chrome/ie: playing flash movies and moving the cursor (non full-screen and full-screen).

Comment 5 Yonit Halperin 2012-05-07 12:17:32 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause
When playing youtube html5 movies in google chrome, or moving the cursor over youtube flash movies, the display driver sometimes send to the spice server bitmaps that contain video frames, but are bigger than the previous frames sent.

Consequence
The bigger frames are not synchronized with the video stream, and their display time is independent of the display time of other frames. This appear to the user as glitches in the movie.

Fix
Attach such big bitmaps to the video stream they contain.

Result
Video playbacks that once suffered from glitches due to the above cause, should be smooth.

Comment 6 Yonit Halperin 2012-05-08 06:57:01 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -8,4 +8,4 @@
 Attach such big bitmaps to the video stream they contain.
 
 Result
-Video playbacks that once suffered from glitches due to the above cause, should be smooth.+Video playbacks that once suffered from glitches due to the above cause, should now be smooth, when the spice client runs with >= spice-gtk-0.11-9.el6

Comment 7 Yonit Halperin 2012-05-14 11:33:01 UTC
Back to assigned due to bug 820669 . It appears that libjpeg doesn't handle well changing the encoder's width and height, while libjpeg-turbo does (I tested it with libjpeg-turbo). Rhel6.3 doesn't ship libjpeg-turbo (bug 788687).

Comment 9 David Jaša 2012-05-18 15:44:44 UTC
The bug is not entirely gone. Reproducer is to play some full screen video in full HD guest connected to a client with full HD display, then you can see sometimes a glitch near the bottom of the screen.

I've hit a segfault too with spice-server-0.10.1-9.el6, see attachment 585438 [details] for backtrace.

Comment 10 Yonit Halperin 2012-05-20 05:19:03 UTC
(In reply to comment #9)
> The bug is not entirely gone. Reproducer is to play some full screen video
> in full HD guest connected to a client with full HD display, then you can
> see sometimes a glitch near the bottom of the screen.
> 
> I've hit a segfault too with spice-server-0.10.1-9.el6, see attachment
> 585438 [details] for backtrace.
Hi,

I don't think that the glitch you see is referring to this bug. This bug is about 
the whole video going back and forth, mainly in google-chrome, in html5 movies.
Which guest and browser have you tried?


The segfault is https://bugzilla.redhat.com/show_bug.cgi?id=822686.

Comment 11 David Jaša 2012-05-21 08:35:11 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > The bug is not entirely gone. Reproducer is to play some full screen video
> > in full HD guest connected to a client with full HD display, then you can
> > see sometimes a glitch near the bottom of the screen.
> > 
> > I've hit a segfault too with spice-server-0.10.1-9.el6, see attachment
> > 585438 [details] for backtrace.
> Hi,
> 
> I don't think that the glitch you see is referring to this bug. This bug is
> about 
> the whole video going back and forth, mainly in google-chrome, in html5
> movies.
> Which guest and browser have you tried?
> 

I used Firefox in RHEL 6 with flash and in Fedora 17 with html5 (in KDE failsafe to get non-compositing WM environment). I've seen it in both, actually only it was not present FF/html5/gnome-shell. Weird thing is that I can not reproduce it today in exactly same environment.

html5 videos in Chrome/el6 are rendered fine, without any glitches.

> 
> The segfault is https://bugzilla.redhat.com/show_bug.cgi?id=822686.

Comment 12 Marian Krcmarik 2012-05-21 13:01:23 UTC
*** Bug 820669 has been marked as a duplicate of this bug. ***

Comment 15 errata-xmlrpc 2012-06-20 12:17:19 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0765.html