Codec's and their Potential influence on media development
Ronan Crowley, rcrowl.ca4
97084603
    Abstract: This essay will introduce Codec's and their place in the fast-growing area of Media development. I intend to show the possibilities that use of a Codec can bring to the development of a Multimedia system, as well as the ease of use that accompanies Codec's (with a case study on the best Codec currently around, DivX ;-)). The area of Piracy is one that also needs special consideration, due to the smaller file sizes that Codec's produce and the advantages of new Internet technologies. Lastly I will look to the future, and see the potential uses of Codec's both directly and embedded in other applications/services. In my conclusion I will weigh up the positive and negative aspects of current Codec's and give my personal opinion.


Introduction
This essay intends to look at the fast-growing area of Media development, coupled with the controversial new topic of video Codec's and how the combination of these two developments will affect the future of (computer) video.

What is a Codec?
"Codec" is short for COmpressor/DECompressor; a Codec is any technology for compressing and decompressing data. Codec's can be implemented in software, hardware or a combination of both. An example of hardware Codec would be DVD decoder cards that accompany many DVD drives in place of such software as PowerDVD or WinDVD.

How do Codec's work?
Codec's can simply be looked upon as Plug-in's to a system to allow interpretation (and in the case of video, playback and recording), of a type of file that the operating system cannot recognise. For example, mov files cannot be viewed without the Apple QuickTime software installed. Much the same if you download a movie trailer that has been encoded in MPEG4 format using the DivX ;-) Codec, then you will need the same Codec installed to watch the trailer.

What (software) Codec's are currently available?
Popular Codec's for computer video include Indeo (basic), SMR (MPEG4), Angel Potion (a combination of many Codec's) and DivX ;-) (An MPEG4 system, which uses MP3 for sound, which is a case study later in this essay).

Who are using Codec's?

Media Development

