Giter Club home page Giter Club logo

qoimovie's Introduction

QOImovie - Using QOI format to encode video

This uses the QOI image format to save sequences of images

Tested on M1 macOS, but it should work fine most anywhere.

write a movie

qom *qm = qom_open( "out.qom", "w");
    gfx_canvas *c = gfx_canvas_new(400, 300);
    qom_putframe(qm, c, usec);
qom_close(qm);

write a movie in real time

qom *qm = qom_open( "out.qom", "w");
gfx_canvas *c = gfx_canvas_new(400, 300);
    qom_putframenow(qm, c);
qom_close(qm);

read a movie

qom *qm = qom_open( "out.qom", "r");
for(int frameno = 0; frameno<qom_getnframes(qm); frameno++) {
    double usec;
    gfx_canvas *c = gfx_getframe(qm, frameno, &usec);
    gfx_canvas_free(c);
}
qom_close(qm);

print

qom *qm = qom_open( "out.qom", "r");
qom_print(qm, "test");
qom_close(qm);

To make the program qomutil:

% make

To convert a series of png files into a QOI movie:

% ./qomutil -toqom 00.png 01.png 02.png test.qom

To read images from a QOI movie:

% ./qomutil -topng test.qom outfamily

To print a summary of a QOImovie:

% ./qomutil -print test.qom

To concatenate several .qom files:

% ./qomcat in1.qom in2.qom in3.qom out.qom

To test everything:

# make test

I'm thinking this could be a nice way to store animated icons and UI elements.

Adding multi-resolution support so the movie could be stored in any number of different sizes.

File format may be changing (a tiny bit) in the near future.

All suggestions welcome.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.