How to Post Video on the Net Part 3; Pixels and Letterboxes

6 06 2008

Hiya all, I am back from a long bout of hard work and it is time to finally finish up this series of articles on web video posting.

In previous articles we set you up so that you could de-interlace and compress your video properly. Now it is time to do a bit of embellishment and make a few minor corrections before you give it to the world to look at, cut down, love, hate or just ignore.

To understand sort out the last bit of confusion when compressing video, you need to understand a ferw basics about video size. You will often hear this referred to by video geeks like myself as ‘aspect ratio’.

The common problem that most face with HD video is that it is in a non standard size.

When we talk about the size of a video you will often hear it called “Aspect Ratio”. This is the ratio of width by height of the video. Television is 4:3 and HD is 16:9. In computer based video there is a large amount of variations when it comes to picture size. The ratio is great to define how big the width has to be compared to the hieght, but the computer needs more defined information. This is where pixels come in. For example, television is 640X480… that is there are 640 pixels across the top of the picture, and 480 across the width of the piture… kinda like the square footage of the video image. Most television and YouTube video is 640×480 (notice that the ratio of pixles is exactly 4:3) and HD video is wider (1440×1080… generally… notice once again that the ratio of pixles is 16:9)

If you compress HD straight up it will most likely compress in a 4:3 aspect ratio unless you know what setting to use. This stretches out the people on the screen and makes them all look funny. If you ever watched an old western before the invention of pan and scan or widescreen video formats you know what i mean (i used to think clint eastwood was really tall and thin)

Many compression programs will automatically adjust the video and output in a widescreen format, this is great as long as you are looking at it on your computer. As far as i know, most video hosting sites will still try to cram your video into the standard 4:3 aspect ratio, as HD is still a relatively new format and their programs were designed to handle standard video.

Aspect ratio has another handy use, if you reduce the amount of pixels in a video , yet still remain within the aspect ratio, you can lower the amount of data it takes to put your image on screen. The image will be a bit smaller, and the clarity will be a bit lower, but if you are dealing with a really long and detailed piece of video this can often be the only way to cut down the data. To go back to our ’square footage’ analogy. Making a room in your house that is 16 feet by 9 feet will take a whole lot of material, however, make that same room in minature… perhaps 16 inches by 9 inches and you will use very little material. You won’t be able to see as much detail (or live in it) but the room will still ‘look’ much the same. In video, the easiest way to half the amount of data is to cut the amount of pixels in half… an image that is 640×480 will be half the data size if you compress it as a 320×240 pixel image. You still maintain the aspect ratio, so your subject won’t get distorted, yet you cut the amount of data you need to make the image appear on screen by half. Now that you understand a bit about aspect ratio, it will be easier to mess with it in the setting of your compression software to get the results you want!

To get a widescreen image in to a 640×480 video you need to either manually adjust the image within your editing software, or, apply a filter in the compression software. Personally, i find the filter works best and takes less of your time messing around with settings.

Start by making your HD film within a normal HD timeline. It should allow you to edit in real time ( as long as you have enough ram to keep up!) When you are ready to output the video you need to ‘preserve the aspect ratio using letterboxing.’ THis means adding a black line on the top and bottom of the video so that the image is squished back in to the shape it is supposed to be in.

The easiest way i have discovered to do this so far (and that works flawlessly every time) is using compressor which will be a part of your copy of final cut pro. Although I haven’t used Premier or other video editing software to do this, I am sure they have something that works much the same.

With the segment you want to export open click on File>Export> Using Compressor. This will open up the compressor program and open up the compression viewer so you can see how the video will look. Highlight the video you are exporting under the ‘batch’ tab. The video will now appear in the preview window. If it was a 16×9 video you will notice almost immeadiatly that the image looks distorted. That is because the preview window shows the image in a 4:3 aspect ratio automatically. Correcting the distortion is simple.

First we need to decide which setting we are going to use. For the fishing video I am working on I want it to be really small so I can email it, so I am going to go to the extreme and compress it as small as I can. To do this Iwill output put it as 160X120 .. maintaining the 4:3 aspect ratio, just really tiny. To do this, click under the ‘Setting’ in the ‘batch’ window go to ‘web streaming (quicktime 6 compatible)>mpeg4 100kb streaming.

If you look at your preview window you can see that on one half the screen is the approximate results of the video… and it looks really pixelated. Not to worry. It won’t be nearly as noticeable because the video will be so small on the screen people will not be able to see all the details. (see video example)

