GNOME Bugzilla – Bug 619916
[vp8enc] Doesn't skip non-frame packets correctly
Last modified: 2010-05-28 14:47:56 UTC
# 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, color-matrix=(string)sdtv, chroma-site=(string)mpeg2, width=(int)320, height=(int)240, framerate=(fraction)30/1 Pipeline is PREROLLING ... /GstPipeline:pipeline0/GstVP8Enc:vp8enc0.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)I420, color-matrix=(string)sdtv, chroma-site=(string)mpeg2, width=(int)320, height=(int)240, framerate=(fraction)30/1 Redistribute latency... 0:00:00.213263625 18931 0x804230 ERROR vp8enc gstvp8enc.c:747:gst_vp8_enc_handle_frame:<vp8enc0> non frame pkt 0:00:00.213316774 18931 0x804230 ERROR vp8enc gstvp8enc.c:747:gst_vp8_enc_handle_frame:<vp8enc0> non frame pkt
# emerge --info gst-plugins-bad Portage 2.1.8.3 (default/linux/amd64/10.0, gcc-4.5.0, glibc-2.11.1-r0, 2.6.34-ccs x86_64) ================================================================= System Settings ================================================================= System uname: Linux-2.6.34-ccs-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T9300_@_2.50GHz-with-gentoo-2.0.1 Timestamp of tree: Thu, 27 May 2010 23:30:01 +0000 ccache version 2.4 [enabled] app-shells/bash: 4.1_p7 dev-java/java-config: 2.1.11 dev-lang/python: 2.6.5-r2, 3.1.2-r3 dev-python/pycrypto: 2.1.0 dev-util/ccache: 2.4-r8 dev-util/cmake: 2.8.1-r2 sys-apps/baselayout: 2.0.1 sys-apps/openrc: 0.6.1-r1 sys-apps/sandbox: 2.2 sys-devel/autoconf: 2.13, 2.65 sys-devel/automake: 1.9.6-r3, 1.10.3, 1.11.1 sys-devel/binutils: 2.20.1-r1 sys-devel/gcc: 4.4.3-r2, 4.5.0 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.7b virtual/os-headers: 2.6.33 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-mtune=core2 -march=core2 -O2 -msse4.1 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-mtune=core2 -march=core2 -O2 -msse4.1 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests ccache collision-protect distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch" GENTOO_MIRRORS="ftp://ftp.osuosl.org/pub/gentoo/distfiles/ " LANG="en_US.utf8" LDFLAGS="-Wl,-O1" LINGUAS="zh_CN en_US zh en" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage /var/lib/layman/x11 /var/lib/layman/vmware /var/lib/layman/gentoo-china /var/lib/layman/gentoo-taiwan /var/lib/layman/sunrise /var/lib/layman/gnome /var/lib/layman/mozilla" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X a52 aac accessibility acl acpi alsa amd64 ao apache2 bash-completion berkdb branding bzip2 cairo caps cdr cjk cli consolekit cracklib crypt cups cxx dbus djvu doc dri dts dvd dvdr eds emboss encode esd evo examples exif fam ffmpeg firefox flac fortran gdbm gdu gif gimp gnome gnome-keyring gphoto2 gpm gstreamer gtk guile i18n iconv icu introspection jadetex java jpeg jpeg2k latex lcms ldap libnotify mad midi mikmod mmap mmx mng modules mp3 mp4 mpeg mudflap multilib mysql nas nautilus ncurses networkmanager nfs nls nntp nptl nptlonly nsplugin nvidia ogg opengl openmp pam pango pch pcre pda pdf perl php png policykit ppds pppd python qt3support qt4 readline reflection samba scsi sdl session smp snmp spell spl sqlite sse sse2 ssl ssse3 startup-notification suid svg sysfs tcpd threads tiff tk truetype unicode usb v4l2 vim-syntax vorbis x264 xattr xcb xml xmp xorg xulrunner xv xvid xvmc zlib" ALSA_CARDS="ens1370 hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="zh_CN en_US zh en" QEMU_SOFTMMU_TARGETS="x86_64" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="vmwgfx vmwlegacy nouveau nvidia nv vmware vesa svga" XTABLES_ADDONS="cui gfw zhang ipset" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS ================================================================= Package Settings ================================================================= media-libs/gst-plugins-bad-0.10.18 was built with the following: USE="-debug" ALSA_CARDS="ens1370 hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" INPUT_DEVICES="evdev synaptics" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US zh zh_CN" QEMU_SOFTMMU_TARGETS="x86_64" RUBY_TARGETS="ruby18" VIDEO_CARDS="nouveau nv nvidia (svga) vesa vmware vmwgfx vmwlegacy" XTABLES_ADDONS="account chaos condition delude dhcpmac fuzzy geoip iface ipmark ipp2p ipset ipv4options length2 logmark lscan pknock psd quota2 rawnat steal sysrq tarpit tee" CFLAGS="-mtune=core2 -march=core2 -O2 -pipe -ggdb" CXXFLAGS="-mtune=core2 -march=core2 -O2 -pipe -ggdb"
(In reply to comment #0) > 0:00:00.213263625 18931 0x804230 ERROR vp8enc > gstvp8enc.c:747:gst_vp8_enc_handle_frame:<vp8enc0> non frame pkt > 0:00:00.213316774 18931 0x804230 ERROR vp8enc > gstvp8enc.c:747:gst_vp8_enc_handle_frame:<vp8enc0> non frame pkt These error output should result in the non-frame packets to be ignored but it should still output the frame packets. Which version of libvpx do you have installed and which configuration options were used for the build? This looks like your libvpx version only creates invalid packets. libvpx will only output non-frame packets in two-pass mode (for the first pass) or if the PSNR setting is used when initializing the encoder.
======== libvpx is git master from: git://review.webmproject.org/libvpx.git ======== gentoo ebuild configure options src_configure() { tc-export CC ${S}/configure \ --prefix=/usr \ --enable-pic \ --enable-vp8 \ --enable-psnr \ $(use_enable debug) \ $(use_enable debug debug-libs) \ $(use_enable doc install-docs) \ $(use_enable postproc) \ $(use_enable threads multithread) \ || die } ======== options to install libvpx.so: ar x ../libvpx_g.a || die cd .. cp ${FILESDIR}/libvpx.ver . gcc -fPIC -shared -pthread -lm -Wl,--no-undefined -Wl,-soname,libvpx.so.0 -Wl,--version-script,libvpx.ver -z noexecstack -o libvpx.so.0.0.0 tmp/*.o || die dolib.so libvpx.so* ======== output message while configure is running >>> Starting src_configure Configuring selected codecs enabling vp8_encoder enabling vp8_decoder Configuring for target 'x86_64-linux-gcc' enabling x86_64 enabling runtime_cpu_detect enabling mmx enabling sse enabling sse2 enabling sse3 enabling ssse3 Creating makefiles for x86_64-linux-gcc libs Creating makefiles for x86_64-linux-gcc examples Creating makefiles for x86_64-linux-gcc docs >>> Done src_configure # ls -l /usr/lib64/libvpx* -rw-r--r-- 1 root root 882752 5月 28 15:21 /usr/lib64/libvpx.a lrwxrwxrwx 1 root root 15 5月 27 01:41 /usr/lib64/libvpx.so.0 -> libvpx.so.0.0.0 -rwxr-xr-x 1 root root 568448 5月 28 15:21 /usr/lib64/libvpx.so.0.0.0 # ldd /usr/lib64/gstreamer-0.10/libgstvp8.so linux-vdso.so.1 => (0x00007fffe4fff000) libgsttag-0.10.so.0 => /usr/lib/libgsttag-0.10.so.0 (0x00007f15a2589000) libgstvideo-0.10.so.0 => /usr/lib/libgstvideo-0.10.so.0 (0x00007f15a2380000) libgstbase-0.10.so.0 => /usr/lib/libgstbase-0.10.so.0 (0x00007f15a213e000) libgstreamer-0.10.so.0 => /usr/lib/libgstreamer-0.10.so.0 (0x00007f15a1e52000) libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x00007f15a1c06000) libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x00007f15a1a01000) libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00007f15a169f000) libdl.so.2 => /lib/libdl.so.2 (0x00007f15a149b000) libz.so.1 => /lib/libz.so.1 (0x00007f15a1282000) libm.so.6 => /lib/libm.so.6 (0x00007f15a0ffe000) libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0x00007f15a0df9000) libpthread.so.0 => /lib/libpthread.so.0 (0x00007f15a0bdb000) librt.so.1 => /lib/librt.so.1 (0x00007f15a09d2000) libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007f15a06cb000) libc.so.6 => /lib/libc.so.6 (0x00007f15a0354000) /lib64/ld-linux-x86-64.so.2 (0x00007f15c2d0b000) #
Ah I see... you'll always get PSNR packets by default when building with --enable-psnr. But vp8enc still works here. What exactly is the problem you see? It doesn't output any frames at all for you?
Oh, nevermind. With --enable-psnr it doesn't output any real frames for me either, only PSNR data. I'll investigate later...
Ok, patch comes in a few minutes *sigh*
Created attachment 162220 [details] [review] vp8enc: Correctly ignore non-frame packets from the encoder Fixes bug #619916.
There's a bug in libvpx here btw, it shouldn't output the PSNR packets unless VPX_CODEC_USE_PSNR was provided as flag during encoder initialization.
Pushed this: commit 1e1d52f4fc6af5c15cd386b976d962b324fce5f4 Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Fri May 28 15:53:30 2010 +0200 vp8enc: Correctly ignore non-frame packets from the encoder Fixes bug #619916.
when will the fix be available in the git master?
(In reply to comment #10) > when will the fix be available in the git master? Now ;) Related libvpx bugreport: http://code.google.com/p/webm/issues/detail?id=35
(In reply to comment #10) > when will the fix be available in the git master? You want these two commits btw: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=1e1d52f4fc6af5c15cd386b976d962b324fce5f4 http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=e9c48d1671ec4d192ecd2fd8cb784655b91a21bd Also, please create a Gentoo bugreport to tell them, to not pass --enable-psnr to configure for now. This will only slow down the encoder right now because it will *always* output PSNR packets. Without --enable-psnr it's possible to disable or enable this feature at runtime.