<div><div>I want to hard-code the video by gstreamer-vaapi but failed. Here is my system environment and modify:</div><div>1. ubuntu 16.04 desktop</div><div><br></div><div>2. apt install gstreamer1.0-vaapi  libgstreamer1.0-dev gstreamer1.0-tools gstreamer1.0-plugins-base libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-plugins-bad  gstreamer1.0-libav</div><div><br></div><div>3.Modify server/reds.c   </div><div>    default_video_codecs[] = "gstreamer:h264;"    </div><div>  Modify server/gstreamer-encoder.c</div><div>    case SPICE_VIDEO_CODEC_TYPE_H264: return "vaapih264enc";</div><div>    case SPICE_VIDEO_CODEC_TYPE_H264: gstenc_opts = g_strdup("");</div><div><br></div><div>When I play the video, the /var/log/libvirt/qemu/win7.log output:</div><div>   gstreamer-encoder.c:831:handle_pipline_message: GStreamer error from element encoder: Could not initialize supporting library.</div><div>   gstreamer-encoder.c:1122:configure_pipline: Gstreamer error: unable to set the pipeline to the playing state.</div><div><br></div><div>when I set GST_DEBUG=2 , it will output videoencoder gstvideoencoder.c:1534:gst_video_encoder_change_state:<encoder> error: Failed to open encoder.</div><div><br></div><div>In addition,When I build spice and kvm in the same way as Ubuntu18.04</div><div>The log report "gstreamer-encoder.c:985:create_pipeline: GStreamer error: no element "vaapih264enc" "   ,  but I check "gst-inspect-1.0 , vaapih264enc", it exists.</div><div><br></div><div>What did I do wrong or what else do I need to set?</div><div>Looking forward to your reply.</div><div>Thank you!</div></div>