On 04/12/2018 05:37 AM, 孙得霖 wrote:
hi,
    I use spice for remote view, I want to captures the guest video output, encodes it and send through, so I choose streaming agent, how to build and run it is not clear, can you help me?

1.host environment and Software version:
centOS(Mini install)
GVT-g kernel:      https://github.com/intel/gvt-linux/  (branch: topic/dmabuf)
QEMU:              https://github.com/intel/igvtg-qemu  (branch: qa/dma_buf)
streming agent:    https://gitlab.com/spice/spice-streaming-agent
spice-server       version:0.13.3
spice-protocol     version:0.12.12

2.build info
kernel:
make -j 8
make modules_install && make install
reboot

qemu:
./configure --prefix=/usr --enable-kvm --disable-xen --enable-debug-info --enable-debug --enable-sdl --enable-vhost-net --enable-spice --disable-debug-tcg --enable-numa --enable-libusb --enable-curl --enable-usb-redir --enable-linux-aio --target-list=x86_64-softmmu --enable-gtk --with-gtkabi=3.0
make -j 8
cd roms/seabios
make -j 8
cd -
make install
cp roms/seabios/out/bios.bin /usr/bin/bios.bin

spice-protocol:
./configure --prefix=/usr
make -j 8
make install

spice-service:
./configure  --prefix=/usr --enable-manual=no --disable-silent-rules --disable-smartcard --disable-celt051 --enable-client CFLAGS="-g -O0" CXXFLAGS="-g -O0"
make -j 8
make install

streming agent
./autogen.sh
make -j 8
make install

3.run qemu
/usr/bin/qemu-system-x86_64 \
-m 8192 \
-smp 4,sockets=1,cores=4,threads=1 \
-M pc \
-name win71 \
-hda /Image/vm/win7_base.img \
-bios /usr/bin/bios.bin -enable-kvm \
-k en-us \
-vga none \
-display egl-headless \
-spice disable-ticketing,port=6901,streaming-video=off \
-machine kernel_irqchip=on,usb=on \
-global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 \
-cpu host -device usb-tablet \
-device vfio-pci,sysfsdev=/sys/bus/pci/devices/0000:00:02.0/5b8d581a-2dc9-11e8-8238-000906258002,x-display=on,x-igd-opregion=on -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel1,id=channel1,name=org.spice-space.stream.0 -chardev spiceport,name=org.spice-space.stream.0,id=charchannel1

questions:
I am not clear How to use streaming agent and validate it, can you help me?

Hello,

So, you are using Intel vGPU and running a Windows 7 guest.

Theoretically, spice-streaming-agent can do what you want, run
on the guest to capture the video and send it via SPICE to the client.

But, currently spice-streaming-agent is written for Linux guests.
So first you'd need to make it work on Windows (for example
the virtio-serial port name is different on Windows guests, cursor
handling is different (can be disabled at first)).

Also you need a spice-streaming-agent-plugin.

The mjpeg plugin is one example (it too is written for Linux).

Look at Snir's experimental gst-plugin [1] as another example.
Possibly there exists a gstreamer src to capture windows screen and
x264 would work on Windows too.

You may want to use hardware encoding if possible.

If Intel provides a dma-buf of the host, it may be even better to
do it from the spice-server somehow, similar to what's done with virgl
(requires code-modifications).

When you have these written, you'd need

We'll be happy to know if you make progress or if you
need more help (and of course if you send patches :-)

Uri.
_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to