Performance comparison of Flash fullscreen techniques
With more and more HD content on the web, the performance requirements to play video increase. Dynamic streaming is an important way to circumvent those issues by automatically adjusting the video quality based on performance and bandwidth.
But it's not just the performance impact of the video decoding (which is related to the video encoding settings) could slow down fullscreen playback - there are a couple of things you can do in the fullscreen mode to improve performance. This is specially important for HD playback, e.g. if you are planning to connect your computer to your 1080p television to play video, and you want perfectly smooth playback.
This is a comparison of 3 common techniques. All of them use the fullScreenSourceRect to switch to fullscreen mode (Flash Player 9 feature).
1. Fullscreen mode with software scaled video and smoothing In the this case the fullScreenSourceRect matches the screen resolution of the current screen, and the player scales the video with smoothing to fill the area. This is a common approach to keep the controls and UI crisp, but the slowest mode because the video scaling and the smoothing are done through the CPU. In most cases the performance is still acceptable, but it might not be ideal for high end use cases with a lot of scaling.
This mode was originally used for SD, but is less effective for HD. First the difference between the HD video size and the screen resolution might not be as significant anymore (therefore the controls won't scale/blur too much), and also for "lean back" use cases where the display is e.g. a television, it might not be desired to have crip 1:1 pixel controls - since they are simply too small.
2. Fullscreen mode with software scaled video without smoothing This approach uses the same technique as the first mode, but without the smoothing for the fullscreen video scaling. Although the quality will suffer (more pixelation during scaling), the performance will increase. Since it's possible to measure the video performance during playback, you could adjust smoothing based on the current playback performance. If e.g. the framerate drops under 20 fps, you could seamlessly turn off smoothing in fullscreen.
This improves the performance, but is still not as fast as the last mode.
3. Fullscreen mode with hardware scaled and smoothed video This is the fastest possible mode - the fullScreenSourceRect matches the video area (1:1 pixel mapping), and although the controls might appear slightly blurrier, the GPU will take care of the video scaling as well as smoothing. This is supported by Flash Player 9.
For SD content the mode has UI overlay scaling disadvantages, but for HD content the advantages to have smoother playback might outweigh the only slightly blurrier controls.
Conclusion All modes perform relatively well for their use cases, but it's important to know the differences and to prioritize according to the use case. Again, this is all for Flash Player 9 - you can find more details about the FP10 GPU mode here and here. The demo allows you to specify your own H.264 RTMP URL for performance tests. Enjoy!
thanks jens Ive been reading all your posts and your certainly an expert at this! I take it all your videos are 24fps? Ive been trying to get smooth 30fps at 1080p and really struggling. Could you point me in the right direction for a FP10/1080p/30fps approach? I downloaded the source from your 1080p FMS demo, would that be a good place to start? thanks again
I would use this player and point it to a 1080p video, then switch to fullscreen mode (fast) and see how it performs. As reference try it with this URL rtmp://vod.uvault.com/1527/mp4:hillman1080p_4060.mov. It's 24 fps. 30 fps should work as well, but normally you need to tweak the encoding settings for 1080p to get decent performance. This example is a simple Quicktime export though, not a lot of magic.
Interesting upcoming webinars with Adobe and Streamingmedia.com StreamingMedia.com has kicked off a new series of “Ask Adobe” webinars. Join us on 9/10th to learn more about the Flash Media Server roadmap with Adobe’s Kevin Towes and Dan Rayburn as they discuss the future plans and how you can be successful distributing high quality video online. ... Demo of Flash P2P video with AIR for Android over 3G Flash Player 10.0 introduced RTMFP and FP 10.1 RTMFP groups, both powerful P2P features. In parallel AIR for Android is getting ready for primetime, with full support of Flash Player 10.1, local camera/mic and P2P. ... Crystal-clear HD with Adobe HTTP Dynamic Streaming Released a couple of weeks ago, Adobe HTTP Dynamic Streaming combines the features of streaming, with the advantages of HTTP scalability. Besides traditional RTMP streaming, and the P2P functionality of Flash Player 10.x, it offers an additional option to deliver your high quality video content - live and on-demand, with full Flash Access DRM protection.... U.S.-Algeria World Cup match largest U.S. live sports event on the web It's official, ESPN reports the U.S.-Algeria game broadcasted on ESPN3.com broke a new record for the largest live sports event audience on the web in the U.S..... World Cup and Wimbledon on ESPN3.com As if the World Cup wouldn't be enough to fill your day, Wimbledon started as well this week, and ESPN3.com is covering it.... Watch the 2010 FIFA World Cup South Africa live on ESPN3.com It's time again for the biggest sporting event of the world. If you live in the United States, the way to watch the games is on ESPN/ABC, with 52 out of the 64 games on ESPN (see World Cup TV schedule)....