Re: [PATCH v3 2/9] add vnc h264 encoder

2025-04-24 Thread Dietmar Maurer
> > To be more specific, it is either a x264 encoder bug, or a web > > browser (VideoEncoder api) bug. You can reproduce it with noVNC. > > > > Form what I found out, newer versions of x264 do not use the problematic > > mode at all (but we want to support older versions). > > Do you have exampl

Re: [PATCH v3 2/9] add vnc h264 encoder

2025-04-24 Thread Daniel P . Berrangé
On Fri, Apr 18, 2025 at 01:29:46PM +0200, Dietmar Maurer wrote: > This patch implements H264 support for VNC. The RFB protocol > extension is defined in: > > https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#open-h-264-encoding > > Currently the Gstreamer x264enc plugin (software enco

Re: [PATCH v3 2/9] add vnc h264 encoder

2025-04-24 Thread Daniel P . Berrangé
On Thu, Apr 24, 2025 at 12:39:22PM +0200, Dietmar Maurer wrote: > > > +g_object_set( > > > +vs->h264->gst_encoder, > > > +"tune", 4, /* zerolatency */ > > > +/* > > > + * fix for zerolatency with novnc (without, noVNC displays > > > + * green stripes) > >

Re: [PATCH v3 2/9] add vnc h264 encoder

2025-04-24 Thread Dietmar Maurer
> > +g_object_set( > > +vs->h264->gst_encoder, > > +"tune", 4, /* zerolatency */ > > +/* > > + * fix for zerolatency with novnc (without, noVNC displays > > + * green stripes) > > + */ > > +"threads", 1, > > It seems a bit dubious for QEM

Re: [PATCH v3 2/9] add vnc h264 encoder

2025-04-24 Thread Daniel P . Berrangé
On Thu, Apr 24, 2025 at 11:28:34AM +0200, Dietmar Maurer wrote: > > > > > +void vnc_h264_clear(VncState *vs) > > > > > +{ > > > > > +if (!vs->h264) { > > > > > +return; > > > > > +} > > > > > > > > unnecessary > > > > > > This is required. For example if you disable h264, vs->h264 i

Re: [PATCH v3 2/9] add vnc h264 encoder

2025-04-24 Thread Dietmar Maurer
> > > > +void vnc_h264_clear(VncState *vs) > > > > +{ > > > > +if (!vs->h264) { > > > > +return; > > > > +} > > > > > > unnecessary > > > > This is required. For example if you disable h264, vs->h264 is > > always NULL, and we unconditionally call vnc_h264_clear(). > > > > Why do yo

Re: [PATCH v3 2/9] add vnc h264 encoder

2025-04-24 Thread Daniel P . Berrangé
On Thu, Apr 24, 2025 at 10:43:21AM +0200, Dietmar Maurer wrote: > > > On 24.4.2025 09:32 CEST Dietmar Maurer wrote: > > > > > > > > +gst_object_ref(vs->h264->source); > > > > +if (!gst_bin_add(GST_BIN(vs->h264->pipeline), vs->h264->source)) { > > > > +gst_object_unref(vs->h264-

Re: [PATCH v3 2/9] add vnc h264 encoder

2025-04-24 Thread Dietmar Maurer
> On 24.4.2025 09:32 CEST Dietmar Maurer wrote: > > > > > +gst_object_ref(vs->h264->source); > > > +if (!gst_bin_add(GST_BIN(vs->h264->pipeline), vs->h264->source)) { > > > +gst_object_unref(vs->h264->source); > > > +VNC_DEBUG("Could not add source to gst pipeline\n");

Re: [PATCH v3 2/9] add vnc h264 encoder

2025-04-24 Thread Daniel P . Berrangé
On Thu, Apr 24, 2025 at 08:19:25AM +0200, Dietmar Maurer wrote: > > > > > +VNC_DEBUG("Could not add source to gst pipeline\n"); > > > > > +goto error; > > > > > +} > > > > > + > > > > > +gst_object_ref(vs->h264->convert); > > > > > +if (!gst_bin_add(GST_BIN(vs->h264->pip

Re: [PATCH v3 2/9] add vnc h264 encoder

2025-04-24 Thread Dietmar Maurer
> > +gst_object_ref(vs->h264->source); > > +if (!gst_bin_add(GST_BIN(vs->h264->pipeline), vs->h264->source)) { > > +gst_object_unref(vs->h264->source); > > +VNC_DEBUG("Could not add source to gst pipeline\n"); > > +goto error; > > +} > > If you put the gst_obj

Re: [PATCH v3 2/9] add vnc h264 encoder

2025-04-23 Thread Dietmar Maurer
> > > > +VNC_DEBUG("Could not add source to gst pipeline\n"); > > > > +goto error; > > > > +} > > > > + > > > > +gst_object_ref(vs->h264->convert); > > > > +if (!gst_bin_add(GST_BIN(vs->h264->pipeline), vs->h264->convert)) { > > > > > > Can you use gst_bin_add_many() ? >

Re: [PATCH v3 2/9] add vnc h264 encoder

2025-04-23 Thread Daniel P . Berrangé
On Fri, Apr 18, 2025 at 01:29:46PM +0200, Dietmar Maurer wrote: > This patch implements H264 support for VNC. The RFB protocol > extension is defined in: > > https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#open-h-264-encoding > > Currently the Gstreamer x264enc plugin (software enco

Re: [PATCH v3 2/9] add vnc h264 encoder

2025-04-23 Thread Marc-André Lureau
Hi On Wed, Apr 23, 2025 at 3:46 PM Dietmar Maurer wrote: > > > On 19.4.2025 07:24 CEST Marc-André Lureau > > wrote: > > > > > > Hi > > > > On Fri, Apr 18, 2025 at 3:41 PM Dietmar Maurer wrote: > > > > > > This patch implements H264 support for VNC. The RFB protocol > > > extension is defined i

Re: [PATCH v3 2/9] add vnc h264 encoder

2025-04-23 Thread Daniel P . Berrangé
On Fri, Apr 18, 2025 at 01:29:46PM +0200, Dietmar Maurer wrote: > This patch implements H264 support for VNC. The RFB protocol > extension is defined in: > > https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#open-h-264-encoding > > Currently the Gstreamer x264enc plugin (software enco

Re: [PATCH v3 2/9] add vnc h264 encoder

2025-04-23 Thread Dietmar Maurer
> On 19.4.2025 07:24 CEST Marc-André Lureau wrote: > > > Hi > > On Fri, Apr 18, 2025 at 3:41 PM Dietmar Maurer wrote: > > > > This patch implements H264 support for VNC. The RFB protocol > > extension is defined in: > > > > https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#open-h-

Re: [PATCH v3 2/9] add vnc h264 encoder

2025-04-18 Thread Marc-André Lureau
Hi On Fri, Apr 18, 2025 at 3:41 PM Dietmar Maurer wrote: > > This patch implements H264 support for VNC. The RFB protocol > extension is defined in: > > https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#open-h-264-encoding > > Currently the Gstreamer x264enc plugin (software encoder)

[PATCH v3 2/9] add vnc h264 encoder

2025-04-18 Thread Dietmar Maurer
This patch implements H264 support for VNC. The RFB protocol extension is defined in: https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#open-h-264-encoding Currently the Gstreamer x264enc plugin (software encoder) is used to encode the video stream. The gstreamer pipe is: appsrc ->