MPEG
    There are three types of MPEG currently supported by most operating systems and video playing software. These are MPEG-1, which is the standard that is currently used in standard Television and videocassettes, MPEG-2 is the standard in which digital Television is transmitted and DVD's are encoded and MPEG-4 is the emerging standard for online video distribution. MPEG files are compressed at greater rates than AVI files, with similar sized files being 12 seconds in length for AVI and 150 seconds for MPEG. For example, converting a 28 MB AVI file into an MPEG creates a 275KB file, with the duration cut by six (for faster motion).
    MPEG-1 is the standard that we are most used to at present, with the standard being decided upon in 1992. Video clips in encoded in MPEG-1 format are usually of a frame size 352x288 pixels and at 25 frames per second. This gives a fixed rate of 1.5 MB/sec for media transmission, with a maximum data rate of 3 MB/sec. However, the regular data rate for MPEG-1 is 1380 KB/sec. This (lower) rate is attainable across a Local Area Network, but not constantly achievable across the Internet. The main advantage on MPEG-1 nowadays, would be the hardware requirements for encoding/decoding, which are extremely low compared with modern processing power.
    MPEG-2 is a standard that was set up in 1995 as a superior successor to MPEG-1. The advantages of MPEG-2 were immediately obvious. The default resolution was doubled, maximum data rate jumped up to 8 MB/sec. So the quality of computer movies jumped forward a huge step, with the introduction of MPEG-2. The downside to MPEG-2 was that encoding/decoding was more hardware intensive than MPEG-1 and when you consider the regular data rate that MPEG-2 movies used (6500 KB/sec), it is obvious that MPEG-2 movies are not designed for any kind of remote playing. Therefore the usual applications of MPEG-2 are in DVD's and Digital TV, where file size is unimportant.
    The MPEG-4 standard was finalized in 1998/1999, and is the current state-of-the-art video compression technique. Basically MPEG-4 keeps to the MPEG-2 specification, but improves the quality and reduces the overall size of the file. The maximum data rate drops to between 5 and 10 MB/sec and the regular data rate becomes 880 KB/sec (which is lower then that of MPEG-1). Much like when MPEG-2 standards were announced, the hardware requirement for encoding and decoding are extremely high; but within 6 months this will not be a consideration. MPEG-4 is scalable over a wide area in both the audio and video stream. MPEG-4 offers superior quality video encoding at higher compression rates, so where is it being used?
  • Home users encoding DVD MPEG-2's into MPEG-4's on the hard disk (See DivX ;-) case study)
  • Audio on demand is possible using MPEG-4, as it only requires 16 KB/sec for broadcast.
  • Every though MPEG-4 is not mainstream yet, it is being achieved through Codec's

  • Possible future uses of MPEG-4:
  • A new DVD encoding standard
  • Movies being supplied on CD-ROM
  • Television on demand
  • Superior quality streaming video from Internet.

  • ASF
        Microsoft's newest standard for encoding video at a highly compressed rate is ASF. ASF stands for Active Streaming Format and files can be played locally, across a network or over the Internet without much loss in quality of picture or sound. The ASF compression ratio rivals that offered by such Codec's as DivX ;-) and SmR, with 100 minutes of film encoded into 330 MB of hard disk space. So why is this standard not as popular as other Codec based movies? Basically, there are so much anti-Microsoft feelings across the world; that computer movie enthusiasts opt for a standard that they want. Typically this standard has become DivX ;-) not only for the quality of the movies it produces, but for the quantity of websites providing information on DivX ;-). The ASF standard has one advantage over other Codec's, and that is the provision of ASX. ASX is the streaming interface for ASF files, a small bit of configuration on the web server and a small ASX file pointing to the relevant ASF file and you have a streaming ASF file across the Internet. Due to the small size of ASF files, this is a good way of steaming medium quality video clips across large distances; ASX files are now also being used to broadcast sound over the Internet (see http://www.phantomfm.com/). An example of a site that uses a large number of ASX and ASF files for video distribution, on a daily basis would be http://www.wwf.com/, where daily hits average 20,000.

    Real Media
        Real networks have long been the leader in streaming multimedia Internet content. RAM files are the common choice for radio stations that want to broadcast over the Internet. Using RAM files the output of a single source (e.g. Radio) can be compressed and sent out using very little bandwidth. This is a good way of broadcasting sound media, but no provision has been made for streaming video. Real networks own video encoded standard is called Real Media, with a compression ratio of 1 MB to 90 seconds of video at a very small screen size. This comes nowhere near the quality offered by other Codec's, so the best use of Real Media files seems to be in the distribution of cartoon video. There is a substantial market for this kind of video, with shows such as "The Simpson's", "Southpark" and "Futurama" currently big worldwide hits. The simple fact remains that RM files are far too big to be used for video of an hour in length or over. This file type is usually used for trailers and cartoons.

    QuickTime
        Apple has the QuickTime (MOV) format. This format is in many ways similar to Real Media file type. This is perhaps the most popular movie format for film trailers and music video downloads. The compression ratio offered by MOV files is 1 MB to 3.75 seconds for video and sound together. The reason for this huge file size is so that the file size can be altered without any noticeable loss in quality, a 320x240 music video can be expanded to full screen and still have perfect picture and sound quality. Music videos and film trailers are perfectly suited to this, where people could choose to watch in normal, double or full screen size. Encoding full-length films in MOV format is impractical, as the space requirements would be too great and people that watch films on PC's want them in full screen all the time.

    MP3
        It is impossible to talk about media development, and not mention the advantages that MP3 has introduced in comparison to the old WAV format. MP3 encoded sound files of 3:30 minutes in length are 4 MB in size, while the same file in WAV format will be over 45 MB. This excellent compression ratio is ideal for Internet distribution; this has developed all kinds of legal implications, due to "illegal" actions by services such as Napster. The main point that MP3 technology has made is that it is possible to make smaller files of better quality.



    Case Study: DivX ;-)

    The Birth of DivX ;-)
        Jerome Rota, a 27-year-old French film buff and video engineer who goes by the Internet nickname of "Gej", worked with a German hacker named "Max Morice" to rewrite Microsoft video software, so that anyone can use it to create compact DivX movies. He also coined the DivX name, which is officially written as DivX ;-) in a mocking reference to the earlier DVD standard DivX, which had stressed its anti-piracy features.
       DivX ;-) (In its PC form) is a hack of a Microsoft Video Codec that Rota was working on testing, but which was not included in the final release of Windows Media Player 6. Rota combined this Microsoft Codec, with MP3 technology to supply sound on the created movies. Considering that the Codec is effectively modified Microsoft code, you would expect them to be in the courts already, but Microsoft has said they are "examining the legal options". According to David Weeks, Windows ME product manager (UK): "They did not hack the Codec. They changed the formatting of the Codec to trick users and applications (such as Windows Media Player) into believing that DivX ;-) is a new format. … It is important to note that the people who created DivX ;-) took a short cut in using our Windows Media MPEG-4 video Codec." However, Microsoft have also said they will take action against anyone it catches pushing the DivX software. So, while on one hand Microsoft is claiming partial authorship of the Codec, but on the other hand they are not condoning its use. Interesting to say the least.

    Usage of DivX ;-)
        Currently the whole area of Internet movies is quite underground. Ripping a DVD is illegal. Putting a copy of a DivX ;-) encoded movie on a website is also illegal. So how has so much become available? Basically, the sites that mainly host movie downloads, or as they are called there: "Moviez", are Warez sites.
        Warez sites typically fund themselves with Pop-up windows opening on Porn sites, so surfing to find these "Moviez" can be quite dangerous in a work environment, and extremely off-putting. The actual files are usually located on large storage website's, such as I-drive, X-drive, Juston or MySpace. They are also split into manageable ~25MB chunks, so that reliable downloading is possible. These chunks must then be combined together to produce the output MPEG, typically using WinRAR or WinACE. So the process of obtaining movies encoded using DivX ;-) can be quite arduous, and as I will explain later, creating your own DivX ;-) MPEG's from DVD's can also take a serious amount of time.
        This usage of the DivX ;-) Codec is not unique; movie's encoded with other Codec's, such as nAVI and SmR are also distributed in the same fashion.
        The compression ratio offered by DivX ;-) is amazing. When you consider that 5.2GB can be reduced to between 600 and 700MB, this is quite impressive, but when you actually encode your own movie, the reality of this technology really his you. For example, I have an AVI movie clip 20.7MB in size, but when I encoded it to MPEG4 using DivX ;-), it reduced in size to 476KB! Admittedly there was not much motion in the clip, but the compression ratio of 44:1 is nothing short of amazing.
        To date there has not been a seriously simplistic tool written for generation of DivX ;-) movie's, steps to produce these movies are complicated, for people new to the technology. Currently the best tool is FlasKMPEG, and the process is described below, but the production of a user-friendly graphical and automated tool would greatly increased the popularity of DivX ;-).

    The Future of DivX ;-)
        Two words: Open Source. The second version of DivX ;-) (DivX Deux) was released as "OpenDivX" on the 15th of January 2001, at http://www.projectmayo.com/. As well as supplying an update to the DivX ;-) Codec, Project Mayo has numerous concurrent projects and plans for the future. OpenDivX is the new DivX ;-) Codec, but it is open source, so anyone can register, analyse the code and submit suggestions. Project Mayo also has a development group working on a player for all types of movie file (Not only DivX ;-) generated movies). The other big progression taken at Project Mayo is the writing of 'DivX for Mac' and even 'DivX for Playstation' curiously enough.


    STEPS TO RIP DVD INTO MPEG4 CD-ROM USING DIVX ;-)
    The DivX ;-) encoder can achieve near DVD quality MPEG-4 video at 10% to 20% of the original MPEG-2 DVD file size.

    Tools Required:
    DivX ;-) Codec http://divx.ctw.cc
    DVD Ripper (CSS)http://remco.xgov.net/dvd
    FlasKMPEG http://go.to/flaskmpeg
    VirtualDub http://www.geocities.com/virtualdub
    AVI2MPEG http://www.mnsi.net/~jschlic1/mpeg2.htm#avi2mpg1

    1- Use a CSS Descambler to copy your DVD to your Hard Drive, keeping the DVD structure. "DeCSS" basically breaks the superficial encryption used for movie DVD's, CSS stands for Content Scrambling System (very weak security system) This will create a DVD sized file (5.2GB) on your PC

    2- Convert Video to DivX ;-) AVI, using FlasKMPEG with the DivX ;-) plug-in option. Following simple instructions that come with the FlasKMPEG tool, you select the newly created DVD Rip as an input, then select the DivX ;-) Codec as output format and start the program. This process takes between 1 and 1.5 times the length of the input movie, depending on processor speed.
    (Fine-tuning)
    I recommend setting the destination size to a big value such a 640x352 for 16/9 pal.
    Use the Decode Audio Mode and select 44100 kHz.
    Select PCM compression for Audio
    Select the DivX ;-) Low or High for Video
    Set the Keyframe to 10 seconds
    Set the Compression Control to 100 (Crispness)
    Set the Data rate to 1h30=900 2h=750

    3- Use VirtualDub to compress and multiplex Audio with Video This is where the MP3 sound system is welded onto your movie.
    Select your AVI video file,
    Video -> Direct Stream Copy
    Audio -> Interleaving -> 500 ms of audio before video start -> Interleave audio every 500 ms
    Audio -> Compression -> Choose DivX ;-) Audio at 64Kbps for DivX ;-) Video
    Audio -> Full Processing Mode
    Save the final AVI

    4- Run AVI2MPEG to convert the final AVI into an MPEG (This step is optional)


    Piracy
        Computer piracy, be it in the form of software or movies, is widely known, and (dare I say it) accepted as a danger of the computer industry. Software piracy is huge, and any estimate on how much it is costing software manufacturers annually will every much under-estimated; according to one source (http://www.bbb.org/) this stands at $10 billion, but this estimate seems extremely conservative. Taking into consideration the amount of computers worldwide, and the percentage of these that are home computers for personal use, then there is no feasible way of calculating the volume of illegal software running on these PC's. There even exists a site that acts as a search engine for software cracks and serial numbers: http://astalavista.box.sk/.     Penalties for software piracy are ever increasing, but this does little to curtail the worldwide increase of illegal software distribution. Software piracy done "wilfully and for purposes of commercial advantage or private financial gain", risks criminal penalties of as much as $250,000 and jail terms of up to 5 years.
        Movie Piracy has never been a technologically advanced practice. To date the extent of this kind of piracy has been either someone in a cinema with a camcorder or someone copying a pre-release video. With the medium of the Internet the only obstruction to large file transfer is speed. Now, with such technologies as ADSL, cable modems and ISDN rolling out on a wide scale in the near future, downloading large files will become less of a consideration for potential pirates. Improving the underlying communication wires, introducing new faster technologies and using better download techniques will mean that large file downloads will become less of a problem in the future. Software such as "GetRight", "Download Accelerator Plus" and "Gozilla" allow multiple streams of download from one source and re-merging on the client machine. Using such software, you can tell your PC to download a certain file(s), disconnect and power off the PC when done. This effortless technology is where much of the Piracy fears stem from, because people will be slow to undertake difficult things, but when it becomes as easy as finding a URL, then why not download movies on to your PC?
        As for the desktop computing hardware that is required to realise this technology, with the advances in desktop computing power, regular PC's are capable of doing so much more with video. Modern CPU's are growing in clock speed every week, currently INTEL Pentium 4 processors are capable of encoded DivX ;-) movies at over 20fps in real-time. Inside 6 months this will reach 25fps, making DivX ;-) encoding on desktop PC's quite painless and probably more common. Processor stats Using a 'TV Out' card, you can plug your PC straight into the NTL socket in your house, and with the supplied software (some of which even include a remote control), watch TV through your PC monitor. This may seem a little impractical, but if you have a 17" or 21" monitor positioned prominently in a room, then why would you need a TV anymore? Add a DVD drive and a large collection of MP3's to the hard drive of the PC, and the computer becomes a whole home entertainment system. This IS feasible with current home computer specifications, computer manufacturers have seen this and are starting to offer PC's with TV tuner's and advanced sound systems (See the "Titan Sabre" at http://www.titanplc.com/ for an amazing stg£999).

    "Many of the mainstream news sites have run stories to the effect that DivX ;-) is going to do to video what MP3 did to audio"

        The above quote was the basis of an article that appeared in issue number 170 (October 2000) of PcPlus. The article made the point that with the ever-increasing bandwidth supplied by technological advances (such as ADSL), coupled with high-quality video available in manageably downloadable chunks: That downloading complete movies is a realistic threat to movie studios. I disagree, movie studios must be quick to embrace the new technology, and even use it to their own advantage.
        There was a 'Napster-like' application created in the last year, called "Scour-Exchange", which worked in the exact same way as Napster, but for video files. This service was closed down in December 2000, mainly because of the percentage of illegal content that was being exchanged. During its operation, we learned one thing; that the demand for net-based movies is there.
        Piracy is there and always will be, however, the volume of Internet movie piracy is proportional to the amount of patience that people have with wait for downloads (which is quite low). This is not yet a realistic threat to Hollywood movie studios, yet. Even though several large movie studios seem afraid of the implication of DivX ;-) and the possible millions in lost revenue from drops in DVD sales, the ball is firmly in their court to keep up with the technology. Personally I do not believe it will be too long (2/3 years) until these studios are offering streaming Internet movies themselves, before the DVD releases. The market for set-top boxes is set to explode, so video-on-demand is on the horizon. If the movie studios are afraid of loosing out, then they should keep up with the times and adapt accordingly.


    The Future
        By far and away the most popular Codec is the DivX ;-) Codec, now the second version of this Codec has been released (DivX Deux) with minor improvements. The creators of the Codec realise how popular it has become and how the best way to develop it for the future is through user input. That is why the source for the Codec is open and users/developers can contribute to its growth. Project Mayo is a group of sub-projects all based around the DivX ;-) Codec. These projects are the future of Codec's - Open source, Multi-platform and technologically advanced.
        The dedicated player project at Project Mayo is a nice idea, but it is going nowhere. Nobody can compete with the flexibility of Microsoft's Windows Media Player. Of all the projects currently starting at Project Mayo, perhaps the most interesting one is the development of a streaming capability to DivX. We are less than two years away from sustained download speeds of between 0.7 and 1 MB/sec, which is exactly the right bandwidth for streaming MPEG-4 (which needs approx. 880 KB/sec). So streaming MPEG-4 from the Internet to our home PC's IS a reality.
        Current DVD standards for encoding and security are quite weak. If a second generation of DVD were announced, using MPEG-4 for picture and MP3 for sound combined with a more advanced security system, then the possibilities a phenomenal. 5.2GB disks would be far too much for a movie, so the extras could be amazing. This also leaves the door open for interactive movies that are different each time you "play" them.
        Video-on-demand will be the next big revolution to hit home entertainment, and MPEG-4 is set to be the technology that will allow this development. Personally, I would now be surprised if Microsoft were to incorporate some DivX technology in the next release of Windows Media Player. Microsoft have already shown that they are willing to branch into the hardware market, with the Xbox - This could possibly lead to Microsoft set-top-boxes providing MPEG-4 video-on-demand using DivX or similar Codec techniques. Watch this space!


    Conclusion
        Video content is the most challenging of all forms of multimedia to compress due to the enormous amount of information it contains. While a high quality audio track can be compressed using algorithms such as MP3 to a rate of one or two hundred KBits/sec and still retain very high quality, compressed video has traditionally required much more bandwidth to attain an analogous level of perceptual quality. MPEG-2 offers the potential for extremely high quality video, but at the cost of several MB/sec of bandwidth. This is well within the capabilities of satellite broadcast channels and DVD storage and playback, but it falls short of the compression efficiency needed to enable distribution of full-length movies over the Internet. In particular, given that broadband Internet data rates are often well under 1 MB/sec, transmission of a stored movie in real time requires that the video coding rate be of equal or greater speed.
        Now with broadband Internet access to consumer households, via DSL or cable modem technologies. The number of U.S. homes with broadband access is estimated to be 5 million as of late 2000, and is expected to grow to 11 million by the end of 2001. Couple this with the move towards MPEG-4, which can operate at rates as low as 64 KB/sec (but with very significant degradation), this is possible as MPEG-4 was designed with video conferencing in mind among other things.
        MPEG-4 is only a framework. It specifies, for example, that motion compensation should be used to help code one video frame by using information from the previous frame, but it does not provide instructions to an implementer on how to perform motion compensation. There are dozens of areas of potential optimisation, allowing an infinite number of ways in which an MPEG-4 system architect can design MPEG-4 Codec's that improve on certain aspects (e.g. The DivX ;-) Codec uses MP3 technology for its sound).
        Codec's, or more importantly the technology introduced in Codec's, are the way forward for media development. While the base code that they work on is not always 100% legal, the code is written and worked on by people that use the technology on a daily basis.
        Sure Piracy is a big concern, but the future media development has been well flagged. The potential avenues open to would-be pirates can be closed now. More than this in fact, movie producers can learn from the pirate's efforts thus far and avail of this market as soon as possible. The possibility for a movie to go directly from the studio to our homes is here, who needs Xtra-vision or UCI?
        We can prepare for streaming MPEG-4 into our homes and offices. Our online experiences will become much more interactive and entertaining. Fire up your sound system, plug in the cable modem, buy your popcorn and get ready to be amazed by what your system can do.


    References:
  • PC Plus (#170) October 2000 - Article "Pirates to cause Movie mayhem?"
  • http://www.projectmayo.com/ - DivX Deux
  • http://www.bbb.org/ - Council of Better Business Bureaus
  • http://www.zdnet.com/ - For numerous articles on MPEG4 and Codec's
  • http://www.mydivx.com/ - For software and regular DivX ;-) updates.
  • http://www.tomshardware.com/ - For linked GIF on Pentium 4 DivX ;-) compression fps.
  • http://www.cselt.it/mpeg/ - For MPEG Technical Data


    © Ronan Crowley - Feburary 2001