[Spice-devel] Few questions regarding Gstreamer

Victor Toso victortoso at redhat.com
Thu Aug 3 06:22:16 UTC 2017


Hi,

On Wed, Aug 02, 2017 at 08:15:06PM +0430, Armin Ranjbar wrote:
> Thanks for the answers!
>
> Can i force already existing versions of remote-viewer to use H264
> and/or different compression algorithm by changing libspice-server so
> that it only advertise certain codec/algorithms?

There is no implementation in the host to change video-codec yet. You
can see [0] for some easy way to change spice server code in a way that
every new stream would be encoded with h264.

[0] https://lists.freedesktop.org/archives/spice-devel/2016-July/030936.html

We do have an API called spice_server_set_video_codecs() [1] that QEMU
could call but there were discussions about the interface or
configuration that we should expose... The related thread is here [2].

[1] https://cgit.freedesktop.org/spice/spice/tree/server/reds.c#n4037
[2] https://lists.freedesktop.org/archives/spice-devel/2017-February/035480.html

Cheers,
    toso

>
> ---
> Armin ranjbar
> 
> 
> On Wed, Aug 2, 2017 at 7:24 PM, Victor Toso <victortoso at redhat.com> wrote:
> 
> > Hi Armin,
> >
> > Thanks for your questions.
> >
> > On Wed, Aug 02, 2017 at 06:56:07PM +0430, Armin Ranjbar wrote:
> > > Hello List,
> > >
> > > Thanks for the effort on Spice :)
> > >
> > > given recent changes by Victor, i'm not sure how can i verify that i'm
> > > actually using Gstreamer to encode or decode the stream:
> >
> > Things to consider:
> > - GStreamer is not default option for encoding
> > - You have to enable stream encoding [0] as it is disabled by default
> > - mjpeg is the default encoding/decoding video-codec
> >
> > [0] if you use libvirt, you can add streaming mode with:
> > virsh edit $domain
> >   <graphics type='spice' autoport='yes'>
> >     <streaming mode='all'/>
> >   </graphics>
> >
> > > 1> how can i make sure that server is using gstreamer to encode the
> > stream?
> > > setting GST_DEBUG and SPICE_DEBUG i can't see anything gstreamer specific
> > > in servers logs.
> >
> > There are pending work to better configuration in the host for that. The
> > easiest way is to use spicy and chose a video codec which is not mjpeg
> > (h264, vp8, vp9); Go to options > preferred video codec type > h264
> >
> > This will send a message to the spice server to use h264 instead of
> > mjpeg and only gstreamer can encode it.
> >
> > > 2> how can i make sure same thing happens on client side? again with
> > debug
> > > options, i can see that spicy is streaming using channel-display.c:1840
> > not
> > > channel-display-gst.c.
> >
> > You can also use mjpeg decoders in GStremear (it actually works well)
> > but you will need to build spice-gtk with --disable-builtin-mjpeg, so
> > every new stream will use gstreamer.
> >
> > Note that we don't stream all the content all the time. Video streams
> > start/stop based on detection of regions that have high frequency of
> > updates, you can check [1] for a better understanding.
> >
> > [1] https://youtu.be/C5ox_M-k63w
> >
> > >
> > > 3> afaik video encoding and compression selection is for now specific to
> > > spicy, how can i set these options using remote-viewer?
> >
> > The video-codec message is part of spice-protocol and implemented in
> > spice-gtk. We have an API in spice-gtk which spicy uses but none other
> > client does at the moment.
> >
> > The goal is to automatically detect which video codecs we can hw decode
> > in the client and send this to spice-server. That is not implemented
> > yet.
> >
> > > note that i'm building both spice and spice-gtk from latest git commit,
> > >
> > > ---
> > > Armin ranjbar
> >
> > Let me know if you have any issues or suggestions!
> >
> > Cheers,
> >     toso
> >
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170803/f2748a40/attachment-0001.sig>


More information about the Spice-devel mailing list