Bug 97787 - Spice server with h264 error while playing video on Windows 7 Guest
Summary: Spice server with h264 error while playing video on Windows 7 Guest
Status: RESOLVED DUPLICATE of bug 97786
Alias: None
Product: Spice
Classification: Unclassified
Component: server (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Spice Bug List
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-13 12:56 UTC by aoqingyun
Modified: 2016-09-21 08:33 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description aoqingyun 2016-09-13 12:56:29 UTC
I try to test spice with h264 on Raspberry Pi, but failed with error. The spice server is started with qemu on CentOS 7, while the spicy client is built from spice-gtk (with gstreamer plugins including omx) on Debian (Raspberry Pi).

The followings are steps I used to setup spice server on fresh Centos 7 installation.

1. Download source codes
yum -y install git
git clone git://anongit.freedesktop.org/spice/spice-protocol
git clone git://anongit.freedesktop.org/spice/spice
git clone git://anongit.freedesktop.org/spice/qemu

2. Install build tools
yum -y install autoconf automake libtool
yum -y install pyparsing

3. Build spice protocol
cd spice-protocol
./autogen.sh --prefix=/usr
make
make install
cd ..

4. Install gstreamer dependencies
yum -y install epel-release
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm [Note A]
yum -y install gstreamer1-devel
yum -y install gstreamer1-plugins-base-devel gstreamer1-plugins-bad-free gstreamer1-plugins-good gstreamer1-plugins-ugly
yum -y install gstreamer1-libav

5. Install other dependencies
yum -y install glib2-devel pixman-devel celt051-devel openssl-devel libjpeg-turbo-devel

6. Modify & build spice
cd spice
Modify server/reds.c to change video negotiation sequence by putting gstreamer:h264 in the first place.
static const char default_video_codecs[] = "gstreamer:h264;spice:mjpeg;gstreamer:mjpeg;gstreamer:vp8";
./autogen.sh --enable-gstreamer=1.0 --prefix=/usr
make
make install
cd ..

7. Build qemu
cp /usr/lib/pkgconfig/spice-server.pc /usr/share/pkgconfig/
cd qemu
./configure --enable-spice --target-list=x86_64-softmmu [Note B]
make
make install
cd ..
ldconfig

8. Create & start Windows 7 guest
/usr/local/bin/qemu-img create –f qcow2 win7.img 30G
/usr/local/bin/qemu-system-x86_64 -cpu host -smp 2,sockets=1,cores=2 -m 2048 -net nic,model=virtio -net user -drive file=virtio-win-amd64.vfd,if=floppy -drive file=win7.img,if=virtio,index=0 -cdrom win7.iso -boot d --enable-kvm -vga qxl -spice port=5900,ipv4,disable-ticketing,image-compression=auto_glz,jpeg-wan-compression=always,playback-compression=off,zlib-glz-wan-compression=never,streaming-video=filter,agent-mouse=on [Note C]
Connect to Windows 7 guest from Raspberry Pi by executing: spicy –h ###.###.### -p 5900

9. Test H264 video
Install Windows 7 OS
Install ovirt-4.0 guest tool (with qxl driver)
Install PotPlayer
Run PotPlayer

10. Got error on CentOS 7

 (qemu-system-x86_64:35545): Spice-WARNING **: gstreamer-encoder.c:773:map_format: The 8 format has not been tested yet

(qemu-system-x86_64:35545): Spice-WARNING **: gstreamer-encoder.c:816:handle_pipeline_message: GStreamer error from element encoder: Can not initialize x264 encoder.

(qemu-system-x86_64:35545): Spice-WARNING **: gstreamer-encoder.c:816:handle_pipeline_message: GStreamer error from element encoder: GStreamer error: negotiation problem.

(qemu-system-x86_64:35545): Spice-WARNING **: gstreamer-encoder.c:816:handle_pipeline_message: GStreamer error from element src: Internal data flow error.

(qemu-system-x86_64:35545): Spice-WARNING **: gstreamer-encoder.c:816:handle_pipeline_message: GStreamer error from element encoder: Can not initialize x264 encoder.

(qemu-system-x86_64:35545): Spice-WARNING **: gstreamer-encoder.c:816:handle_pipeline_message: GStreamer error from element encoder: GStreamer error: negotiation problem.

(qemu-system-x86_64:35545): Spice-WARNING **: gstreamer-encoder.c:816:handle_pipeline_message: GStreamer error from element src: Internal data flow error.

(qemu-system-x86_64:35545): Spice-ERROR **: ../spice-common/common/ring.h:55:ring_add: assertion `ring->next != NULL && ring->prev != NULL' failed
Trace/breakpoint trap(Dump)
Comment 1 Marc-Andre Lureau 2016-09-21 08:33:35 UTC

*** This bug has been marked as a duplicate of bug 97786 ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.