(Better) Full Motion Video On The First PC

Ladies

Ten years ago, [Trixter] created 8088 Corruption, a demo for the original PC, the IBM 5150, that displayed full motion video using a CGA card and a SoundBlaster. It was hailed as a marvel of the demoscene at the time, garnered tons of hits when it was eventually uploaded to Google Video, and was even picked up by the nascent Hackaday.Now, ten years later, and seven years after [Trixter] said full motion video using the graphics mode of a CGA adapter was impossible, he’s improved on his earlier work. Now, it’s possible to display video at 640×200 resolution at 30 frames per second on a 30-year-old computer.

[Trixter]’s earlier work used the text mode of the CGA adapter, only because the 40×25 character, 16 color mode was the only graphics mode that could be entirely updated every single frame. It’s still one of the high points of the PC demoscene, but from the original video, it’s easy to see the limitations.

A while back, [Trixter] said displaying video using his computer’s graphics mode was impossible. He’s had years to think about this statement, and eventually realized he was wrong. Like the developers of modern video codecs, [Trixter] realized you don’t need to change every pixel for every frame: you only need to change the pixels that are different from frame to frame. Obvious, if you think about it, and all [Trixter] needed to do was encode the video in a format that would only change dissimilar pixels from frame to frame, and manage the disk and memory bandwidth.

After reencoding the 10-year-old demo for graphics mode, [Trixter] turned toward his most ambitious demo to date: playing the ‘Bad Apple’ animation on an 8088. As you can see in the video below, it was a complete success.