Now to letterbox.

In the inspector, click on the ‘Filters’ Tab… the button that appears to be a piece of film covered by a gray square. Check on box beside ‘Letterbox’…tada!!.. oh wait.. nothing has happened.. stupid apple default…

Due to some very silly thinking on the part of the programmers, the default letterbox setting is one no one ever uses! You need to set it yourself… don’t worry. With the ‘Letterbox’ filter highlighted, adjust the ‘output’ to ‘16×9 1.78:1′, and your black bars will appear. Your video is now ready to output. Click the ’submit’ button in the batch window.

You can also add those black bars manually with a filter within the editing software by applying a letterbox filter to the video before you export. For those of you using simpler video software this may be the best solution. Often when you go to export the video it will add these bars automatically for you if (such is the case with Premier) if you export an HD video in a standard format. Finally, Quicktime does include a setting called “preserve aspect ratio using letterbox”, but in my experience it doesn’t always work.

On a final note:

Without going in to to much technical detail, it is important to understand that your image will get funky looking if you stray from the aspect ratio. It will simply distort the image. You might also have noticed that all the presets in our demonstration and indeed, in the software itself always cut the aspect ratio in half, or quarter or eight.. never by a 1/3 or some other division. This is because pixels are square, cutting them in half is easy, the software just splits them. If you cut them in a 1/3 the software has to compensate for the extra bits left all over the screen and do a lot more math. Simply put, you end up with more distortion. The rule of thumb is, when you are messing around with the pixels, always divide them in half, 1/4 ,1/8, 1/16 etcetera. (there are more technical reasons for this, but i want to keep it simple here) This way you avoid any extra distortion. We will talk about this in greater detail at a later time, because pixels really become a problem when you are manipulating text or images within a video.

And now.. A HUGE FISH (click the link…can’t seem to get it to embed today)

The Tarpon Jumpin Video

Good luck everyone!

The Animal



How To Post Video on the Net; Part 2: Compression

25 03 2008

In part one we took a look at the first step to post decent quality video to sites such as YouTube, by using a filter to ‘de-interlace’ the footage in order to make the video itself web ready. Today we are going to look at compressing that file to make it small enough to be accepted, and still big enough so that it doesn’t look ugly.

To do that, we will start by figuring out how compression works and then some basic tips and tricks to making compression work for you, instead of against you.

What is compression?

Compression is just what it sounds like. It is taking something large and squeezing it down to make it smaller. When it comes to all things on your computer, compression is a standard way for the computer to take what could be a huge file and make it manageable.

How does compression work?

Compression isn’t a new thing, in fact it has been around since the early days of computing, in forms you might recognize such as ‘winzip’. Understanding how basic computer compression works is pretty easy.

Imagine for a second that data on your computer is like a string of yarn. If you took all the yarn you needed to knit a sweater and laid it all out on the ground it would probably fill the floors of your house. So you perform a type of compression, you ball it all up. You do it in a nice neat way because if you just grabbed it all and stuffed it in a bag it would get all tangled. So instead you slowly ravel it in to a ball so you can get to it as you need it. We do the same thing with data, we roll it in to a neat ball on the hard drive so that it doesn’t get tangled up. The computer does it in such a way that the data flows smoothly, because if we hit to much data at once (like a knot in the yarn) the computer slows down do unravel it all and we get loading or freezing on our computer.

Back to the ball of yarn. If you took that ball and squeezed all the air out of it it would get smaller. You would have ‘compressed it’ If you could keep it that way you could store a lot more balls in a much smaller drawer. This is exactly how digital compression works. It takes all the extra spaces and repeated bits out of a file and replaces it with smaller bits of code so that it can be stored in a smaller space. To do this it uses something called a ‘codec’

Ok, I get it, now what the heck is a codec?

Unlike the ball of yarn you can’t just take all the air out of a bunch of data. It would get messy and unreadable pretty quick. You CAN take out some erroneous and repeated data and replace it with smaller bits. Imagine every space in this paragraph actually takes about 10 bits in the data world. To us it is a space but to a computer it is 001011001. (i made that up.. don’t quote me) If we could replace this data with one simple mark like lets say ‘-’ it would take up less space. The problem is that you need to be able to ‘de-code’ that new mark and tell the computer “Whenever I say ‘-’ I really mean 001011001…ok?” That’s what a codec does. It ‘encrypts’ the extra data, and then uses a special ‘de-coder ring’ do decrypt it in the original larger format so the computer can read it.

