Leadership

How do I... Convert an MPEG video file into Flash video?

<img src="http://t.cbsimg.net/i/z/200606/how_110x85.jpg" align="right" border="0" height="85" hspace="5" vspace="5" width="110" />In a previous <a href="http://www.techrepublic.com/blog/howdoi/?p=134">How do I... blog entry</a> I showed how easy it was to create your own custom Flash Video player using Adobe Flash's new video components and a few lines of ActionScript. The example I wrote featured a sample Flash video file (FLV) from a royalty-free stock video site. This time, I will show you how to convert your own MPEG, AVI or QuickTime files into the FLV format.<br /><br /> Converting an MPEG, AVI or QuickTime video is a simple process that involves using Adobe's Flash Video Encoder, a separate program which installs on your hard drive in conjunction with the installation of Flash CS3 itself. If you already have Flash CS3 on your computer, you can open the Flash Video Encoder from the Start Menu.

In a previous How do I... blog entry, I showed how easy it is to create your own custom Flash Video player using Adobe Flash's new video components and a few lines of ActionScript. The example I wrote featured a sample Flash video file (FLV) from a royalty-free stock video site. This time, I will show you how to convert your own MPEG, AVI, or QuickTime files into the FLV format.

Converting an MPEG, AVI, or QuickTime video is a simple process that involves using Adobe's Flash Video Encoder, a separate program that installs on your hard drive in conjunction with the installation of Flash CS3 itself. If you already have Flash CS3 on your computer, you can open the Flash Video Encoder from the Start Menu.

If you don't own a copy of Flash CS3, you can download a fully functioning 30-day trial from Adobe. If you don't have multiple MPEG, AVI, or QuickTime files of your own to use in this exercise, you can download a couple of low-resolution stock QuickTime files from FreeStockFootage.com and save them to your hard drive.

Oddly, Flash CS3 does not provide a stand-alone FLV viewer for watching FLV files from your hard drive. But you can download a free FLV player if you need one.

This blog post is also available as a TechRepublic gallery and TechRepublic download.

Converting files

Begin by opening the Flash Video Encoder if you haven't already. You should see a screen resembling Figure A.

Figure A

The Flash Video Encoder

Click on the Add... button in the upper-right corner. This will open a dialog box that you will use to locate one of the MPEG, AVI, or QuickTime files on your hard drive that you will be converting to FLV format.

After you have added a source video file, it will be listed at the top of the Encoder's Queue, with a default setting of Medium Quality. (Figure B)

Figure B

The first source video added to the Queue

The Flash Video Encoder is set up for batch processing of videos, so if you had a large number of videos you wanted to convert to FLV format, you would simply add them to the Queue by clicking the Add... button and listing an unlimited number of source videos so that the Encoder could process them all automatically in the order you listed them.

Let's add a second video to the Queue now. Click the Add... button again and locate another source video you wish to convert to FLV format. When you are finished, the Queue should resemble Figure C.

Figure C

The second source video added to the Queue

Many people convert their source videos to FLV format for posting on video-sharing sites such as YouTube. However, most of these sites will automatically downgrade the quality of the video to help conserve their bandwidth. If you want to ensure a high-quality FLV file makes it online intact through one of these video-sharing services, you will need to change the default Quality Settings before you convert your source video.

For the sake of comparison, let's just change the settings for the second video in the Queue. Select the second video in the Queue window and then click on the Settings button on the right side. A dialog box will appear that shows the first frame of the video with several settings tabs underneath. Click on the Encoding Profiles tab and from the drop-down list, choose the option named Flash 8 -- High Quality 700 kbps. (Figure D)

Figure D

Setting the second Source video to a High Quality setting
Next, click on the Video tab and from the "Quality" pull-down menu on the right, select the option labeled "High" (Figure E). These settings should work fine. Click the "OK" button to close the Settings dialog box.

Figure E

Adjusting the video quality of the second source video
Now you're ready to process the Queue and convert your source videos to FLV format. Click the Start Queue button on the right and let the Encoder get to work. As the Encoder converts the videos, you will see a preview play in the bottom-right of the screen. (Figure F)

Figure F

Processing the Queue
When the conversion is complete, the videos in the Queue will be marked with a green check mark (Figure G), and the FLV version of your source videos will be in the same directory as their source videos.

Figure G

Both source videos have been converted to FLV format
Now, open the stand-alone FLV player you downloaded earlier and preview your new FLV movie. (Figure H) These FLV files can be used in the creation of your Flash content, or they can be uploaded to any video-sharing site that accepts videos in FLV format.

Figure H

Viewing the new FLV files through the stand-alone FLV player

John Lee is a consultant specializing in design and illustration and a freelance technical writer. You can visit his Web site at johnleestudio.com.

49 comments
Freelancealot
Freelancealot