42 thoughts on “(Better) Full Motion Video On The First PC

  1. This helps remind me just how LIMITED the old systems really were, and how much ingenuity went into making some of the software of the time possible.

    Granted that spirit is still alive today, it just does not feel as groundbreaking most of the time.

      1. Firstly, we assume he did not use libascii to encode a limited text stream:
        24fps * 640*200=307200 pixels
        Thats buffering 38400 bytes per second in black and white mode.
        In theory, he must buffer and display the stream from disk in under 100 operations..
        This gets less cpu intensive with basic stream decoding, bios disk access routines, and avoiding a triple frame buffer. Based on the compression artifacts it appears to be how its implemented.

      1. Seven minutes would be user time. CPU time would depend on just how far he’s pushed the machine with this. Probably it’s not quite loaded 100%, or we’d see it jumping now and then.

        1. If you read the blog entry, you’ll see that only the differences are updated per frame, and that the encoder can be ajusted to skip parts of a frame if it is decided there is not enough time to include all of it.

          So technically, the lack of jumping is an illusion based on prioritizing where to update each frame.

          The update time estimates are calculated by counting the number of cycles and machine language instructions reqiered to perform the update action.

  2. I’ve been on the internet for a very long time. I can remember seeing internet porn in about 1991 (!) that used some of the same techniques he used (encoding the differences between frames rather than the whole frame, for instance). However, he takes it a step further in that instead of encoding something to be parsed later, he’s using the data to generate machine code to be executed directly. It’s a neat idea, but a security nightmare.

    1. Delta encodings and run length encodings have been used since forever so seeing that in 1991 isn’t so strange? GIF was created in the 80 ies and was the most common distribution format of any type of animated material for a long time. Heck, it’s still a very common format!

      Security on a single user 8088 PC isn’t something to strive for – there isn’t any chance of adding any! No memory protection, no privileged execution mode and directly accessible (and documented!) structures makes anything that can be executed boss of the system.

    2. Autodesk Animator, released in 1989, used its own .fli format for video, in which frames other than the first one could be encoded with unchanged lines omitted, and the lines that changed run-length encoded; the whole line was included for even one changed pixel, which is simple, but inefficient. Later versions of the format added a two-layer version of that scheme, which first omitted unchanged lines, then omitted unchanged pixels within each changed line, but I’m not sure when that was introduced.

      And as Megol says, the fundamental concepts weren’t new then, although I don’t know an earlier implementation for video data specifically. Animated GIF is not much closer than the original .fli format, as it sends an entire rectangle per frame, including any unchanged pixels within that rectangle.

      1. mjpeg was one of the most popular codecs until very recently in security cameras/digital cameras/action cameras and webcams (even top of the line M$ lifecam still does it in fullhd)

        so no :)

        mjpeg is basically a bunch of jpeg images glued ass to mouth, one per frame of video = MPEG-1 with I-frames only, no delta encoding

        It is quite surprising whole industry rode on MJPEG instead of at least doing MPEG-1 with no motion estimation

  3. I don’t get it, what’s so impressive about it? My PC can play 50 youtube videos at the same time and it will still be able to do useful work. Old computers belong in dumpsters.

    1. This site is full of people that say “I can do that” and yet they don’t
      What good is a new computer if you only use it for trolling?

      Don’t visit HaD if you’re not interested in the contents.

  4. This reminds me of the very first time I saw actual full motion video on a computer, probably in 1994 or so, and it was this:
    https://www.youtube.com/watch?v=PPoYzwib7JQ
    An Amiga demo called 9 Fingers by Spaceballs, running off an 880k floopy disk inside my A500, which at the time blew my 14 year old mind.
    Computers at that time could do animation, but there was no way to get anything more complicated up on screen for more than a few seconds. the amount of resurces your computer is using to show that video is probably more than an entire computing lab back when that demo was made. An astounding piece of work.

    1. That was vector based in that demo. A genius way to compress “video” back in the day. You can even find the original source video online if you search youtube…

  5. Look up videos on youtube of cgi games and apps. See how low res the graphics are? the guy managed to pull out amazing video out of it and now he managed to get 30fps out of what was previously not thought possible. Almost as if you saw someone pull out highly pixelated video out of an atari (okay not the greatest comparison but you get the idea)

    Growing up with the ugly cgi graphics prior to ega and full on 256 vga you realize how amazing what this guy accomplished here. CGI was very rudimentary color palette.The fact he pulled out video out of that demo wise is an amazing feat.

    bringing a nostalgia flashback on inside me.

  6. It’s impressive, but like many things featured on this site, completely pointless.

    I’ve never understood why talented hardware engineers and programmers waste their time with projects that have no practical application. I mean it’s not art… it’s just a low res vid… it serves no purpose…. so why other than for bragging rights?

    1. Dear HowardC,

      They do it for the same reason that those two nerdy guys in your math class worked the extra credit problems when half the class didn’t even bother with the assigned homework, let alone understand how math could possibly apply to their lives. The same reason that drives certain athletes to go out and race against themselves, or that made our ancestors waste time trying to see what happened when you boiled wine and one day decided to catch the fumes to obtain the essence of the grapes (and potatoes and everything from urine to rice).
      So many hours wasted trying to make sparks, and get people drunk from the fumes of chemical compounds, not to mention taking dead bodies apart and make wings and see little bugs in the water and find out what those little dots of light in the sky at night were. All absolutely pointless… like using a coil of wire around a nail to pick up metal. One day some guy played around and found a way to make a switch turn itself back off. Absolutely useless, but then we played with it and found that we could count with wires… also pointless.

      I have a secret for you, my friend: Pointless is where the magic comes from.
      And those who can make magic don’t even think as critics do.
      Those who can fly see a different world than those who can’t.

      Pointless Projects require a facility in the brain (that most people lack) to be .

    2. As an ex amiga demo coder, i did it because there wasn’t much else to do, so it was a leisure pastime, sharpened my skillsets and i got to hang out with some seriously talented people. Basically paved my way to do game coding as well.

      I did/do it because, well, i could. I would think nothing of staying up for days cutting down a few bytes of code or slightly shorter processing time.

      Nice job Trixter

    3. @HowardC
      I will never understand how people type an entire “this is pointless” post without remembering what “fun” is and hitting cancel.

      All work and no play makes Jack a dull boy.

    4. Its certainly not pointless. Constrained systems are everywhere, and will be entering some very interesting places in the not too distant future. You may have noticed the solar powered LCD keychains that simply flash an image. How cool would it be to have live video on such a thing? Or what about Harry Potter style video trading cards, pictures, etc? The technology isn’t here yet, but it will be, and much sooner than otherwise with cool tricks like this.

  7. If I had seen that back in 81, I would have creamed my drawers, passed out, and come to (so to speak) in the local hospital, embarrassed by the state of my drawers and imploring a stone-faced psychologist to believe that I had seen the technology of a superior, alien intelligence.

    Sorry to be gross .. amazing demo ..

  8. I think its fantastic.
    I do the same every day, defeating hardware limits.

    People today have a problem and slam a 3GHz CPU on it and problem solved.

    The magic comes from doing the impossible with limited hardware.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

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