I'm playing around with a simple ray tracer and I would like to end up with a short animated clip. Right now I'm rendering the scene to a bitmap. I would like the simplest motion picture format possible since I'll probably have to implement it from scratch (in erlang). Animated gifs come to mind. Is there anything else that would provide the same bang for the buck? I'm not interested in fidelity or high compression.
PS: I would like to avoid rendering the frames into individual files and combining them into a GIF or an AVI with external tool like ImageMagick.
Write YUV4MPEG2 to a file or to standard output, and then use ffmpeg to encode it to 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 bunch of JPEG frames in a container. Many (though not nearly all) video players can play MJPEG directly. I'm sure you already have access to a JPEG encoder, so turning a bunch of JPEG frames into an MJPEG stream is relatively simple.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With