When I add my avi movie to the Flash CS3 Video Encoder and click 'Settings' I don't see the first frame of my video in the dialogue box as per Figure D in the above tutorial. The avi movie plays in other video players, so why isn't showing in the Flash Video Encoder? Any ideas?

vucliriel
vucliriel

The question nobody asks is: WHY should anyone WANT to convert?! WHY would someone want to convert a perfectly good, independently portable and storable format such as MPG) into something that is difficult for a user to acquire and contain (download) and worst of all, to control, such as Flash? Have you tried to view a Youtube video off the web? It's possible, but every effort is done to prevent the user from doing so! Why not a post on how to convert these frustrating formats into something more user friendly, tangible and storable such as AVI or MPG?! Where does this mania come from to have to have everything web-centric? We are already being forced, in the latest versions of many software, to work the way the designer wants us to work instead of using the computer, like it was originally designed to, work for us the way WE want it to! (Just you try to move the toolbars on the side in Word 2007!) The personal computer revolution was started precisely to fight the trend of the day which had users on workstations that had to deal with a central computer just like web centered applications would want to have users be! Have any of you forgotten the personal computer is supposed to be a tool to work FOR THE USER instead of telling the user to conform to a software developer's idea of what the user should do with it?! So why would any sane person want to convert these perfectly legible, universal and best of all, easily downloadable formats such as MPG into something that is designed specifically to prevent exactly that independence, such as the flash format on Youtube?! Has anyone forgotten that installing Flash makes it very difficult after the fact to prevent obnoxious ads on webpages and promotes a style of web design that is heavy handed and basically forces the user to view the webpage the way the designer wants instead of the way the user wants? What happened to simplicity, clarity and straightforwardness? And I'm not even talking about the the time it takes to download one of these hard to save videos for future viewing! I have been into computers since the late 70s and I am sick and tired of this trend towards Flash-y emptiness that is hiding the more deeply worrisome trend towards removing control of computers away from users towards big corporations!

Aaron A Baker
Aaron A Baker

Actually, I was wondering just the opposite. How do I turn a Flash in to an mpeg,avi,wmv, or just about anything "other" than Fash as I abhore Flash Media and prefer to excersise better control over the content.I wold also love to know how to compress a wmv into an mpeg. Strange. Regards Aaron

TheGooch1
TheGooch1

Google "Liquid Studios" and get their free player. However, I really don't advise encoding you videos in FLV format, it just causes unnecessary complications for your audience. If everyone would just use common, open formats such as Xvid or H.264, we wouldn't need all of these different codecs, converters, and players.

a2wasakra
a2wasakra

How do i add a simple preloader to the FLV or SWF Video?

Kateorlova
Kateorlova

i like another good prog its VisiFly i found it more easy and helpful than another progs... it works with all common formats and has demo without timelimit!i think its great!

deepak4net
deepak4net

when minimize any program hide program on task bar in window xp

jmgarvin
jmgarvin

Way easier to use and FAR cheaper!

BALTHOR
BALTHOR

This is a digital video file and there are so many file types that it can be converted to.Why couldn't my flash player play an mpeg or even a jpeg.The problem that I had with conversion was that the file greatly increased in size after conversion,if it converted at all.The advantage of a Flash file is that it can be melded to a player.Once that is done your video will play in any computer.(note:My DVD player says that it will play mpeg's but it doesn't.)

MarkAB
MarkAB

What is missing for amateurs like myself, is what are the reasons for converting to Flash video, what are the advantages? Will the files be smaller? Will you have more control over them? Thanks for the information.

mithraigor
mithraigor

I would rather convert from the proprietary format (Flash) to the open format (mpeg) so I can actually play it.

oscar
oscar

Super is another program to convert many format of video and music and Totality FREE

isa
isa

Why would anyone convert files that take up minimum space and will already play using minimum CPU cycles, into a format that is the opposite of both; taking up more space, and vastly more CPU cycles to play them?????!!!

JackOfAllTech
JackOfAllTech

There are probably close to 100 free video converters available that work just as well if not better than Adobe's program. Ralph

JCitizen
JCitizen

my news groups and site videos work about ten times faster and just all around better now that they converted to flash. However, I think it is a bumb rap that we got no way to save files without buying a flash player or converter of some sort. I would like to play my favorite site videos without having to go online once and a while, for references and friends. I don't always want to join the network when I'm not at home for security reasons, but would like to play a file for someone while I'm on the road.

TJ111
TJ111

