adjust size and quality (-v) down if encoding is slower than realtime and your cpu core is maxed out. go up with them if your cpu is not loaded above 50% and video is fluid but ugly. if the encoding cannot keep up with real time, you will have drops in the stream. watch the second timers in the shell - they should both be at almost the same values.

We can paste the above code into a script and run it with freej -j stream.js

Besides tweaking this scripts for various accounts it is also possible to include it as part of a bigger FreeJ script, to mix multiple sources with text and effects and even control it from a MIDI, OSC or Joysticks...