So what does that have to do with video?

Digital compression really hit its stride when it left the world of compressing boring old computer files and started dealing with things like music. Back in the 80’s someone had the wild idea that we could take the same idea and apply it to sound. Instead of giving the computer every tiny bit of sound data and getting the computer to reproduce that sound, we could simply use a codec. Boom… we are able to store that data on small disks.. and the CD is born. Eventually we got much better codecs, and now we can store hundreds of songs on a cd using .mp3… all .mp3 is.. is a better codec that is better at compressing the audio data.

However, video was a conundrum. Video is much harder than audio in the grand scheme of things. With video you need to have color information for every pixel on the screen… how do you compress that without seriously altering the image? At first even short videos took up huge chunks of space on hard drives, it seemed like it would never really work.

It must have taken a dreamer to come up with the solution, because the solution lay in the sky. When you film the sky it stays a nice even blue, and if you have a steady hand, it will stay on the screen for a long time, in the same place. AHAA!!
What if instead of saying to the pixel ‘i need the color blue’ 30 times every second, we said ‘i need the color blue here for the next 800 frames’? If we could do that we could save a lot of space! Bammo! Video codec was born. The first place consumers really saw codecs at work was on DVD’s. DVD’s use an older codec called MPEG-2. Since then the codecs keep getting better, and now we have codecs that can do HD video on the same size of disk.

It took a long time to get right, and has really only become a viable technology in the last 10 or so years. But when we did get it right it revolutionized everything! When video and computers learned to play together nicely it opened up a new age of digital video and effects work, and suddenly directors could make movies like ‘300′ and ‘Titanic’… but thats another story.

Ok…so what does it all mean to me?

Understand codecs and you understand how to get good quality video on the web. Codecs are always improving and are not created equal. Old codecs do substandard jobs and eventually become defunct. Some codecs improve constantly but not all computers will have access to them. You need to strike a balance between quality and availability. Find a codec that does a good job but that everyone can see on their screen. The problem is that there are a lot of codecs out there.

Apple owns and supports a program called ‘Quicktime’ that has been around a long time. Quicktime is a piece of software that can read and compress using several codecs. It is the standard in the video industry. You can spot a quicktime file when it has the tag ‘.mov’ at the end of it such as ‘mymovie.mov’. Microsoft has their own program ‘.wmv’ and flash has one too… ‘.flv’ (often called a ‘flash video file) The secret behind why these programs survive while others die is actually because they are a combination of codecs all contained within a singe reader. A ‘quicktime’ player can read 20 or so codecs that all have that same ‘.mov’ tag. Whenever a new codec is developed by the folks at apple (or they buy someone else’s work) they add it to their codec ‘reader’. Think of it like a family. Different people, but all with the same last name. The actual ‘codec’ it is using could be called something like ‘h.264′or ‘mpeg2′, but to make it easy for the consumer they lumped it in to ‘.mov’ so that you only need to download one piece of software to read it.

I get it, geeze, get on to explaining how it works!

So you made your video of your ‘gnarly whitewater run’ and you want to post it for the world to see. You de-interlaced it because some goober on the internet told you to, and now you are ready to kick it out of your editing software and post it. So you click on ‘export’ and you give it a name and there it is on your desktop.. but holy crap!!! the file is 5 gigs! You take a deep breath and wade in to the ‘advanced settings’ tab of your video editing software and you are confronted with all kinds of options… you click on ‘video for web’ and it exports to your desktop.. phew! the file is only 10 kilobytes! You click on it to watch it and… what the hell??? The video is the size of a thumb and so blurry you can’t see your gnarly whitewater run any more!!

Don’t panic. You understand the basics of compression and can now start to make compression work for you!

Step 1: Before you do anything you need to find out what formats are supported by the site you plan to use. YouTube currently supports WMV, .AVI, .MOV, and .MPG formats.

Step 2: Find out what the biggest file possible is. In the case of you tube that is currently 1024 mb and can be a maximum of 10 minutes in length.

Step 3: Leave the relative comfort of presets and venture in to the world of advanced compression!

I’m ready! … wait a second … what the hell are all these settings… help!!!

I am going to assume you are using Final Cut. (Sorry folks with premier, Don’t worry, a lot of this stuff will work the same fundamental way)

