After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 676245 - vp8enc stops working after libvpx-1.1.0 update
vp8enc stops working after libvpx-1.1.0 update
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
0.10.24
Other Linux
: Normal blocker
: 0.10.24
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 676653 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-05-17 14:25 UTC by Ralf
Modified: 2012-05-28 12:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
vp8enc: fix target bitrate config with libvpx 1.1.0 (1.53 KB, patch)
2012-05-18 11:49 UTC, Vincent Penquerc'h
accepted-commit_now Details | Review
vp8enc: fix target bitrate config with libvpx 1.1.0 (1.55 KB, patch)
2012-05-22 09:09 UTC, Vincent Penquerc'h
committed Details | Review

Description Ralf 2012-05-17 14:25:30 UTC
After updating libvpx to 1.1.0 on two Gentoo systems and recompiling gst-plugins-vp8, vp8enc simply stops working. 



gst-launch-0.10 -v videotestsrc ! vp8enc ! fakesink
Setting pipeline to PAUSED ...
/GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)I420, width=(int)320, height=(int)240, framerate=(fraction)30/1, color-matrix=(string)sdtv, chroma-site=(string)mpeg2
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstVP8Enc:vp8enc0.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)I420, width=(int)320, height=(int)240, framerate=(fraction)30/1, color-matrix=(string)sdtv, chroma-site=(string)mpeg2
Redistribute latency...


It hangs here now and never gets to status playing.


Installed versions:

gst-inspect-0.10 vp8enc
Factory Details:
  Long name:    On2 VP8 Encoder
  Class:        Codec/Encoder/Video
  Description:  Encode VP8 video streams
  Author(s):    David Schleef <ds@entropywave.com>
  Rank:         primary (256)

Plugin Details:
  Name:                 vp8
  Description:          VP8 plugin
  Filename:             /usr/lib64/gstreamer-0.10/libgstvp8.so
  Version:              0.10.22
  License:              LGPL
  Source module:        gst-plugins-bad
  Source release date:  2011-05-10
  Binary package:       Gentoo GStreamer Ebuild
  Origin URL:           http://www.gentoo.org


media-libs/libvpx-1.1.0
Comment 1 Sebastian Dröge (slomo) 2012-05-17 14:31:54 UTC
Confirmed... any idea what's wrong here?
Comment 2 Vincent Penquerc'h 2012-05-18 09:14:37 UTC
gstvp8enc.c:797:gst_vp8_enc_set_format:<vp8enc0> error: abi mismatch

Updating libvpx worked fine, it started not working after I rebuild vp8enc with it.

Looking at it now.
Comment 3 Vincent Penquerc'h 2012-05-18 11:33:05 UTC
The culprit is:

    if (!ctx->cfg.rc_target_bitrate)
        return res;

found (twice) in vp8e_encode.

The commit adding it was 25a36d6b3c6d206ad19d47f9999eb71109f87dea (in libvpx), saying "multi-res: restore v1.0.0 API". Removing those two duplicated checks "fixes" vp8enc. I'll now go see whether the target bitrate should be initialized by us in the first place.
Comment 4 Vincent Penquerc'h 2012-05-18 11:49:33 UTC
Created attachment 214305 [details] [review]
vp8enc: fix target bitrate config with libvpx 1.1.0

libvpx 1.1.0 disallows a bitrate of 0, which was used by
vp8enc as a default value.

Instead, we use the default libvpx bitrate, scaled to our
video size, if no bitrate was specified.

This fixes encoding VP8 video with libvpx 1.1.0.
Comment 5 Sebastian Dröge (slomo) 2012-05-22 09:05:10 UTC
Comment on attachment 214305 [details] [review]
vp8enc: fix target bitrate config with libvpx 1.1.0

Looks good and works for me, but maybe use gst_util_uint64_scale() or at least 64 bit integer arithmetic for scaling the bitrate

Please push :)
Comment 6 Vincent Penquerc'h 2012-05-22 09:09:40 UTC
Created attachment 214642 [details] [review]
vp8enc: fix target bitrate config with libvpx 1.1.0

libvpx 1.1.0 disallows a bitrate of 0, which was used by
vp8enc as a default value.

Instead, we use the default libvpx bitrate, scaled to our
video size, if no bitrate was specified.

This fixes encoding VP8 video with libvpx 1.1.0.
Comment 7 Vincent Penquerc'h 2012-05-22 09:16:40 UTC
Thanks, pushed with your comment addressed.

commit 04909e2c50e6802ea5dec6d0085d60d5c57f671c
Author: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Date:   Fri May 18 12:46:55 2012 +0100

    vp8enc: fix target bitrate config with libvpx 1.1.0
    
    libvpx 1.1.0 disallows a bitrate of 0, which was used by
    vp8enc as a default value.
    
    Instead, we use the default libvpx bitrate, scaled to our
    video size, if no bitrate was specified.
    
    This fixes encoding VP8 video with libvpx 1.1.0.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=676245
Comment 8 Tim-Philipp Müller 2012-05-28 12:03:29 UTC
*** Bug 676653 has been marked as a duplicate of this bug. ***