The only reason to convert a video into a FLV format is for displaying on web-pages in video players (and also possibly some applications). Unfortunately, it's a proprietary format, but it's best to work with whats available to the masses. If your distributing video via download/cd/dvd then flash definitely isn't the best choice. Flash is used because it can play on any browser with flash installed, without depending on the user having certain applications or codecs installed on their system. . If you want your PC to work for you, use Linux and other FOSS software. I use Linux exclusively (at home) because it caters heavily to power users and provides almost too many customization options. Not to mention your not tied into doing what the developers want you to do, its designed with the user's needs in mind, and if it doesn't fit your needs you can adjust it as necessary. So in your definition of what the personal PC should do, your basically describing what FOSS already does. . And I agree about to much focus being put on the GUI and not the product (flashy/emptiness), just look at Vista, Nero, etc. I wish more modern programs had command-line options (as in Linux) to perform simple, quick tasks without having to dig through the GUI. Something like 'norton-av --quick-scan > av-results.txt'.

phamdoand
phamdoand

The big price difference does have something behind? Can you show an exemple?

ideallypc
ideallypc

I agree with much of this discussion, but one thing I have yet to find is a FREE video rotator. My kids continually film with the camera sideways and then say "Dad, will you please rotate my video?" I have yet to find a FREE program that can rotate and crop MPEG or any other format.

SteveRollo
SteveRollo

The Riva FLV Encoder mentioned earlier (http://www.rivavx.com/index.php?encoder&L=3) has an undocumented feature allowing you to encode both ways. Simply put the FLV file in the box that asks for the MPEG and the MPEG filename you want as the output filename, and it will convert the FLV to MPEG.

MetalFR0
MetalFR0

I will second the recommendation of SUPER. I have used it to convert files to .FLV format, as well as converting .FLV files back to a usable format (say, from Youtube) back to an .MPG or .WMV for use as backgrounds in my church. It's a tad cumbersome at first if you're not a video expert, but once you get to know it, it works quite well.

steven
steven

People associate MPEG and QuickTime (and other formats) with small file size, but that's not always the case. It depends on where the file comes from. I make a lot of video portfolios for clients, many of whom are television directors and professional videographers. I usually start from an HD QuickTime movie that's been exported with minimal or no compression directly from the edit suite. I assure you, the resulting Flash movies are WAY smaller! So why convert to Flash? One Reason. It's the most ubiquitous player available. Try playing QuickTime or Windows Media on Linux sometime...

a2wasakra
a2wasakra

Hi,i was wondering how can i add a simple preloader to the encoded flv or swf video?

Stimpi
Stimpi

OK: Flash is simple to do, Riva work well, "Smart" works well. Now we have a FLA file, it is great to play in a boxed player on a website. But lets say that I take a AVI of a person, convert it to FLA or SWF. If I wanted to take that file > embed it, stream it on my servers and place it on another web site. I want to take a FLA (say a talking person) to anothers site and make it appear on the front page, I DO NOT want a chromeless window to do this because the tiny Flash file has a I-framed window, yet this cover the customers text on there website, does anyone know how to crop just the person out of the sat 3" tall by 1" wide white window so the person talking on the site is just the person and NOT a table or anything like that - I just want the person, not the pop over invisible I-frame window Example: http://www.videoforprofit.com:80/index.php?page=btour2&theme=1 Any ideas? James

ebade
ebade

The post was informative, I was thinking of a different way this technology could be applied and this could maybe be the topic of the next post. Is there an encoder (could be flash or something else; free maybe but I doubt it) out there that one could have(say hosted on a website for example) and allow people to upload their movies (MPEG, AVI, MOV ... ) and it would handle the conversion process. Just a thought, I have a feeling that it is already possible.

studio.johnlee
studio.johnlee

I decided to write this article based on several requests from readers of my previous article that asked how an AVI/MPEG/Quicktime was converted to FLV format. Since they had already downloaded or purchased Flash in order to complete the previous exercise, I thought it best to stick with Flash Video Encoder. Which, technically, is fully functional for free for 30 days if you download the trial version. Yes, there are many other free video encoders available. But as someone who works with multimedia for a living, my experience with "free" is: You get what you pay for.

mrwelch98
mrwelch98

Adobe has a great reputation for quality products. If I were producing commercial quality stuff that really mattered, I might condider the $700 price tag. Of course I likely would also have a few $3000.00 dollar cameras, spent oodles on video editing software, and maybe have a whole team of professionals with high end computers working on the project. Joe public on the otherhand, who shoots videos with their cellphone or inexpensive camcorder and just wants to post thier goodies on YouTube likely never would buy this product. If you look at the prices of all the Adobe products, you can see that they aren't trying to place a copy of thier product on every desktop. Had the article actually mentioned and explored some of the other solutions available, it may have been more valuable.

dsimp
dsimp

I absolutely agree. There are many converters around. What was the reason for focusing on an Adobe pgrm which you must purchase, I wonder?

TheGooch1
TheGooch1

mp4 works just as well on the Web as it does on the desktop. .flv is supposedly a way to get more control over how your videos are accessed. However, this is a cat and mouse game that the video recorder cannot win. So, lets just keep things open, standard, and useful to keep the information flowing.

vucliriel
vucliriel

It's not too often that I read intelligent answers such as yours. I tip my hat to you, sir :) I cannot but agree with your very clear and logical explanation. You are completely right about Flash, as it operates in a browser, it is obviously more universal and will work on practically any platform (albeit using more computer resources and not always as easily). It just needs to be easier to access, ie, to download to play later when you're offline. But I guess it's just a matter of time that we see apps like Windows Media Player able to play FLVs and SWFs... Very pertinent point about Linux. I've been reading about Wine and the possibility to run existing Windows apps on it and it looks like it works quite well so I may well end up making the big (?) move at some point in the future for my desktop... Won't be so easy for the laptop, though... I've got a recent Toshiba and learned after getting it that its BIOS was designed for Windows and may not even work with Linux (not counting the total lack of Linux device drivers)! Ah well, can't win them all... Anyway, thanks again for your excellent response. It's much appreciated :)

