Revolver is a digital video synthetiser. It inputs valid c++ code snippet and turns it into a values/pixels. Something similar as GLSL is doing to your screen on GPU but computed and dumped onto disk by CPU.
Q: That is crazy.. why would you do that? ..it is so much slower
A: Yup, but it is sort of tricky to get 16-bits-per-channel pixel out of your GPU ..and it is much more fun! ;)
-i formula.txt
setting input program textfile-o output.mkv
setting output videofile
-s 720x576
output size-f 1998x1080
actual framesize (adding letterboxes / pilarboxes to-s
)-r 24000/1001
or i.e.-r 23.97602397602397602397
to set framerate (defaults on PAL 25)-p yuv444p16le
setting pixelformat of the output (seeffmpeg -pix_fmts
for full list)-t 3600
how much seconds to render i.e.-t 01:30:00
gives 1 hour and half-q 1
do no show live preview (render mode)
Is basicly the body of C++ function, triggered once for each rendered pixel per frame rendered. There is some preprocessing going on which gives you following variables:
R
red pixel valueG
green pixel valueB
blue pixel valuemax
default to 65535 which is maximum value in color-range in 16-bitx
x coordinate of current pixely
y coordinate of current pixelframeCount
number of frames passedwidth
width of pixel areaheight
height of pixel areapixels[]
access to all pixel values
Roughly speaking any of valid C++ code is allowed here. For instance you can use math i.e. including <math.h>
functions as well. If you need to extend libraries used by this snippet add them to blueprint.h
file. Defining classes or other functionas are so far out of scope, it is quite easy to extend it if needed.
If the code is invalid it will prints out compiler error to console.
ffmpeg
swiss army knife for videompv
modern videoplayerg++
c++ compiler
git clone https://github.com/K0F/revolver
cd revolver
make
./revolver -i formulas/1.txt -s 4096x2160 -p yuv444p16le -r 24 -o My4kBlockBuster.mkv
It outputs FFV1 codec in Matroška container, later you can convert such MASTER into DPX series, DCP or ProRes to use it in whatever professional video editor of your choice.
It works on Linux only (MacOs would possibly do as well, untested)
Kryštof Pešek aka kof, 2019