Playing FLC/FLI movies in Allegro.
Rich Romer

I tried doing what the allegro maunal says to do for playing a FLI/FLC movie, but it never works. I think im missing something silly.

Can someone post up a small code snippit on how to get a FLC/FLI movie to play.

the manual says to do:

/* Let users skip looped animations. */
      int check_escape_key(void)
      {
         if (key[KEY_ESC])
            return 1;
         else
            return 0;
      }
      ...
         int ret = play_fli("animlogo.fli", screen, 1,
                             check_escape_key);
         if (ret == FLI_ERROR)
            abort_on_error("Error playing intro!");

btw: i made my movie in VidoMach, and it created a file called Movie.flc, thats what im using in my code.

Kitty Cat

FLIC animations/movies are typically not very size efficient. As I understand it, modern FLICs are a bit different from what Allegro supports. Specificly non-8-bit video and slightly different compression.

The good news is though, that there are add-ons that use formats more suitable for video that compress much better than FLIC. APEG (see my sig; supports MPEG-1 and Ogg Theora), AllegAVI (Windows-only; supports Video for Windows codecs), MJPGAlleg (supports the somewhat-obscure Motion-JPEG format), are a couple I can think of off-hand.

A J

i have written some extenstions to FLC code, for testing common problems that occur when software like VideoMach add there own packets, or add packets that are not documented (some software even tries to add packets from the FLX format, into FLC files).

if the movie.flc is not too big, can you provide me a link to it, i'll test it out, see if it runs on my system.

As kittycat said; there are better formats.
FLC is good when lossless small animations are required..
but once you get to about 30k FLC, your file effeciency is really over extended, and you should be considering other formats, like (for lossless: AVI+lossless codec), for lossy, MPEG1, or AVI+any codec.. codecs like Indeo are good, because they are typically on all windows machines already, and are better than the other default codecs on windows machines.

If your looking for open source solutions or linux or cross-platform solutions... listen to Kittycat.

Thread #560102. Printed from Allegro.cc