Embedding Your Video Using Flash

To do this you’ll need two files: a .flv file and a .swf file.

To get the FLV file, start with your project in Premiere. Choose File->Export->Media, which will bring up the export dialog box. From the format dropdown on the right, choose FLV/F4V, and under preset make sure you choose one of the FLV options. Which one you choose mostly depends on the size of your video, which you decided on when you first made your project.

Once you’ve settled on the options you want, hit okay, and it’ll export your project into an FLV.

Flash videos are great because they’re fairly size-efficient. While the Quicktime version of my video was over a gig, the FLV was only 20 MB. The problem is that FLVs can’t stand alone — they need an interface. You can upload an FLV straight to YouTube because it provides the interface, and here’s where you can take a shortcut:

Simply upload it to YouTube and copy-paste the embed code they provide. It takes all of five seconds to do because of how fast it is to upload ad by virtue of you borrowing YouTube’s interface skin.

But, if you want a custom interface, here’s what you have to do:

Open your FLV file in Adobe Flash. This will bring up a dialog box giving you two radio options. The first is for a local flash video (one you plan on playing on your hard drive), and the other is if you plan on uploading it to a server, which we’re trying to do. Once you choose that option, Flash will ask where you’ve uploaded your FLV. At this point, make sure you’ve put your FLV file to your web site server.

Now, what Flash is asking for is the route on your server where that FLV file is so that your SWF file can properly reference it. So start with your domain, then follow it with any subfolders you put the file into. For example, if my web page folder, the one that holds all my site files, is called site, and I put my FLV file into a folder within that called media, I would give Flash the following: http://blackburnkimmel.com/media/%5Bfilename%5D.flv. This is important, because if Flash can’t find what you’re referencing, it just won’t work.

In the next window, Flash will give you some interface options. Choose whatever works best for you (so whatever you think will be most convenient for your viewer). After you hit okay, Flash will show you your basic layout for the video. Make sure everything is within that larger white box or things will get cut off — just edit the size at the bar on the right.

Head to File->Export->Movie, then upload this new SWF to your server as well. The SWF is the actual file your code will be referencing.

Here’s the mass of code to embed the SWF:

<OBJECT classid=”clsid:D27CDB6E-AE6D-11cf-96B8-444553540000″ codebase=”http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0&#8243; WIDTH=”320″ HEIGHT=”240″ id=”Yourfilename” ALIGN=””>
<PARAM NAME=movie VALUE=”Yourfilename.swf”> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#333399> <EMBED src=”Yourfilename.swf” quality=high bgcolor=#333399 WIDTH=”320″ HEIGHT=”240″ NAME=”Yourfilename” ALIGN=”” TYPE=”application/x-shockwave-flash” PLUGINSPAGE=”http://www.macromedia.com/go/getflashplayer”></EMBED&gt; </OBJECT>

Just a warning though: Flash is a tough monkey. I tried this and, although I got my video playing, the interface didn’t show up. Which is weird, because the SWF should package them together. Without a working knowledge of actionscript, I couldn’t diagnose the problem. But maybe someone else will have some success.

-Jon Kimmel


~ by blackburnkimmel on March 4, 2010.

%d bloggers like this: