FlashComGuru Home streaming portalInfluxisCDNImediaseeUvault
                                                                                       Forum Index | Active Topics | Register
                                                                                                          List Overview | List Archives
                                                                                                                           About this site | Advertise
 

home

Adobe AIR (10)
Applications (36)
Books & Training (10)
Collaboration (15)
Components (8)
Events (69)
Flash Player (23)
Flex (32)
FMS (100)
General (119)
Hosting (5)
Jobs (14)
Off topic (36)
Press Releases (18)
Site Check (11)
Tools (46)
Videos & Players (67)

Follow me on Twitter

 
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
^^ maybe thats why its turned off. but can someone tell me how to smooth a video in flex 3.
# Posted By Peabo | 5/15/08 9:09 AM
you could use FLVPlayback component in flex 3 as explained here:
http://www.adobe.com/devnet/flex/articles/video_fl...

then use Stefan's tip.
# Posted By Jorge Tejada | 5/16/08 6:27 AM
Hi,

I've had a developer build me an ap to record from a client's webcam and have suggested using the video.smoothing property to reduce pixelation. I found this code on Julian Pscheid's site:
(flv.getVideoPlayer flv.activeVideoPlayerIndex).smoothing = true;)
My developer said the ap wouldn't compile with the code and thought it could be only compatible with the old FMS. Is this code OK to use with FMIS?
# Posted By Pete Morrison | 5/19/08 10:38 AM
Be careful with the video smoothing. On new computers there's not much difference in performance, but on old ones it might stop the show. I just now had to disable it by default because a 4 year old laptop went from 100% cpu and frame dropping with it on, to 30% cpu all frames with it off.

It would be nice if we could automatically turn it on/off based on performance.
# Posted By tengil | 5/25/08 10:22 PM
Really great. It is a very useful feature. Probably it should be turned on by default.
# Posted By Panayotis | 8/15/08 3:21 PM
Thanks a lot! I've just confused with the problem. It's a quite useful feature!
# Posted By Achilles | 8/28/08 12:34 PM
Wow. I feel like an tool. I have made several video players and I never knew that was an option. I always thought it was a huge limitation of flash... well, now I know. Time to update some players....
# Posted By paul | 9/12/08 7:42 PM
Thanks!! This made a huge difference on my player.
# Posted By Brian Jinwright | 1/26/09 3:53 PM
help!!

WARNING: The component 'FLVPlayback' requires ActionScript 2.0.
WARNING: The component 'DataBindingClasses' requires ActionScript 2.0.


i'm using fcs4 AS3
# Posted By javiero | 6/4/09 7:21 PM
Looks like you are using the AS2 version of FLVPlayback in a AS3 project. You should change to the AS3 version of the component.
# Posted By Stefan Richter | 6/5/09 8:45 AM
thanks, you are right!
# Posted By javiero | 6/6/09 3:58 PM