View Full Version : advice needeed - flash video encoding

03-06-2009, 06:32 PM
Hi all,
i'm trying the best way to get small but hi-quality flash movies (archviz rendered ones) for http streaming... starting point is an uncompressed AVI.
I tried to encode this AVI into Flash CS3 Video Encoder, but both codecs (On2 VP6 and Sorenson spark) give large files, or larger than i hoped.
I was thinking about encoding into DIVX, XVID (or whatever) with another authoring tool, and then importing result in flash to save it as FLV movie without any additional flash compression.
Any advice to get best result ?


03-08-2009, 12:05 PM
I use magic video conventor and export direct from FLV to swf and compression decent , dIivx seems to best for size and quility try takin it into adobe premiere and mess about with settings .

03-08-2009, 12:27 PM
When you say "larger than you had hoped' - what size files are you getting and what were you hoping for?

Nearly everything we produce is for web streaming and I use Sorenson Squeeze for all of it. I'm quite pleased with quality and file size, but I'm usually playing back at 480X270. What type of resolution are you wanting to use?

I'd be happy to post my 'recipe' for settings if it would help.

Cheers. :)

03-08-2009, 12:34 PM
i personally like using quicktime from after effects and setting it to Mpeg 4 and adjusting the quality slider accordingly to get a good size/quality ratio. i think the reason i like it the most is that a lot of my videos include logos and fine lines and it tends to keep them crisp and legible, but does lose a perfect white (it turns to a light grey).

ooops just saw the flash part haha well i'm guessing you could import the .mov back into flash and saving it out from there, but it's been a while since i've been in flash.

03-08-2009, 12:45 PM
Use Mencoder (or FFMpeg) to do a multipass encode to a x264/h264 (Quicktime mp4/h264 encoding is complete rubbish), and use the NetStream class from Flash to stream the h264 file or just use JW Player (very easily implemented, even in plain html pages and it is completely skinnable), superior quality compared to ON2 VP6 codec (the one used in flv video encoding).

The Doom9.org forums give you a lot of help on how to do a proper h264/x264 multipass encode and use it with Flash.

mencoder : http://www.mplayerhq.hu/design7/news.html
doom9 forum : http://forum.doom9.org
jw player : http://www.longtailvideo.com/players/jw-flv-player/

03-08-2009, 02:51 PM
Thanks to all for the advices !


03-08-2009, 04:33 PM
PointC - i did tests with a 400x320 movie, which is the resolution i'll use for all movies. 20 seconds were about 4 MB with On2 VP6 at top settings, and quality is not good - not as good as i want, at least. Some squares are visible in smooth areas. Here's the FLV i'm talking about.
Sorenson Squeeze is a nice tool, i dont have it but i can consider it if it's worth.

Red_Oddity - Mencoder seems nice but couldnt find a direct link to get it.... geeky website ;)

Anyway, it seems clear that i've not to rely on Flash's Video Encoder compression. Better to prepare a MP4/H264 mov or a Xvid AVI (gonna test which is better).
Then i'll transform this into a FLV with Flash's Video Encoder with no additional compression
It's down to find best way to get a good encoding; i'll lgive a try to Premiere's encoding until i'll find this Mencoder thingie ;)

thanks again,

03-08-2009, 08:18 PM
I looked at your FLV file and I thought it was pretty good. I think the advantage you'd have with Squeeze would be that you'd get the same quality as the built in compression in Flash (both On2 VP6), but with smaller files. Yours was 20 seconds and approx 4MB. we typically get 8MB for about a 1 minute video with the same amount of camera movement you had in your video. So you'd probably see about a 20-30% reduction in file size by using Squeeze.

Just a few things that we always do to help the whole process (you may have done these as well): use at least 800kbs for a bit rate (very easy for broadband users - who isn't right?) and choose a 2 pass VBR instead of CBR.

As I said, I thought your compression was pretty good, but for extra quality, I'd follow Red_Oddity's advice above.

Best of luck. :)

03-09-2009, 04:31 AM
Really cant find the Mencoder thing.
I found some Linux-only downloads somewhere... is it for Win too ?

edit - anyway... i did some tests, this is what i discovered.
I saved an uncompressed AVI, a Xvid AVI, a H264 MOV and a Mpeg4 MOV as starting points (H264 and Mpeg4 files are somehow much larger than Xvid one at same quality).
Then i imported all these into Flash video encoder; i saved the uncompressed AVI as FLV with plain On2 VP6 codec at 1000 kbs, and i saved all other movies as FLV without adding any further flash compression. Result is that Uncompressed AVI to On2VP6 has best size-quality ratio. Probably i'm missing something in H264/Mpeg4 comrpession (Premiere offers very little control), but unless i find Mencoder these are the results i got.


03-09-2009, 07:09 AM
You should always encode from the best quality, encoding from a already encoded source is not a good idea.

Here's the download link to mplayer:

03-09-2009, 08:34 AM
So Mplayer includes Mencoder.. i didnt find it explicitly written anywhere. thank you !

Ps - A clarification: i start with uncompressed AVI to encode with Flash's On2VP6 codec. In all other cases, encoding is not done when exporting to FLV, but before, using Premiere. Then in Flash i use no additive compression (otherwise it would be a second encoding, which is wrong as you say) but i just save it out as FLV.


03-09-2009, 09:17 AM
Keep in mind that MP4/H.264 (unlike VP6) doesn't support cue points or transparency. May not matter to you, but a big deal in other cases.