Monthly Archives: September 2006

How To Put Flash Videos On Your Blog In Many Easy Steps

I’ve been known to post adorable Flash videos of my son reading books and of the parodies I do of children’s shows. Perhaps you are asking, “How does he do it?” More likely you are asking “Why doesn’t he just post his videos to YouTube and be done with it?” In which case, hush, you.

Since the internet needs more how-to instruction pages, here’s how I do it. I used Windows, so don’t be surprised that the software I talk about uses Windows as well.

FLV? Wha?

FLV, or Flash video, is a file format that embeds video directly into Flash files, allowing Flash to do more than provide annoying website navigation and strange animations and games. Google Video uses it, as does YouTube. It has a lot of advantages over other methods of delivering video on the net. More people have Flash plugins than QuickTime, Windows Media, or Real Player. In addition, Flash is slightly less evil than the other three, killing only two puppies every time you use it as opposed to nuking baby seals from orbit and also selling your private information to spammers. (I’m looking at you, Real Player! But not too hard, lest you nuke me from orbit as well.)

To post your videos as FLVs on your blog or site, you need three things: original video, a tool to convert the video to FLV format, and a player to provide your FLV movie to visitors.

Getting Original Video

What, you don’t have a DV camcorder or something? Filming the boring mundanities of your life for posterity is an unalienable right. Get crackin’, and don’t come back here until you have three hours of birthday party footage, including young Suzie being frightened by the clown you hired.

Converting Videos to FLVs

Tools to convert video to FLV can run you from $50 to $700. Thankfully, there are free options. The command-line tool FFmpeg will do it for free, and it’s open source to boot. That means you can get it for most any platform. It also means that the documentation is terrible and it’s got a learning curve steep enough and high enough to carry you into orbit.

Enter the Riva FLV Encoder. It’s based on FFmpeg and it’s free. It’s also Windows-only. Such is life.

  • Grab a copy of the Riva FLV Encoder and install it.
  • Make a backup copy of your movie to work with. Riva FLV Encoder occasionally erases your original movie file. Better safe than sorry.
  • Run it. In the Input box, press the Browse button and navigate to the video you want to convert.
  • On the right side, set the video’s Resolution. I generally recommend a movie size of 320×240 — less if your video is of lower quality or doesn’t have a lot of fine detail.
  • Set the video’s Bitrate, which determines the video quality. For video with a lot of motion, you’ll want to set this reasonably high. I get good results with a bitrate of 360, though if you lower it, the final file’s size will be smaller.
  • If the audio in your original file is less than CD quality (i.e. 44100 Hz), try reducing the audio’s Bitrate and Sampling Rate. Lower values create lower-quality audio but a smaller final file size.
  • If you want to trim the boring bits off of the beginning and/or end of the video, enter when you want the movie to start (in seconds) in the Start Offset box and how long you want the movie to run in the Duration box.*
  • Press the Encode button.
  • Press the Preview button to make sure the video looks okay. If it doesn’t, try adjusting the bitrate or the Start Offset and Duration.

*I’ve run into a problem with trimming movies with Riva FLV Encoder: the sound isn’t in synch with the video any more. If that happens to you, you have two choices. One, trim the video in a video editor. Even Windows Movie Maker, which ships with Windows XP, will do. Two, turn the entire video into an FLV file with Riva FLV Encoder, then use a tool like flvtool2 to trim it. flvtool2 is a Windows command-line tool written in Ruby that does just about anything you want to FLV files. To use it to trim a movie:

  • Download the flvtools2 archive and put it in the directory where you keep your movies, to make your life easier. Unzip the flvtools2 archive and extract flvtools2.exe.
  • Open a command line window and go to the directory where your movies and flvtool2 are. If you’re not sure how to do this, you’re better off not using flvtool2 for now.
  • Open your new FLV file by double-clicking on it. This will load the FLV file in the Riva FLV player.
  • Play the FLV file to see where you want the final video to start and end. The Riva FLV player shows the time code in seconds on the bottom-right-hand side of the window. Write down the times for the video to start and end.
  • Type in the following command: flvtool2 -C -i [start] -o [end] [original flv name] [new flv name]. The bits in brackets are to be replaced as follows. [start] is when you want the video to start in milliseconds. So if you wanted the video to start at 1.231 seconds, type in 1231 where [start] is. [end] is where the video should end, also in milliseconds. Unlike Riva FLV Encoder, flvtools doesn’t use a relative measure of how long you want the video to be. [original flv name] is the file name of the FLV file you made with the Riva encoder, and [new flv name] is what you want the trimmed video to be called.

The encoded movie’s quality depends to a large extent on how good your source video is. If you’re using DV-encoded video, try scaling it down to an uncompressed 320×240 format before feeding it into Riva FLV Encoder, to reduce artifacts.

Playing the FLV On Your Site

Most people can’t play FLVs directly, as they would need to install an FLV player on their machine. Instead, you need to have a Flash application to serve the FLV file to visitors.

You could write your own in Flash, or pay someone for their FLV player. Alternatively, you can use Jeroen Wijering’s player, which he has made freely available for noncommercial use. Yay Creative Commons!

  • Download the FLV Player.
  • Put the flvplayer.swf file on your site. For example, mine lives at https://granades.com/wordpress/flv/flvplayer.swf.
  • Upload your FLV file to your site.
  • To embed the FLV file in an HTML page or blog post, add the following HTML:

    data="/flv/flvplayer.swf?file=[movie]&autostart=false">

    /flv/flvplayer.swf is the relative URL to the flvplayer.swf file. [width] is the width of your FLV file (which I normally make to be 320) and [height+20] is the height of your FLV file plus 20 pixels. [movie] is where you uploaded your FLV file. &autostart=false means the visitor will have to click on the video before it plays — it’s optional, and may be left out if you want the video to play when the page is loaded.

