Maggie's FarmWe are a commune of inquiring, skeptical, politically centrist, capitalist, anglophile, traditionalist New England Yankee humans, humanoids, and animals with many interests beyond and above politics. Each of us has had a high-school education (or GED), but all had ADD so didn't pay attention very well, especially the dogs. Each one of us does "try my best to be just like I am," and none of us enjoys working for others, including for Maggie, from whom we receive neither a nickel nor a dime. Freedom from nags, cranks, government, do-gooders, control-freaks and idiots is all that we ask for. |
Our Recent Essays Behind the Front Page
Categories
QuicksearchLinks
Blog Administration |
Saturday, July 19. 2008Dr. Mercury's Computer Corner: Lesson 15 - Streaming videoThis is a weekly Saturday morning feature that will slowly, over time, turn you into a full-fledged computer expert. More info here. Lesson 15: Streaming Video This video's been around for a while, but it illustrates the point well. Admittedly, Rosie O'Donnell has made a real horse's patoot out of herself at times over the past few years. As a mild example, she claimed on TV that the collapse of the buildings on 9/11 must have been a government conspiracy because "fire can't melt steel" — casually forgetting for the moment that fire is what makes steel in the first place. But how do you compare the silly statements Rosie O'Donnell makes against others? By what standard do you measure jack-ass against ass-inine? Finally, someone's put together a formula that works! A clumsy and amateurish job, perhaps, but somebody had a great idea and went for it. Want to be next? An Assumption This lesson assumes you know all about running your web or blog site, know the lingo and how to do various things like access the source code of a page and how to write the entire HTTP path to your video files.
And thank goodness we're in it. A 'template' is a block of code that we cut & paste into the web or blog site, then change the various parameters (name of file, size) to fit the new files. When I want to add a video to my home page, I simply do a copy & paste with an existing video on the page. I click on the video box in the editor, Ctrl-C to copy to memory, then Ctrl-V to paste it in the new place. I then open it up and change the name of the file and the video size, if necessary, and it's ready to go.
In the early days of streaming video there were three competing formats; RealMedia, Quicktime and Windows Video. I ran endless analyses with various programs and there was never a doubt that the Windows formats (first ASF, then WMV) were far better than the other two. Byte for byte, WMVs were sharper than RMs, and, quality for quality, WMVs were far smaller than QTs. Hence the exclusion of RealMedia and Quicktime from this text.
We'll cover four of them, three for the web and one for WordPress blog sites. I won't refer to the WordPress one again until the end of the page. It's to note that they usually only work with one type of video format, but, with free converters around, this should not be a reason to choose one player over another. You should be looking at function and features, and I imagine you'll agree with me that JW Player is the best of the three.
The Trick If there's a 'trick' to all this, it's using full paths to the various files, starting with the "http:". That way, should you shuffle a video around on your site, you don't have to fuss with the paths. Snip it out of one page with Ctrl-X, slap it in another with Ctrl-V and it should be good to go. For that video up above, I did the following:
Worked right the first time. Video Sources When it comes to peripheral devices, like vidcams and phones, the one, single goal is to get it on the computer in whatever format possible. Virtually any format can be converted to your format of choice — once it's on the computer. For grabbing online stuff, read this. As noted on the page, more and more videos are being streamed to the computer's memory, rather than the hard drive, in which case there's no hope (so far) of recovering them. Nor does prying through the source code do any good. But the common stuff, like YouTube vids, are still sitting there happily in your Temporary Internet Files folder, ripe for the plucking. For the heavy-duty stuff, like taking high-quality clips from DVDs, the guide is here. Be forewarned, it makes the leap from the simple conversion routine to real video processing. Bring a bag lunch. You'll need to know the exact size of the video. Almost all media players have some kind of 'Properties' that display the basic file information. In Media Player, click on the title bar with the right mouse button, 'File', 'Properties'. With AVI and WMV files (but not MPG), you can click on the file's icon with the right mouse button, open Properties, click on the 'Summary' tab and the 'Advanced' button to see the info. For FLV files, which you probably don't have a player for, you'll need to use a program like MediaInfo. After you click on the green 'download' button, look for the 'Graphical interface' version then click on the second green button. This is a perfect candidate for the SendTo feature. Like putting pictures on a web page, it's best if the video is the size that it's going to display as. If you put a small vid on the site and use the box's 'grab bars' to make it larger, it's not going to look near as good as if it had been resized with a real video converter. Reducing it to a smaller size with the 'grab bars' won't matter. You can resize it during the conversion, putting in the exact specs you want. I presume you know about keeping the aspect ratio together, but if not, I'll turn you over to last week's lesson. The Choice What conversion process you use depends on what quality you're looking for, and the size it'll be played on the site. It breaks down like this:
If there's something you want to crop off the beginning or end of the clip, the procedure would be:
Warning: This procedure involves uncompressed video files, which are gigantic compared to regular videos. As such, you'll need some spare hard drive space. The free VirtualDub can be downloaded here. Windows Media Player Microsoft's free Media Encoder v9 is here. It's an excellent program. I've matched it up with other converters (VideoStudio, VirtualDub, TMPGEnc, Media Encoder v7) and version 9's 2-pass encode just blows the doors off everybody else. And, as noted in last week's lesson, the shame of it all is that WMV is far superior to FLV in any way you'd care to name, but because of the friendly intercollegiate rivalry between Microsoft and Apple over the years, there's no Media Player-type program on the Mac, so FLV just kinda slipped into the gap. Media Encoder is pretty easy to use but let's skip through the steps:
It'll do a 2-pass render. The computer might feel a little sluggish during the first pass. There are two ways to put the WMV on the web page, as a link or in a player window. They're treated quite differently so let's break them up. Link on the page With a link, we don't link directly to the WMV file, we link to a small 'redirect' file made with Notepad. This tells Media Player it's a streaming file and to start playing it as soon as it gets enough downloaded. Open Notepad and punch this in: <ASX version = "3.0"> Put in the full path to your video. Save the file with whatever name you want in the same folder as the WMV file. Open the folder and change the name to "coolvid.wvx", using the vid's name or close, just to identify it. For future videos, you'd just make a copy of an existing WVX file. Upload both files to the site. On the web page, link to the WVX file and that should do it. If it doesn't play, you should be able to tell what's wrong by the error message. If it's a 'page not found', the link to the WVX file is incorrect. If Media Player pops open but 'can't find file', the path in the WVX file is at fault. If it doesn't appear to be streaming; that is, the whole thing's downloading before it starts playing, try putting a "mms:" in the WVX file instead of "http:". And make sure you're linking to the WVX file, not the WMV. Player on the page Pop open the web page in the editor, open the source code and punch this in:
Note: You have to add 66 to the height in order to compensate for the player controls. The height of the video in the above example is actually 240 + 66 = 306. You'll want to carefully pick through the code after you copy it to the source page and make sure there are blank spaces where they belong. Some might have gotten lost in the copy & paste process.
Got your FLV file ready? If not, go here and skip halfway down the page to the 'Down & Dirty' section and try out SUPER. Also, assuming you're going to use a preview pic, you'll need one for this initial test. If you don't want to bother with the real thing, just grab any pic and resize it to the size of the video, then upload both files to the site.
Easy Download the player. Unzip the file and put the player somewhere permanent on the site. Use the enclosed template for the source code.
If you want different skins, then you'll have to grab the latest player from the home site. The site is pretty cool, though. A 'setup wizard' lets you pick different options and when you've got it just right, the code is down below, ready for pasting into your source code. Go to the JW Player home site. Click on the 'JW FLV Player for Flash' link. Download the player, unzip the file. Upload the "player.swf" and "swfobject.js" files to a permanent spot on the site. Your video file and preview pic should also be on the site. Now click here to go to the setup wizard. Flip the drop-down menu to "flvplayer with video, preview, and overlay controlbar". The page will reload. Put in your own path to the player, video file and preview pic, go through the five areas and have some fun. The 'Preview' tool is great, and when everything's just right, the code is below, ready for pasting into your own source code. Remember to use the full path for any file entries.
If you've read the above, then you've seen the large, horrendous blocks of undecipherable code that the poor webmaster has to deal with. Well, brace yourself, blogmaster, cuz you ain't seen nothin' yet! The unbelievably complicated code to put an FLV video and a JPG preview pic on your WordPress blog site using the 'FLV Embed' plugin is... [flv:coolvid.flv 320 240] And it doesn't even go in the source code, but right on the main page of the editor. The program assumes the path to the file, that the preview pic is a JPG and has the same name as the video. After dealing with big blocks of code all these years, the above is pretty amazing. Much more info here.
As I said: templates. You get your first video going and the rest will be a snap. All you have to worry about are names and sizes. See y'all next week! |
In an effort to round out Maggie's Farm and make it truly eclectic, Bird Dog has invited me to add the geek factor to the mix. But, rather than just adding a few geeky articles here and there, I thought it would be fun to actually get serious about the wh
Tracked: Jul 19, 10:44
Programs AutoSizer — This has two great uses. It'll pop open the browser (or any program) in full-screen mode every time it opens, and for small programs that tend to open wherever they want (like Calculator), it will make them open righ
Tracked: Nov 29, 10:03
Here's an index of my Maggie's Computin' Tips. I can't guarantee all of these will work on every Windows operating system, but most should. Programs AutoSizer — This has two great uses. It'll pop open the browser (or any program) in full-s
Tracked: Jul 10, 11:25
Here's an index of my Maggie's Computin' Tips. I can't guarantee all of these will work on every Windows operating system, but most should. Programs AutoSizer — This has two great uses. It'll pop open the browser (or any program) in full-s
Tracked: Jul 10, 11:27
Here's an index of my Maggie's Computin' Tips. I can't guarantee all of these will work on every Windows operating system, but most should. Programs AutoSizer — This has two great uses. It'll pop open the browser (or any program) in full-scr
Tracked: Jul 22, 19:51
Here's an index of my Maggie's Computin' Tips. I can't guarantee all of these will work on every Windows operating system, but most should. Programs AutoSizer — This has two great uses. It'll pop open the browser (or any program) in full-scr
Tracked: Jul 22, 21:41
Here's an index of my Maggie's Computin' Tips. I can't guarantee all of these will work on every Windows operating system, but most should. Programs AutoSizer — This has two great uses. It'll pop open the browser (or any program) in full-s
Tracked: Jul 23, 13:09
Here's an index of my Maggie's Computin' Tips. I can't guarantee all of these will work on every Windows operating system, but most should. Programs AutoSizer — This has two great uses. It'll pop open the browser (or any program) in full-s
Tracked: Aug 28, 08:33
Here's an index of my Maggie's Computin' Tips. I can't guarantee all of these will work on every Windows operating system, but most should. Programs AutoSizer — This has two great uses. It'll pop open the browser (or any program) in full
Tracked: Jan 08, 20:00