<div dir="ltr"><div>Thanks for the response Victor, <br></div><div><br></div><div>I guess from my limited (user) perspective I don't have much to contribute, but it's good to know I wasn't doing anything wrong and support could come in a later release. <br></div><div><br></div><div>Cheers!<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 30 Jul 2021 at 22:02, Victor Toso <<a href="mailto:victortoso@redhat.com">victortoso@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
On Mon, Jun 21, 2021 at 05:04:59PM +0700, Noah O'Donoghue wrote:<br>
> Hi all,<br>
> <br>
> I'm trying to use gstreamer with spice to encode/decode video,<br>
> as I think it will be much faster and smoother than MJPEG,<br>
> <br>
> I've installed these packages on both client and server (Ubuntu 20.04)<br>
> gstreamer1.0-plugins-base<br>
> gstreamer1.0-plugins-good,<br>
> <br>
> And with remote-viewer --spice-debug I can see that my<br>
> client/server are advertising a range of protocols (including<br>
> H264)..<br>
> <br>
> But for some reason it only uses MJPEG..?<br>
> <br>
> Any ideas?<br>
<br>
You need configure the server to do the encoding, that is not<br>
enable by default. You can see in the code [0] that spice:mjpeg<br>
is preferred and gstreamer is only enabled if spice compiled with<br>
gstreamer.<br>
<br>
The second thing to keep in mind is how to set the preference of<br>
video encoding with mjpeg. The application using spice should<br>
use spice_server_set_video_codecs() introduced at [1] API but<br>
QEMU never got to implement that so you are a bit limited to how<br>
to configure that on the host side.<br>
<br>
As you have mentioned, there is some support in the protocol to<br>
configure the server based on client's requests. It was<br>
implemented first as a testing tool, to exchange video-codec on<br>
the fly and later it could be used to rank video-codec based on<br>
client's capabilities for hw decoding. You can test that in spicy<br>
testing tool, there is a radio button list that you can reach<br>
from the Menu. Sadly, this feature did not reach the stage we<br>
wanted in order to implement for other clients like virt-viewer.<br>
<br>
[0] <a href="https://gitlab.freedesktop.org/spice/spice/-/blob/master/server/reds.cpp#L3425" rel="noreferrer" target="_blank">https://gitlab.freedesktop.org/spice/spice/-/blob/master/server/reds.cpp#L3425</a><br>
[1] <a href="https://gitlab.freedesktop.org/spice/spice/-/commit/497fcbb0a" rel="noreferrer" target="_blank">https://gitlab.freedesktop.org/spice/spice/-/commit/497fcbb0a</a><br>
<br>
Sorry delay.<br>
<br>
Cheers,<br>
Victor<br>
</blockquote></div>