2007年12月16日星期日

Introduction to Flash (SWF & FLV)

There are two basic Flash formats: Flash SWF and Flash FLV. The Macromedia Flash (SWF) file format was designed to deliver vector graphics and animation over the Internet. The FLV is just Flash Video.
The Macromedia Flash File Format (SWF) was designed as a very efficient delivery format and not as a format for exchanging graphics between graphics editors. It was designed to meet the following goals:
• On-screen Display—The format is primarily intended for on-screen display and so it supports anti-aliasing, fast rendering to a bitmap of any color format, animation and interactive buttons.
• Extensibility—The format is a tagged format, so the format can be evolved with new features while maintaining backward compatibility with older players.
• Network Delivery—The files can be delivered over a network with limited and unpredictable bandwidth. The files are compressed to be small and support incremental rendering through streaming. SWF is a binary format and is not human readable like HTML. Macromedia Flash (SWF) uses techniques such as bit-packing and structures with optional fields, to minimize file size.
• Simplicity—The format is simple so that the player is small and easily ported. Also, the player depends upon only a very limited set of operating system functionality.
• File Independence—Files can be displayed without any dependence on external resources such as fonts.
• Scalability—Different computers have different monitor resolutions and bit depths. Files work well on limited hardware, while taking advantage of more expensive hardware when it is available.
• Speed—The files are designed to be rendered at a high quality very quickly.
Macromedia Flash (SWF) files have the extension .swf and currently for historical reasons the MIME type is application/x-shockwave-flash.

We can use explore to open Flash SWF files, and now there are many free third party programs to play, such as Flash Movie Player, Swiff Player, or you can even use some SWF Converters to player the swf files, this is not very good for me, I want to watch it in full screen sometimes.

Good things usually has defects on other aspects, Flash SWF has some limitations which makes it less suitable for slideshow presentations, especially if there is synchronized sound and if the slideshow will be over about 8 minutes long and you wish to use 29.97 frames per second for best quality output. Flash SWF will only reliably maintain sound synchronization for about 2 minutes of play time and has an absolute frame limit of 16000 frames. This means that at 29.97 frames per second you will reach the absolute limit at just less than 9 minutes of play time. When this happens your slideshow will stop - there will be no more video but the sound, ( this is why some friends only get audio no video), if any, will continue to play. This is an absolute hard limit - no exceptions. The only way to get more than about 8 minutes and 40 seconds is to use a lower frame rate and thus a lesser quality video.

There are many good Flash SWF files online, many friends want to download the beauty flash, but not always can we download from the websites, but I always can do so. The common method is that right click the page to look for its source files, to find the path of SWF file. Here I give a example a litter different:
When you open the source file of other’s websites, you may find such code

You can see src="fullscreen.swf", usually it is a complete path, you can only parse the path into a downloader to download it, here, the SWF file is in the same file of the page, you should only add the SWF file name to the url, such as http://www.name.com/fullscreen.swf, then you get the SWF file path too.

Maybe some websites in order to protect its flash, you can see the source file, don’t worry. I will give you another way to do the trick. When I first met such problem, I don’t know what to do, too, incidentally, when I import SWF files in my IE cache to convert with Moyea SWF to Video Converter, luckily, I found the SWF file just there, then I follow the path to get it. This is because when you open the website, the flash is automatically downloaded into your IE cache.

Luckily, Flash FLV has no frame number limit and reliably synchronizes sound regardless of time. Another advantage of FLV Flash is that what is called "progressive" download. If you are familiar with the term "server side streaming" then you will know approximately how FLV appears. With true server side streaming the movie is housed on a server on the web and spooled or "streamed" to your computer a few kilobytes at a time. You see the show begin almost immediately and it plays until it ends. But the files remain on the server. With progressive download the files are actually being transmitted to your hard drive and stored in a temporary folder under a nonsensical name. They are streamed to your video and audio from that location and this appears identical to true streaming. These files are eventually erased from your hard disk, but they remain there until the allocated temp space is needed then they are silently erased in the background and the user is completely unaware of any of this happening. A really savvy computer user can then actually "acquire" your slideshow in this manner. The probability of this happening is remote, but it is necessary that you understand the difference between true server side streaming and progressive download as used with Flash FLV. One other very important advantage of Flash FLV is that you can set what is called a "preload" percentage. This means that a certain percentage of your slideshow will be downloaded to the computer before playback happens. This is important because sometimes your internet connection isn't fast enough to "keep up" with the required data flow for an uninterrupted slideshow. By downloading a percentage before the show begins your system has a "head start" and can buffer sufficient data to provide a smooth and uninterrupted slideshow.

These days, many friends download FLV from Youtube, Google and other websites for their iPod, DVD, iPhone, Apple TV and other portable devices. Here I show a free FLV Downloader, many friends of mine are using it, and the tutorial you can learn how to use it. http://www.flvsoft.com/download_flv/help.html You can also use the free FLV Player to watch your favorite flash videos. There are too many things we have to pay for, free goods is usually our favorite.

For talking such much, hope you can learn sth about flash, do well with flash on web, you’ll be the best. Follow I want to talk about some attentions when converting Flash.

What frame rate should you build your Flash file at when Conversion?
Every second of video has 30 frames. But Flash animations can be done at any frame rate, which raises a couple of important questions: what frame rate should you work at, and second, if you choose to work at a rate other than 30 frames per second (fps), how do you convert to 30 fps? I deal with the question of frame rate conversion below.

You can create a Flash movie at 30 fps. But if is going to be played back on a computer, a 30 fps .swf file will generally produce unacceptably high data rates, unless the image is very small and simple, or the computer it is playing on is very fast. It can also create a lot of extra animation work if you want to draw in-betweens for all 30 frames. Fortunately, there is no need to build your Flash movie at 30 fps, even if you are planning to transfer it to video.

We usually build animation that needs to work on the web or video at 12 fps. This gives us a good balance of lower data rates and smoother animation. When creating cartoon style animation, it also keeps our work consistent with the majority of broadcast animation. While some high end cel animation is done at 24 frames per second (the rate that film is projected at), much broadcast animation is created at 12 fps. This is because it is drawn on "2's." In other words, each image holds for 2 frames. Do the math and it becomes clear why--half the amount of frames to draw each second. While Disney and Dreamworks may have virtually unlimited budgets to create their epic animations, most broadcast (and even more so, Internet) productions are on very tight budgets. But even the big studios do a lot of character animation on 2's. It looks good that way, so why create twice the work?
If we are using flash to build a cartoon solely aimed at broadcast or film, however, we build it at 24 fps. That way we can animate on 2's for most of the character animation, but do animate on 1's for segments or particular motions that require smoother animation.
If we are using Flash to build graphics for broadcast use only, and so won't be hand drawing in betweens, we usually build the file at 30 fps. This will give us the smoothest motion, and data rate won't be an issue for you. It is also possible to even build it at 60 fps, and convert this to a 30 fps video with fields.
In the end, you can decide to build it at any rate you want. The lower the rate, the smaller the file size, data rate and number of frames to animate, but the less smooth the animation. Conversely, the higher the frame rate, the higher the file size, data rate and number of frames to animate, but with smoother animation.

I always choose the proper flash to convert, when I use Moyea SWF to Video Converter, FLV to Video Converter Pro , so I can always get good quality video to put on my Zune, PSP, Apple TV...... Some people get the devices slow when playing the converted flash is due to this, when you play the improper flash on your computer, you may get “ the file will slow down Adobe Flash Player 9, if it continues, your computer will not responds a moment”. So you can only follow the rule to get good quality.
Hope you will get good flash quality with your iPod, DVD……

没有评论: