10 Flash/Flex streaming video tips

– taterboy | November 27th, 2008

Filed under: Flash, Flex, Tips, Video

In a Birds-Of-A-Feather discussion group at Adobe MAX last week. No remarks were planned, It was supposed to be a discussion, we hoped to talk to other developers about what’s new in using Flash video. We did not get a bunch of new information but we did get a lot of hard questions. Some of them were not fully answered and others were speculated upon. When I was asked my tips, I gave all I could think of at the time. Later that evening I remembered a couple more, some of my best ones.

So for those who went to MAX and those that did not, here are my official video tips for Flash and Flex.

Disclaimer: Technology changes on a regular basis, as of the date of this post I feel very comfortable with the statements made below. As new versions of software are released some of the comments may become outdated.

1. Your source file is king when it comes to getting good quality video. A good source file is the difference between hulu and youtube video. If you have control over your video source, make sure you get a good high-res lossless video file. They are huge and some clients do not know what you are talking about when you ask for it, but try your best to get a good source file.

2. Encode your own files. There are many flv encoders out there, some even your clients can use. But if you want good quality, then encode them yourselves. Of course some clients are pretty savvy when it comes to these things, in that case train them.

3. Use the Flash Video Encoder standalone application. *I have exported flv’s from many other programs, but quality is more consistent with the Flash Video Encoder application. Plus the encoding speed is a lot better with the Flash Video Encoder. It does suck to encode something twice, once to a lossless file, then a second time to flv, but in my testing it has been worth it.
(*H.264 can be encoded from other applications with equal quality. I have not compared them yet, but it is a very standard codec.)

4. If you do not have Flash CS4, use on2 VP6 encoding, it is much better than the other codec options. H.264 is a great improvement even over on2 VP6. Mp4 files can use different codecs, so make sure you are using H.246 and mp3 audio if you are encoding with other applications.

5. Not all video files are the same. Video containing a lot of motion/action can not handle as much compression as a low motion, talking head video. You will have to test your video files and encode each file with different settings to get optimum performance, size and quality. Also if you have control over the editing of your source files, certain video transitions (cross dissolve) encode worse than others.

6. Do not change frame rate when encoding an flv. This will cause your a/v sync to drift. Any edits to frame rate needs to be made in your source file before you encode. This does not apply to video without sound.

7. Dropping FPS and lowering the Key Frame Interval can lower file size of the flv, but there are consequences. For lowering frame rate, see number 6. Lowering the frame rate interval will effect fast-forwarding and rewinding and may effect syncing between key frames. If you need smooth fast forward and rewind, then leave the key frame interval to automatic or raise it a little more. I believe it is set to 24 frames by default.

8. If you want to have good streaming performance, place your streaming files on a server setup for streaming content. There could be cross-domain security sandbox issues, if your files do not load, first check if you need a crossdomain.xml file.

9. Video has come along way from the timeline full of image sequences from pre Flash MX days. Video still has a large file size that can only be compressed so far. Video needs to buffer before playing and can consume a lot of CPU. If possible stop other animations, visual effects, and any processor intense code while your videos are playing.

10. There are still times when video is not the best solution. I still use image sequences if the job requires it, even though video can be the easier way to go in most cases. You may have to push your animation skills to pull off video type effects. Building your animation in Flash will give you more control over the size and quality of your project.

Technorati Tags: , , , , , , ,

Other Related Articles:

| 1 Comment » | facebook:

1 Comment »

  1. Thanks for updating us with the nice information.

    Comment by Flv Player — April 26, 2010 @ 12:47 am

RSS feed for comments on this post. TrackBack URL

Leave a comment