views:

330

answers:

1

I have a short flv I want to play on my website. I use the below actionscript 2 code to play the video, but the anti-aliasing of text is really poor quality. I added a line to introduce "smoothing" to the video, but it appears to have no visible effect.

var my_video:Video;
var my_nc:NetConnection = new NetConnection();
my_nc.connect(null);
var my_ns:NetStream = new NetStream(my_nc);
my_video.attachVideo(my_ns);
my_ns.setBufferTime(2);
my_ns.play("thevideo.flv");
my_video.smoothing = true; //does nothing

Incidentally, I am exporting the flv video from aftereffects, and when I export the movie as a (larger) "lossless" quicktime movie, the movie looks perfect when played in quicktime, but has the same poor anti-aliasing when viewed in adobe media player, VLC, or mplayer.

Any clue on what the problem is, or if there's a better way for me to go about doing this?

+1  A: 

The smoothing attribute only affects how the video is scaled - that is, whether or not the video is smoothed if you play it at double size or the like. If your Video component is scaled the same size as the source video, this attribute won't do anything.

With that said, please understand that there's no such thing as anti-aliasing going on at the player end of things. Assuming that everything is the right size (so your video isn't being scaled up to 103% or anything), what you see in the Flash player is exactly the data in the source FLV. So any aliasing you see happened when the video was encoded, not at runtime.

So assuming your sizes are right, my guess would be that you should look at the encoding end of things to solve the problem. Is your FLV of a comparable size as the lossless quicktime? If it's a lot smaller, then you're probably compressing it a lot, and increasing the quality settings might help. Likewise, what codec did you use? If you're using the newest codec (H264), the quality ought to be very similar to a quicktime movie of similar size. But the older codecs can have significantly less quality. Especially the old Sorenson Sparc codecs (the ones that require player 6/7 or better to view) are pretty sad by today's standards. And especially the Sorenson codec was heavily customized for low-bandwidths, so even if you encode with very high quality settings you tend to get big increases in file size but very little increase in quality. For these reasons it's highly recommended to make sure you're using the newest codec available for the player version you're targeting.

If none of that helps, please update with some details about what codecs and encode settings you're using.

fenomas