how to enable h264 codecs in spice server?

780 Views Asked by At

I'm new to spice-server source code. And I want to test streaming codecs of SPICE. I have tried streaming-video=all option to enable streaming codecs, but it's only mjpeg. I know spice server is able to stream in h.264. But I don't know how to enable it. Any suggestion please?

1

There are 1 best solutions below

0
On
// reds.cpp
// Modify the default codecs, set 'gstreamer:h264;' to be the first.
static const char default_video_codecs[] = "gstreamer:h264;" GSTREAMER_CODECS;

Notice: you need set up gstreamer lib first. SPICE-SERVER will check the gstreamer lib. Also, your spice client should also support gstreamer:h264.

If not, SPICE SERVER will use default MJPEG codecs as fallback.(Details found: video-stream.cpp file, dcc_create_video_encoder function)