<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Spice server with h264 error when playing video on Windows 7 guest"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=97786">97786</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Spice server with h264 error when playing video on Windows 7 guest
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Spice
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>server
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>spice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>aoqingyun@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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
<a href="http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm">http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm</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
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
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)</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>