If you are using a basic editing program such as iMovie or windows movie maker, you won’t have as many options. The solution is to export it in all the different formats that the program will allow. Take a look at the size of the file, watch the movie and see how the quality is, and upload the one that has the right codec type, the best quality and is under your ‘file size limit’. (delete the ones you aren’t using because you can fill up a hard drive quickly)

If you are using Final Cut or a similar program it is time to open up the advanced settings for exporting your file. In the case of Final Cut.. it’s time to open up (duhn duhn duhn) “Compressor”. (File>Export>Export using Compressor)

preview the result

The advantage to compressor is that you can preview the size of the file you are going to get after you export. This is super handy as it will let you play with the settings until you can get under the ‘maximum file size’ limit, while allowing you to play with the frame size and quality of your video. It even allows you to preview what the video will look like after compression, so you don’t get a nasty surprise after you have let it work at a file for 5 hours.

How do I make the file smaller?

There are a few different settings you can play with that will quickly make the file size smaller.

  1. Frame size- If the video takes up less space on the screen, the file will have to deal with less pixels.. less pixels, smaller file size
  2. Quality- This is sort of a ‘catch all’ setting. The lower the quality of the image, the more compression you are allowing the codec to do. Heavy compression will give you smaller files, but you may not be as impressed with the result
  3. Bit Rate- We’ll talk about this more in a second, but lower the bit rate and you lower the file size.. and also,again, the quality.
  4. Codec- some codecs will produce smaller files. In this case I generally recommend sticking with .mov and using the h.264 codec, unless your posting site doesn’t support .mov files.. which is pretty unlikely, but does happen.
picture-4.png
The bad news is that I can’t really just give you a simple solution here.

I can’t say.. just hit these three buttons and you will get perfect quality video ready for the web. You need to play with these settings, get to know them and alter them depending on the video. Slowly striking a balance between file size and image quality. I can tell you that the ‘web streaming’ options give you decent quality video, makes sure that the video doesn’t stutter too much and will resize it nicely.

To see how the video is affected by your choices, click on the ’summary’ option in the inspector while you have the setting highlighted in the ‘Batch’ window. You can see that is shows the ‘estimated file size.’ Now all you have to do is play with the settings until you can get the file size small enough, while still being comfortable with the quality of the image!

The real key to playing with compression is playing with the ‘data rate’. Remember our ball of yarn? The data rate is the rate that the yarn is fed to the net. (or in this case..data) Imagine the internet is a series of tubes.. oh crap.. I can’t believe I just said that… I mean…

Imagine the amount of data that you can get from the internet at any one time is like a pipeline to your computer. The pipe has a diameter and can only feed so much data to the computer at any one time. Let’s say your computer has a data rate of 1000 kilobytes per second. If we try to feed more than that at any one time the pipe gets clogged up for a bit… and the video will freeze up as the computer tries to sort out the data and get the next chunk it needs. If we make sure that the video never exceeds this 1000kb/second, the video will always play smoothly! Your compressor is capable of making sure that the video is compressed enough to always do that!

The second advantage is that if you play with the data rate it will severely increase or decrease the size of the file after compression! The lower the data rate.. the smaller the file. As always, this will be at the cost of image quality. The higher the data rate.. the higher the quality of your video!

Anyway, thats it for this week. I think I have left you with more than enough to work on. I hope to have time to fiddle a bit with ‘Premier’ and be able to add a part two to this post for those of you without Final cut. All in all I am sure many of the concepts are the same and it will be up to you to fiddle with the settings.

Good Luck!

Next week we will discuss frame size in more detail, a brief word on pixelation and finally, look at how to add letter boxing to your video!

Until then, feedback is always appreciated. If anyone out there is a Premier guru and can give some options for web video, pass it on!

The Animal



HD Videography on the Cheap- part 5: Accesories

15 01 2008

This week I would like to talk about accessories. There are a ton of gadgets and gizmos out there. They are shiny and cool looking and you will want to get them for christmas.

What else do I need to get started?

Lets start with the one thing we all take for granted, and often forget to buy

Tripods

There is a big debate among photographers and video nuts like myself as to how much money you should spend on your tripod. The range is insane, from 20 bucks at your local wal-mart to multiple thousands of dollars at the specialty camera store.

I equate the difference between the low end and the high end tripod to wine. A 5 dollar box of wine will taste horrible, but you can drink it if there is nothing else around, a 20 dollar bottle of wine will taste one hundred times better than the 5 dollar bottle of wine and is totally worth the upgrade if you have the cash on you, and a thousand dollar bottle of wine is nice… but not 50 times nicer than the 20 dollar bottle of wine you just enjoyed. Not by a long shot.

