FlashComGuru Home Influxis Uvault Akamai
                                                                                       Forum Index | Active Topics | Register
                                                                                                          List Overview | List Archives
                                                                                                                           About this site | Advertise
 

home

AIR (Apollo) (8)
Applications (28)
Books & Training (8)
Collaboration (7)
Components (6)
Events (43)
Flashpaper (2)
Flex (24)
FMS (63)
General (106)
Hosting (5)
Jobs (13)
Off topic (26)
Press Releases (6)
Site Check (6)
Tools (37)
Videos & Players (51)

 
Sometime last year Fabio asked this question on his blog:
"Every day on the web new video related sites appear. Video sharing, video delivery sites or simply mashups, all Flash Video based. I'm very happy about this but there is a thing I can't understand and it is : why very often is video.smoothing property not used ? This is completely obscure to me because in my opinion a smoothed video is always better than a blocky one."

Of course he's right, video.smoothing is simple yet effective, once turned on your video will look a lot better. Take the following example. On the top you see the intro screen of a movie trailer with smoothing turned on, and on the bottom the same screen without smoothing (it looks bad because this video was scaled down quite heavily). Big difference, the top one looks a lot better.
Unfortunately smoothing (a property of the Video object in Flash/Flex) is turned off by default. To turn it on you simply set smoothing to true. Something like

myvideo.smoothing = true;
But what i you're using the FLVPlayback component? How does one access the underlying video object there? It's quite simple really if you know where to look. The FLVPlayback component uses the VideoPlayer object under the hood, and VideoPlayer extends Video and therefore inherits the smoothing property.
Say you have a FLA file (AS3) with an instance of the FLVPlayback component on stage and named it flvpb. You simply need to add the following code to enable smooting:
var videoplayer:VideoPlayer = flvpb.getVideoPlayer(0);
videoplayer.smoothing = true;
Note that you have to specify an index when calling getVideoPlayer(), but if you are not dealing woith indexes then it should normally be 0 anyway.
Hope this helps, go use it and tell your friends how smooth you are.

Comments
[Add Comment]
great Stefan, as always
# Posted By Fabio Sonnati | 2/26/08 12:35 PM
Hi Stefan,

Personally I've had to avoid .smoothing on a few ocaissions because performance drops through the floor on larger dimension videos (with on2 especially). So really smoothing is fine when upscaling significantly, but best avoided otherwise?
# Posted By Richard Leggett | 2/26/08 1:40 PM
Hi Richard,
that could make sense but I haven't tried it. So folks, use with caution, test your footage before deploying it.

BTW I think the latest Player performs better with smoothing. Tinic has some info too:
http://www.kaourantin.net/2007/06/mip-map-what.htm...
# Posted By Stefan Richter | 2/26/08 1:50 PM
I've updated this sample now with smoothing:
http://www.flashcomguru.com/apps/hd_full/hd.html

You can go full screen on that. Not sure about performance but it seemed ok here.
# Posted By Stefan Richter | 2/26/08 2:19 PM
Will smoothing work with a live RTMP stream?
# Posted By Andy | 2/26/08 4:09 PM
yes i think it does
# Posted By Stefan Richter | 2/26/08 4:15 PM
Any way to get smoothing work on Flex VideoDisplay component?
# Posted By Tuomas Glad | 2/27/08 8:38 AM
I'm sure there is but I haven't looked into it yet. I usually use a plain Video object in Flex, not the component.
# Posted By Stefan Richter | 2/27/08 9:06 AM
I always recommend the us of smoothing, it slows playback slightly but enhances widely the video quality
# Posted By Fabio Sonnati | 2/29/08 10:38 AM
Thanks a lot. That's just what I was lokking for!
# Posted By Max | 3/4/08 11:02 PM
I had a funny problem that went away when I turned smoothing back off. I found that when the VideoPlayer was paused and I performed a seek, then the image wasn't updated until I hit play again. This problem only happened with smoothing turned on. With smoothing off, the image was updated no problem.
# Posted By Jonathan Marston | 4/3/08 11:24 PM