Putting Your Video Online

| 2 Comments

(( Now added to my online storage dump / extended brain – a dry & technical 2000 wordish article about compression and other considerations for online video – written a while ago for Australia’s Metro magazine. If video compression settings, explanations, interlacing and compression related links appeal, click away…))

Hosting video online always involves compromise, given the shrinking needed to pass even a short movie through the average internet connection. Even with a rapidly increasing broadband audience, careful efforts are still needed to compress your movie effectively and allow it to be optimally viewed by a wide audience across many platforms (or even a specific audience with known connection speeds and machines). Specialist compression software packages are thankfully taking some of the hard work away from this, but given the diverse platforms, media players and bandwidth options available – some pre-planning will still help make that process as painless and fruitful as possible.

Adapting to Web Limitations
Watching video online is commonly described as watching blocky pixels fighting on a matchbox, and while it has grown more sophisticated ( no, really), it’s useful to keep that in mind regardless of the bandwidth available. Your wonderful cinematography will be probably be viewed on a 320 wide by 240 pixel high window ( upgrade that matchbox to a cigarette packet) rather than a multi-level IMAX theatre, which suggests that fine and subtle visual details should not be relied upon as either plot devices or visual cues. Aside from being difficult to see in a much smaller window, fine details are first to go during the compression process.

Video for the web tends to favour close-ups and mid-shots over long and wide shots, and better results are achieved when camera movement and onscreen movement are minimised. Compression software works in part by comparing differences between successive frames of video, and so zooming, panning, transitions such as dissolves and fades and on-screen action all mean your video files will end up bigger. This isn’t as much of an issue if you are aiming at broadband and larger bandwidth audiences, who you can send larger files, but it is still worth considering as screen movement and frame differences also means compression takes longer to process. These are all just general priniciples to keep a video looking as good as possible on a 56k modem – which is always going to be a stretch, and stated so you can at least know some of the rules you are breaking.

Capturing Issues
If your movie for the web involves some footage shot on a video camera, it’s worth considering how you capture that footage before you do anything else with it, and the interlacing of the footage. Even though webmovies tend to be within small windows, it’s still best to capture at the highest resolution possible as this allows the best quality possible compression of the image. The more pixels compression software has to play with when compressing a movie, the better the end result is going to look. Capturing at DV-PAL resolution is recommended ( 720 x 576 ), if you can manage the extra storage space it requires – generally 250mb per minute. To confuse matters a little, DV-PAL is also a codec ( we’ll get to those later) which means it ‘compresses’ the size of the video as it captures it. Although most video capturing software allow the use of a wide range of codecs when capturing, it’s best to retain as much quality and data as possible until you have finished editing your movie and then compress your movie, rather than reducing it’s quality at several steps of the movie-making process. The DV-PAL codec is good for capturing as it retains most of the quality while reducing the storage space needed.

Interlacing In A Nutshell
Television screens are made of up of many horizontal lines. Interlacing is a video display technique whereby all odd numbered horizontal scan lines are updated first, and all even-numbered scan lines are updated next. The end results are fine for the human eye and by refreshing sets of alternate lines, the screen has half the amount of work to do. We have faster screen technology available now, but are still attached to the older standards which means even digital camcorders actually record 50 pictures per second, each with half the height of the frame. Each ‘half-frame’ is called the ‘lower field’ or the ‘upper field’, and the camcorder mixes or interlaces these two fields into the one frame. When playing back or exporting interlaced video it’s important to get the field order right (eg upper field first, or lower field first) or you’ll find your clip has stuttering motion, and blocky artefacts around the edge of moving elements.

Computer monitors can work with full frames as well as interlaced fields, and so when making a movie to be viewed on the web ( or many computer monitors ), you can either interpret and render all elements of your movie in fields ( such as footage, titles, graphics etc ) or you can de-interlace your footage and output your video with ‘no fields’. De-interlacing your footage is the preferred option for webmovie production and can be done within your video software, or with a program like Adobe After Effects or specialist plug-ins. Animation and graphics can be simply be rendered without field rendering enabled, and combined with any de-interlaced video footage if need be. In summary – clips can survive without it, but if optimal viewing is preferred then de-interlacing should be investigated. This deinterlacing tutorial is quite helpful : www.creativecow.net/articles/onneweer_barend/deinterlacing/index.html and www.100fps.com also helps clarify any misunderstandings about interlacing.

How Compression Works
Movie clips are ‘compressed’ using a video ‘codec’ (short for compressor/decompressor) to reduce the file size. Codecs generally work by analysing the clip and removing as the least important visual or audio information. Knowing a little about the two basic types of compression processes used by codecs – spatial and temporal – will help you appreciate ways you can prepare your clip for compression when exporting from your video software. Spatial compression tries to remove ‘redundant’ data from within the frame, data that matters least to the eye’s perception. Temporal compression tries to compress across many frames of video over time, recording only differences between each frame rather than each actual frame. And so, dull as it sounds, the less the software has to analyse change in your clip, the better the clip will compress.