Tripods are the same. a 20 dollar tripod is going to be a piece of junk, the panning and tilting will be sticky and show up in your shot and it will wobble with the slightest wind, worst of all it probably isn’t very balanced, so it might fall over at a moments notice. On the other hand, a 90 dollar tripod will be just fine, it will pan smooth, last you around a year of hard beating, be fairly balanced and is totally worth the higher price tag.

Like the $1000 bottle of wine, the $5000 tripod is for experts or aficionados with too much money on their hands. It will work perfectly, you will love it, but it isn’t worth spending 50 times as much. Particularly since we plan on taking it on canoe trips and tossing it down rapids. Imagine how much it would freak you out to get sand in the works of that tripod… or even a $500 one for that matter. The expensive tripods are great for studio work, as they will stay safe and get a lot of careful use, but for the outdoor guy, you need something that you can bash or lose and never look back at.

I like $90 tripods, every mom and pop camera store has them. Make sure before you buy that the head of the tripod has some sort of frictionless or liquid head so that you can pan and tilt smoothly. Test it to make sure it will support you camera, and blammo, you have a cheap ass tripod. Saving yourself about $500 off a standard video budget.

Lenses

Lenses are great. They can make a cool shot even cooler… and an outdoor shot spectacular. Lenses are one of the things that subtly seperates the amatuer from the professional.

Shooting water and sunny days there is a specific lens you cannot live without. It is called a polarizing filter. Unfortunately polarizers are not as cheap as other lens filters because they have moving parts. The other drawback is that they are not intuitive. You can’t just stick it on, point and shoot and expect it to do anything. You need to get a bit of practice.

A polarizing filter cuts out reflections. Technically, the concept is pretty simple. There are two lenses in a polarizer. Each lens has a series of light reflecting strands in them running across the lens. by spinning one of the lenses you change the direction the light is bouncing in to your camera. Doing so allows you to target light coming from a specific direction… such as the sun. This means that by simply spinning one of the two moving parts in the filter, you effectively can filter out the stuff that is causing the glare… such as the sun bouncing off the water.

This is hugely effective when you want to shoot the beautiful green waters of Killarny or have a great image of a car without being able to see yourself and the camera in it’s shiny paint.

The other major cool lens you can get, but CAN live without is a wide angle, or a fish eye lens. These lenses are usually pretty expensive, $100-$300, but are totally optional. The wide angle lens warps the image and is useful for shooting panoramic, because it allows your camera to see father to either side. The distortion is barely perceivable, but the camera can see more of the awesome mountain scape you are trying to capture. A fish eye lens on the other hand REALLY warps things, giving a cool artsy warp to your shot. This is an invaluable lens when you are shooting boats wizzing by your camera.

Extras

There are plenty of other cool tools out there, some useful, some are just something that looks cool to show off to other gear heads. My Girlfriend has a rule around our house; “If it doesn’t get used at least once a year it goes in the trash.”
Although often heartbreaking to throw away your coolest toy, it is a good way to keep the junk out of your camera bags, and keep you under budget.

No matter how cool a peice of gear seems, if you can’t think of more than one thing you will use it for, it just isn’t worth buying. In the case of teleprompters and steadycams, a little research can let you build your own for a fraction of the price. In the case of outdoor HD field monitors… you won’t ever really need it, so forgo the cost.

Remember that shooting outdoors also means you need to lug all your equipment with you, sometimes through swamps and snow. Keeping the weight down in your packs can really make a huge difference when you are hiking. The best way to keep the load down is to cut the extra gear.

That being said. Some gear you might want to get are things like:

  • Waterproof Housing- Check out Ewa Marine. They have great underwater housing solutions for reasonable prices.
  • P2 card reader- If you are using P2 cards in a Panasonc camera, you will NEED this
  • Lens cleaner- make sure you buy a professional lens cleaning solution. Paper towels and cloths can scratch your lens and cost you big bucks to repair
  • Waterproof camera bag- Check out Watershed bags for the best solutions. These are required for outdoor shooting
  • Rain cover- although a plastic bag will do, sometimes a fitted cover works best

Thats a pretty basic list, but covers most of the gear we take with us on a regular shoot. I will add that a boom and steady cam are great assets if you have the space to take them with you, the money to buy them, or the time to build ‘em.

Any other suggestions you might have I would be happy to hear about.

Happy Shooting

The Animal