[Spice-devel] question: how to test the gstreamer:h264 with qemu ?
Frediano Ziglio
fziglio at redhat.com
Thu Aug 4 12:58:14 UTC 2016
> > -----Original Message-----
> > From: cfergeau at redhat.com [mailto:cfergeau at redhat.com]
> > Sent: Friday, July 29, 2016 4:19 PM
> > To: Li, ZhijianX <zhijianx.li at intel.com>
> > Cc: gouget at codeweavers.com; Spice-devel at lists.freedesktop.org
> > Subject: Re: [Spice-devel] question: how to test the gstreamer:h264 with
> > qemu ?
> >
> > On Fri, Jul 29, 2016 at 08:10:46AM +0000, Li, ZhijianX wrote:
> > >
> > > > -----Original Message-----
> > > > From: cfergeau at redhat.com [mailto:cfergeau at redhat.com]
> > > > Sent: Friday, July 29, 2016 3:17 PM
> > > > To: Li, ZhijianX <zhijianx.li at intel.com>
> > > > Cc: gouget at codeweavers.com; Spice-devel at lists.freedesktop.org
> > > > Subject: Re: [Spice-devel] question: how to test the gstreamer:h264
> > > > with
> > > > qemu ?
> > > >
> > > > Hey,
> > > >
> > > > On Fri, Jul 29, 2016 at 03:05:21AM +0000, Li, ZhijianX wrote:
> > > > > Hello guys,
> > > > >
> > > > > Recently, I found that spice have supported gstremer:h264 encoding,
> > > > > so
> > I
> > > > want to have a try.
> > > > > But I'm not sure how to test this feature(I am a spice newbie)
> > > > >
> > > > > If I play a h264 encoding video in the guest, how can I *confirm*
> > > > > that
> > > > > the gstremer:h264 works or not ?
> > > > >
> > > > > If I miss something, please let me know.
> > > > > Below is my environment:
> > > > > Host, Ubuntu 16.04 lts
> > > > > 1. guest
> > > > > Win7 +" Red Hat QXL GPU(6.1.0.10020)"
> > > > > 2. qemu
> > > > > Branch: master + gstreamer related
> > > > > patch(https://lists.freedesktop.org/archives/spice-devel/2015-May/0197
> > > > > 71.html) Start qemu with " -spice video-codes=gstreamer:h264" options
> > > > > 3. spice
> > > > > Branch: master(comit: 29caba2)
> > > > > Configuration with "--enable-gstreamer=1.0"
> > > > > 4. spice-gtk
> > > > > Branch: master(commit: 9b82e92)
> > > > > Configuration with "--enable-gstvideo=yes"
> > > > > 5. spice-protocol
> > > > > Branch: master
> > > >
> > > > Usually I just change default_video_codecs in
> > > > spice-server/server/reds.c
> > so
> > > > that it starts with gstreamer:h264.
> > > That's interesting :)
> > > More question: Does the spice-client side(remote-viewer) or the guest
> > > driver need some special options to notify the client
> > > to use the gstreamer:h264.
> >
> > Once the streaming code triggers, use of h264 instead of mjpeg should be
> > automatic if both the server and the client have the required gstreamer
> > plugins.
> In addition to hacking the default_video_codecs, it seems that we need to set
> the qemu spice option 'streaming-video=filter'
> Which is 'off' by default, to trigger the gstreamer:h264, right ?
>
> And how the libspice can know the guest is playing a video instead of staying
> at a static screen, is there a PV driver to
> tell the backend ?
>
> Thanks
> Zhijian
At the moment guest send screen updates in the form of copy operations
(bitblt) and spice-server track similar request for a while and if it found
(this is a rough description) that the same area is changed frequently for
a while with similar copy operation build a stream and start using video
encoding instead of sending draw commands.
In the Perfect World (TM) guest will send the video stream directly to
the client without server using much CPU. Detecting this would require to
have a driver in the client which support streaming (like VAAPI or DirectX VA)
to get the byte stream from the guest. Possibly the guest could read back
the decoded video so in the real world most likely client AND spice-server
would have to do the decoding but this would avoid
decoding (guest) -> encoding (server) -> decoding (client)
for a
byte stream (guest) -> decoding (server) -> decoding (client)
Frediano
More information about the Spice-devel
mailing list