That’s it! Give it a try. If you’re wanting to use this on a WordPress blog, you should try the FLV player plugin.

As to why I don’t post the videos to YouTube: because.

Eli Plays the Cookie Game

Eli likes to play the Sesame Street web games. They are all “the Cookie Game,” regardless of who’s actually in the game. Here lately he runs the mouse all by himself, choosing what games to play and then playing them, because his parents are too old and too slow to keep up with his youthful exuberance. Don’t believe me? Watch this video and be amazed.

I Own a Car!

Remember back when I nattered on extensively about trying to get the title for our car?

I vowed that I wouldn’t mess with it over the summer because I didn’t want to stand in line and try to entertain Eli. Well as soon as school started I went and resubmitted my paperwork to get the title changed over to our names.

This past Tuesday we got the title to the car and it’s in our names! I feel like I should get it bronzed.

Bodies? What Bodies!?!

Yesterday evening we returned from a meeting at church, had dinner, and Eli demanded that we go outside and eat a popsicle. Once outside he quickly abandoned the popsicle in favor of drawing with chalk on the driveway.

“Draw me!” he said.

So I proceeded to draw a stick figure with a wild mane of hair.

“NO! Draw ME!!” he said again as he flopped down on the driveway spread-eagled.

The light click on over my head as I realized he wanted me to trace around his whole body.

We did one, then another, and then another. As soon as one would be finished, he’d leap up and careen to another section of concrete. He never did get the hang of spreading his arms and legs way out, so each time I’d have to remind him to spread out so he wouldn’t be a blob. Pretty soon there were six blue and green Eli’s cart-wheeling their way up and down the driveway.

Then I started writing his name inside the shapes.

“E-L-I!! Eli!!” He chanted as we filled in all the bodies. Or, alternately, “Do the next one! Put E-L-I right here!”

After that, I decided they should all be connected with dotted lines (to emphasize the cart-wheeling aspect) so I started back down the driveway doing that.

Once I finished that project, I decided to sit because, man, all that stooping over is hard on an adult.

After all that work, he went up and down the driveway singing, “Well, you walk and you walk and you walk and you STOP!” The stopping came with wild out-flung arms and stop hands at each of the chalk Elis. He’d look at me until I said, “Go!” and then he’d sing until the next outline. He probably made 10 or 15 circuits of the outlines.

The light started fading so we gathered up our chalk and headed inside for clean-up and bath. I snuck outside this morning though to talk some photos of our masterpiece:

img_7389.jpg

img_7391.jpg

img_7393.jpg

Friday Night Videos: North Europe

Carpark North: Human (2005)

What makes this video so wonderful is the children, all of whom are in that awkward stage between true childhood and adolescence. Reportedly the directory, Martin De Thurah, cast child dancers but then instructed them to “dance ugly.” The result is surprisingly touching and, at a few brief points, poignant.

Röyksopp: Remind Me (2002)

I can’t stop watching this video. I walk away from the computer to break the cycle, and five minutes later I’m back watching again.

Hey, You Kids! Get Offa My Kid!

Eli has plunged feetfirst into the world of playgrounds. Several months ago, when we went to Chicago, we paused at a rest stop that had a small jungle gym with a slide. Eli carefully slid down the slide, decided that was okay, and slid several more times before we left.

Then there was the Giant Playset Up on the Mountain that was so much fun that Eli screamed and screamed when we tried to separate him from it. Even my explanation that it was lying about how many planets our solar system had did not dissuade him from his love of its ladders, steps, rock walls, and myriad slides.

Yesterday evening he was once again out on a playground, sliding and running and sliding and running. I’m getting calmer about the whole climbing-up-then-throwing-his-tiny-breakable-body-down-a-slide thing. No, it’s the other kids I’m beginning to worry about.

Eli loves people. He greets strangers and will talk to them at length about whatever stray thoughts a cosmic ray has knocked loose in his brain. The other kids, though — they do not see the glowing sign above his head that says, “This is the most special child in the world. LOVE HIM.”

Nothing bad has happened, not really. But I see other children ignoring him or slighting him and I want to run up and lop their heads off with my knife. And I know better! I cannot protect him from the other kids. Doing so would keep him from becoming a fully functional adult. I’ve dealt with parents who swoop down to protect their dear one from any bad experience, and the results ain’t pretty. I have no desire to be That Parent, the one that makes all of the teachers want to set bear traps outside their room for me.

So I sit on my hands and do nothing. No, that’s not quite true: I shoot death rays at the kids with my eyes. So far it’s not working.

What I Did On My Dragon*Con Vacation

I do a fair amount of boring stuff for Dragon*Con, including keeping track of radios that the staff uses and helping the trains run on time. I figure you’re not interested in that. What you’re interested in are the videos I make for Dragon*ConTV. I’ve sort of carved out a niche in that group: making videos for childrens’ products.

Last year it was baby food:

This year it was educational shows from NickJr:

Later I’ll talk a bit about our process and what I’ve learned over three (!) years of doing this. As to why I do this: It’s all about the kids.