<div><div>Hello, </div><div>Thanks for your response, you are right,I am using Intel vGPU and running a Windows7 guest. So I am not clear how to using streaming-agent in Window 7 guest. Next I will try linux as the guest.</div><div><br></div><div>Intel provides a dma-buf of the host at 30ms intervals(the dma-buf is full-screen size), spice-server's commands tree is used for video stream detection. My idea is capture guest video stream(use plugin) and send to client direct, do not use spice-server's commands tree for video stream detection.At present, it is in the pre-research stage.</div></div><div><br></div><div>BR.</div><div><includetail><div> </div><div> </div><div style="font:Verdana normal 14px;color:#000;"><div style="FONT-SIZE: 12px;FONT-FAMILY: Arial Narrow;padding:2px 0 2px 0;">------------------ Original ------------------</div><div style="FONT-SIZE: 12px;background:#efefef;padding:8px;"><div id="menu_sender"><b>From: </b> "Uri Lublin"<uril@redhat.com>;</div><div><b>Date: </b> Mon, Apr 16, 2018 07:45 PM</div><div><b>To: </b> "孙得霖"<kong.delin@embedway.com>; "spice-devel"<spice-devel@lists.freedesktop.org>; <wbr></div><div></div><div><b>Subject: </b> Re: [Spice-devel] not clear how to use streaming agent</div></div><div> </div><div style="position:relative;">On 04/12/2018 05:37 AM, 孙得霖 wrote:<br>> hi,<br>>      I use spice for remote view, I want to captures the guest video <br>> output, encodes it and send through, so I choose streaming agent, how to <br>> build and run it is not clear, can you help me?<br>> <br>> 1.host environment and Software version:<br>> centOS(Mini install)<br>> GVT-g kernel:      https://github.com/intel/gvt-linux/  (branch: <br>> topic/dmabuf)<br>> QEMU:              https://github.com/intel/igvtg-qemu  (branch: qa/dma_buf)<br>> streming agent:    https://gitlab.com/spice/spice-streaming-agent<br>> spice-server       version:0.13.3<br>> spice-protocol     version:0.12.12<br>> <br>> 2.build info<br>> kernel:<br>> make -j 8<br>> make modules_install && make install<br>> reboot<br>> <br>> qemu:<br>> ./configure --prefix=/usr --enable-kvm --disable-xen --enable-debug-info <br>> --enable-debug --enable-sdl --enable-vhost-net --enable-spice <br>> --disable-debug-tcg --enable-numa --enable-libusb --enable-curl <br>> --enable-usb-redir --enable-linux-aio --target-list=x86_64-softmmu <br>> --enable-gtk --with-gtkabi=3.0<br>> make -j 8<br>> cd roms/seabios<br>> make -j 8<br>> cd -<br>> make install<br>> cp roms/seabios/out/bios.bin /usr/bin/bios.bin<br>> <br>> spice-protocol:<br>> ./configure --prefix=/usr<br>> make -j 8<br>> make install<br>> <br>> spice-service:<br>> ./configure  --prefix=/usr --enable-manual=no --disable-silent-rules <br>> --disable-smartcard --disable-celt051 --enable-client CFLAGS="-g -O0" <br>> CXXFLAGS="-g -O0"<br>> make -j 8<br>> make install<br>> <br>> streming agent<br>> ./autogen.sh<br>> make -j 8<br>> make install<br>> <br>> 3.run qemu<br>> /usr/bin/qemu-system-x86_64 \<br>> -m 8192 \<br>> -smp 4,sockets=1,cores=4,threads=1 \<br>> -M pc \<br>> -name win71 \<br>> -hda /Image/vm/win7_base.img \<br>> -bios /usr/bin/bios.bin -enable-kvm \<br>> -k en-us \<br>> -vga none \<br>> -display egl-headless \<br>> -spice disable-ticketing,port=6901,streaming-video=off \<br>> -machine kernel_irqchip=on,usb=on \<br>> -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 \<br>> -cpu host -device usb-tablet \<br>> -device <br>> vfio-pci,sysfsdev=/sys/bus/pci/devices/0000:00:02.0/5b8d581a-2dc9-11e8-8238-000906258002,x-display=on,x-igd-opregion=on<br>> -device <br>> virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel1,id=channel1,name=org.spice-space.stream.0 <br>> -chardev spiceport,name=org.spice-space.stream.0,id=charchannel1<br>> <br>> questions:<br>> I am not clear How to use streaming agent and validate it, can you help me?<br><br>Hello,<br><br>So, you are using Intel vGPU and running a Windows 7 guest.<br><br>Theoretically, spice-streaming-agent can do what you want, run<br>on the guest to capture the video and send it via SPICE to the client.<br><br>But, currently spice-streaming-agent is written for Linux guests.<br>So first you'd need to make it work on Windows (for example<br>the virtio-serial port name is different on Windows guests, cursor<br>handling is different (can be disabled at first)).<br><br>Also you need a spice-streaming-agent-plugin.<br><br>The mjpeg plugin is one example (it too is written for Linux).<br><br>Look at Snir's experimental gst-plugin [1] as another example.<br>Possibly there exists a gstreamer src to capture windows screen and<br>x264 would work on Windows too.<br><br>You may want to use hardware encoding if possible.<br><br>If Intel provides a dma-buf of the host, it may be even better to<br>do it from the spice-server somehow, similar to what's done with virgl<br>(requires code-modifications).<br><br>When you have these written, you'd need<br><br>We'll be happy to know if you make progress or if you<br>need more help (and of course if you send patches :-)<br><br>Uri.</div></div><!--<![endif]--></includetail></div>