   video loading VS bmp succesion loading
  Hello!I have to code something to display an animation in a texture in a openGL program and I hesitate about the media to use to contain the animation: a video or a succesion of images.I think that a succesion of bmp would be better for me. Here are my pros:- I need it to be loaded fast and I think that the bmp files will be loaded faster, since the information is not compressed and the program almost just have to fread the file.- the pixels of a bmp takes the same size in the RAM that the ones of a video frame, even if they are compressed in the file, because it is uncompressed in the RAM to be used as a texture (please tell me if I am wrong!!!)- I am afraid that, with videos, loading a frame when its previous frame has not be loaded is slow, because it must be computed since the last key frame. Thus, loading a video is slow if there are jump in time or if the video is read in reverse.My Cons: if the animation is quite long, the bmp files will take a lot of space on the disk. However, I do not think it will bother me.Please tell me what you think about it and if I have mistakes in my statements!!!Thanks!!!   
  As far as the raw size of the file, smaller is usually better, even if you have to decompress -- Hard disks (even RAM) is ungodly slow compared to the CPU. If you don't use compression, the CPU is just waiting around for data -- its quicker to load compressed data and let the CPU decompress it as it comes off the disk. Also, if you're going to be putting it onto a texture, don't use bitmap if you're set on the succession of images idea, use whatever compression scheme your hardware/API supports.A proper video codec is going to give the best filesize, as it can amortize data across an additional dimension (time, a.k.a. frames).   ;  OK, thank you!I am looking at the video option. Does somebody know a good lib to get the frames of a video? Any video codec will suit me!   ;  If you DXT1 compress the frames, and the individual frames aren't too big, performance and memory use can be better than a proper video codec. You can fit 8 of those frames in the space of one RGBA buffer of the same size, and I'd expect a video codec to need two of them, if not more...   ;Quote:Original post by XemameI am looking at the video option. Does somebody know a good lib to get the frames of a video? Any video codec will suit me!OpenCV might be able to help you out with that (it's in the highgui part of it).   ;  @ Adam_42: do you mean using a succession of images in DXT1 (without compression in time) is faster than a video?@ Gorax: I do not know if OpenCV is the best for videos, but it must be one of the best for documentation!   ;  Yeah DXT1 without any extra compression on top, is essentially free to decode because the GPU will do it all for you.   ;  OK, thank you!Do other people have an opinion about the succession of images in DXT1 VS video?Thanks!!!   