Use any codec scheme you like. ffmpeg and mencode are the usual suspects, or Handbrake if you like GUIs to help you along.
Realtime encoding is within the reach of some schemes on some processors.
Realtime encoding is within the reach of some schemes on some processors.
Can you elaborate on that?
What sort of setup (hw/sw) would one need to make this viable (realtime encoding from the stream)?
P.S. See also https://trac.ffmpeg.org/wiki/HWAccelIntro