As defined by:
https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#open-h-264-encoding
The noVNC HTML application recently added support for this encoding. There is
also an open pull request to add audio support to noVNC:
https://github.com/novnc/noVNC/pull/1952
With that in place, the web based VNC console is good enough to display
a VM showing a video with reasonable bandwidth.
Possible improvements:
- Decide whether we should allow --gst-* arguments on the command line
- Dynamic switching to/from H264 mode at high change rates
We may also extend the RFB Audio protocol with "opus" encoding, because uncompressed
audio need too much bandwidth.
Changes in v4:
- style fixes and cleanup (as suggested by Marc and Daniel)
- use SPDX-License-Identifier for new file
- protect everything with #ifdef CONFIG_GSTREAMER
- simplify vnc_refresh as suggested by Daniel (avoid populating
the rectangle array, do not use vs after it might be freed)
- make "h264" a boolean option
- add new "h264-encoders" options (colon separated)
- add a cleanup path for vnc instead of using shutdown notifiers.
Changes in v3:
- add license header
- sqash patch to remove libavcodec prefix
- use gst_clear_object and goto error
- use single g_object_set
- g_autoptr/g_new0
- document vnc_h264_send_framebuffer_update returnm value
- avoid mixed declarations
- use loop to retrieve samples
- initialize gst during argument processing
- add hardware encoders
Changes in v2:
- cleanup: h264: remove wrong libavcodec_ prefix from function names
- search for available h264 encoder, and only enable h264 if a
encoder is available
- new vnc option to configure h264 at server side
Dietmar Maurer (8):
new configure option to enable gstreamer
vnc: initialize gst during argument processing
add vnc h264 encoder
vnc: h264: send additional frames after the display is clean
h264: search for available h264 encoder
h264: new vnc options to configure h264 at server side
h264: add hardware encoders
h264: stop gstreamer pipeline before destroying, cleanup on exit
include/ui/console.h | 1 +
meson.build | 10 +
meson_options.txt | 2 +
scripts/meson-buildoptions.sh | 3 +
system/runstate.c | 2 +
system/vl.c | 8 +
ui/meson.build | 1 +
ui/vnc-enc-h264.c | 358 ++++++++++++++++++++++++++++++++++
ui/vnc-jobs.c | 53 +++--
ui/vnc.c | 80 +++++++-
ui/vnc.h | 29 +++
11 files changed, 529 insertions(+), 18 deletions(-)
create mode 100644 ui/vnc-enc-h264.c
--
2.39.5