Pre-adjusting your video to get rid of unnecessary artifacts or levels of detail therefore, will greatly help the end-quality of your compressed clip. This can be done simply, by slightly raising the contrast and brightness and adding a small blur before you compress, reducing some of the colour differences in your clip. Similarly, ‘normalising’ and equalizing your audio levels will also help avoid spikes of difference.

General Compression Settings
If exporting and compressing your completed clip from within editing software such as Adobe Premiere or Final Cut Pro, or a dedicated piece of compression software, there are many codecs available to choose from, but principles and adjustible parameters common to almost all of them. We’ll tackle the three ‘frame’ parameters first. Adjusting your framesize from 720×576 ( pixels wide & high when captured) down to either 320×240, 240×180 or even 160×120 pixels will give a better balance of file and viewing size. Try exporting one of each and see what you’re happy with. Next drop your clips framerate from the usual 25 frames per second, down to 15 or even 12. This is deemed preferable for the web, and in one swoop almost halves the amount of data needed in your file. And finally on the frame front, adjust the number of keyframes your clip has. Keyframes are complete image frames that are stored for your software to compare between. A key frame setting of “1” will mean every frame is a key frame, your clip will look good and have a large file size. ‘1 keyframe every 80 frames’ is recommended for web movies.

The Data Rate setting is another crucial compression parameter, and essentially sets a ceiling speed for transferring the video data from a hard drive, disc-drive or modem to the CPU and then to the video display hardware. For a video to be streamed ( viewed as it is downloaded ) on a 56k modem, it needs to have a data rate of around 5 KBps ( kilobytes per second ) at most – if the data rate is any higher, the video might not display at all. However if the video is just to be downloaded and viewed later, the data rate can be set at a much higher rate to suit viewing from a hard drive.

Choosing a Compression Codec
Codecs have improved significantly in recent years, with DivX and mpeg4 offering some of the highest quality compression and smallest file size. With the DivX codec, you can compress a VHS tape to one-hundredth of its original size or a DVD to one-tenth of its size – which allows the entire contents of a DVD to fit on a regular data CD with no perceivable loss in quality. This comes with a performance cost though – DivX especially requires a fast computer to manage smooth playback of a clip encoded with that codec. At the other end of the scale the Cinepak codec will still work fine on many very old computers, however suffers from relatively severe image quality problems. A plethora of codecs vy for attention in between those two, with the Sorenson codec a popular choice for apple users, and indeo or mpeg for PC users. If looking to produce streaming rather than downloadable videos, Apple users can go with Quicktime and Flash MX Video, as can PC users, who can also output clips with either Windows Media Encoder or Real Producer by Real Networks. Beyond these, dedicated compression software such as Sorenson Squeeze or Media Cleaner allows for more advanced options, such as finer compression controls, automated batch processing, and compressing multiple versions of clips for automatic playback by viewers accessing the clip via different sized bandwidth.

Dedicated Compression Software
Media Cleaner (mac+pc) ( www.discreet.com ) US$499
Sorenson Squeeze (mac+pc) ( www.sorenson.com ) US$429.00
Wildform Flix (mac+pc) ( www.wildform.com ) US$149 ( Outputs Flash video files, and includes optional unique vector function )

Real Producer ( www.real.com ) Free, although encoder unavailable for mac osx.
Windows Media Encoder ( www.microsoft.com ) Free, PC only.
Quicktime Pro ( www.apple.com/quicktime ) US$30 (mac+pc)

Virtual Dub ( www.virtualdub.org) Free & open source PC software.

Linux users can access a wide range of compression related tools and tutorials at these sites:
http://loll.sourceforge.net/linux/links/Audio-Video/Video & http://ffmpeg.sourceforge.net

Other Resources
www.apple.com/quicktime/tools_tips/tutorials – show how to embed quicktime movies in webpages, and add interactive elements.

www.moviecodec.com & www.free-codecs.com offer many links to available codecs and tutorials

http://bitconjurer.org/BitTorrent – offers a free alternative method for letting many people download larger movies, without straining your server.

The Video Blogging community is full of useful tips and feedback for publishing video online. Try these tutorials, or join these communities:
www.videoblogging.info
www.freevlog.org ( step-by-step guide to setting up a free videoblog)
http://groups.yahoo.com/group/videoblogging/ ( mailing list with a thousand Videobloggers )

**
Jean Poole is a freelance writer who likes to play with real-time audiovisuals in Melbourne. Some snippets of these are published online ( www.skynoise.net )

Autobot Roulette:

  • No Related Posts

2 Comments

  1. jean poole says:

    Aye aye – seems to have an interesting model, what with their ad-clix at the end of clips…
    but there’s a fair few of the beasts vying for attention now – eg –
    http://www.techcrunch.com/2005/11/06/the-flickrs-of-video/

    we’ll see who’s still standing in a year’s time…

Leave a Reply

Required fields are marked *.


This site uses Akismet to reduce spam. Learn how your comment data is processed.