Skip to main content
Home Forums Silverlight Design Video and Media Silverlight 3 hardware acceleration leads to performance slowdown in video playback
4 replies. Latest Post by Jan.Sichula on October 7, 2009.
(0)
Jan.Sichula
Member
0 points
3 Posts
07-22-2009 7:36 AM |
12.00 Normal 0 21 false false false SK X-NONE HE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Normálna tabuľka"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; text-align:justify; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Century Gothic","sans-serif"; mso-ascii-font-family:"Century Gothic"; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:"Century Gothic"; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:Gisha; mso-bidi-theme-font:minor-bidi;}
Hello everyone,
this week I have been heavily experimenting with Silverlight 3 video player that was recommend on Silverlight SDK blog for having a SL 3 functionality. My goal was to produce GPU accelerated player for our high quality (848x480, 16:9, 1500 kbit/s, VBR, VC-1) video publishing needs
The player is mentioned here:
http://blogs.msdn.com/silverlight_sdk/archive/2009/05/04/silverlight-video-player-source-code.aspx
I was able to compile player with VS 2008 and SL 3 Tools for VS 2008. However, after many hours of toil, here are some surprising results.
The two biggest issues that I encountered are as follows.
1. The accelerated version is slower than non-acceleration. Why and what to do now? I have followed all the advices. Green tint present on controls but not on video area seems to indicate that GPU acceleration is on. Also I have the black box with numbers when I use EnableFrameRateCounter=true.
2. The tint supposed to indicate non-accelerated areas is green in this case and not red as documented everywhere else. Why is that?
I have tested on several machines both low end and high end with both AMD and Nvidia graphics. Results are same everywhere and the slower the machine the more of a slowdown with hardware acceleration.
Please check out for yourself at following two URLs that I prepared for public testing.
http://blog.temelios.sk/SL3_GPUAcc_VideoPlayer/Default_GPU.htm
http://blog.temelios.sk/SL3_GPUAcc_VideoPlayer/Default_nonGPU.htm
URLs are self explaining. The WMV source is at:
http://silverlight.services.live.com/67484/vikendovka_848x480_1500kbit_VBRU.wmv/video.wmv
Has anyone else encountered same behavior? Can anyone advice me on possible source of the inverted behavior and how to remedy this situation.
Please, please help if you can.
Fellow Silverlight programmer,
Jan Sichula
(Slovak Republic)
Mog Lian...
All-Star
15962 points
1,552 Posts
07-28-2009 2:42 AM |
Hi,
So, we could benifit from gpu acceleration on resizing video window, playing on full-screen mode.
To understand GPU acceleration, here is a good article
http://blogs.msdn.com/silverlight_sdk/archive/2009/07/09/silverlight-cached-composition.aspx
Thanks,
07-28-2009 4:13 AM |
Hello Mog Liang,
thank you for your response. I understand what you are pointing to as I have done quite a study in this regard including listening to session by Seema Ramchandani from Mix 09.
The fact is GPU acceleration applies to my player as I am shrinking video in standard size and stretching in full screen mode. Yet the accelerated version is performing worse (higher CPU use, less frame rate) than the one with acceleration turned off. That is the mystery I am trying to solve. I was even able to email Seema Ramchandani about this situation. So far, she was unable to give me any light. Hopefully it will be resolved soon if it is a bug or someone will show me what am I doing wrong. I am more than happy to place source code of player on the web for anyone to peek into.
http://sichula.temelios.sk/ (English website for friends – family photos, videos and newsletter archive)
raptorX
10 points
12 Posts
08-21-2009 4:50 AM |
I have experienced the same behaviour - the GPU accelerated version uses about 50-100% extra CPU. I tried your two links as well, and the hardware accelerated one used 50% more CPU than the non-accelerated one. I also don't understand this. I've also experienced this on other elements other than MediaElement, where I'm animating the opacity or scrolling images etc..
I guess this is also one of the reasons why it is not turned on by default. It's a shame as I was looking forward to a perf increase, I guess I'll have to wait for SL4 to see if there is a gain by using hardware acceleration.
Chris
10-07-2009 5:00 AM |
Dear friends,
on September 2nd I have received email from Seema Ramchandani that no SL3 fix is in the works. From her email it seems like there is a hope for better times with SL4.