techrepublic@
techrepublic@

mencoder can rotate, crop and do much more. There may be other free programs that do it also but this is the one I use. I usually use it in scripts but there are some nice GUI for it so you don't have to use the CLI.

parnote
parnote

I don't know about you, but I run Linux as my primary OS at home, and I play Quicktime and Windows Media files ALL THE TIME on Linux!

Larry the Security Guy
Larry the Security Guy

Unfortunately, the Linux argument can always be countered by the market share argument. But I actually found it easier to install support for and then play AVIs and MOVs than for FLVs. Firefox tries to locate and install the appropriate plugin, but fell back to manual installation for FLV and SWF support. Someone wrote a nice install script (a YMP file) that installs lots of codecs and a couple players. It's a little outdated because the URLs changed, but it made for a nice one-click process to ensure I could play just about any audio or video format. Now if I can only find something for QCPs I'd be happy (Qualcomm has pulled it, unfortunately).

isa
isa

My home system is a WMC2005PC with 1.5 GB RAM and a 2.4 GHz P4, and when I go to a website like NBC.com to watch a missed episode of Heros, I can assure you that my CPU always maxes out and playback is consistently jumpy. It also eventually locks up the whole system. It?s such a wonderful pleasure watching video this way I just had to speak out! I could understand if we were talking about MOV, WMA, or WMV, but we?re not, so as for the MPEG format, it?s a cross-platform, industry standard and should be viewable with Linux?s built-in media player. In conclusion SWF files may actually be smaller, but the CPU cycles it takes to decompress them does not justify their pervasive employment.

TheGooch1
TheGooch1

When you upload your videos to Youtube, it converts them to FLV format. Of course, you are at the mercy of the program they use and how they configure it ( mono audio only, for example ) , but you can just upload your video ( check their FAQs to see supported formats ), wait for their converter to do its job, then download it from their site using any number of tools designed to do so( personally I use the "download helper" plugin for Firefox.

emccarty
emccarty

How might one do this with command line? How might one do it with code; c# preferably?

Dr. Tarr
Dr. Tarr

If I were trying to share my vacation footage on YouTube I might well opt fot the freeware, but I do have several of those $3000+ cameras, editing decks, and my livelyhood to consider. I think I'll stick with the big stick that also does so much more.

Larry the Security Guy
Larry the Security Guy

I think your statement about the software having a trial version implies a recommendation to use it while it's free as an alternative to paying for the program. Perhaps I assume; perhaps I'm wrong. I would hope so. Your other credo - You get what you pay for - doesn't ring true for me. I've tried lots of programs covering lots purposes, and found little if any added value in the more expensive versions. I have no doubt someone could name a few features only available in the commercial versions of the applications I use, but if I don't need those features I find their added cost does not bring added value.

metawebit
metawebit

Whats the best free video to flv converter you can recommend?

thejipster2003
thejipster2003

I wrote a script recently that allows me to generate any video format to FLV as well as genererate a thumbnail file. I used Python and called FFMpeg to do this. I might blog about it soon.

intj-astral
intj-astral

Get the Internet Video converter at http://ivcsoft.free.fr/ it's free, not shareware/trialware, and it will convert to/from flash video plus many other formats including ipod video, it downloads flash video from web sites, etc. It pops open a console window during conversion, but that's part of the process so let it be. Enjoy.

spadata
spadata

I liked the video clip -- It really shows the quality of the conversion also, but KUDOS to the video creator!

rhogaboo
rhogaboo

As do I! It rocks. I recently reduced a 30 MB mpeg down to a little over 7 with very little loss. Riva even offers a flash player in their producer lite package. This took a minute or so to encode the video - it's at http://7thstreettheatre.com. Scroll down to see the vid. ralphhogaboom

Editor's Picks