What are my options for simple video formats?

I play with a simple ray tracer and I would like to get a short animated clip. Right now I'm showing the scene in a bitmap. I would like the easiest movie format to be, as I probably have to implement it from scratch (in erlang). Animated gifs come to mind. Is there anything else that will provide the same bang for the buck? I'm not interested in fidelity or high compression.

PS: I would like to avoid rendering frames into separate files and merge them into GIF or AVI using an external tool like ImageMagick.

+4
source share
1 answer

Write a YUV4MPEG2 file or standard output, and then use ffmpeg to encode it for something reasonable. YUV4MPEG is an uncompressed format, and it's ridiculously simple, especially if you use non-interlaced 4: 4: 4.

Alternatively, use Motion JPEG , which is basically a collection of JPEG frames in a container. Many (though not all) video players can play MJPEG directly. I am sure that you already have access to the JPEG encoder, so traversing multiple JPEG frames into the MJPEG stream is relatively simple.

+3
source

All Articles