Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 352652 - media-libs/libvpx-0.9.5 does very poor bit allocation in 2-pass mode
Summary: media-libs/libvpx-0.9.5 does very poor bit allocation in 2-pass mode
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-25 02:58 UTC by Luis Fernando Schultz Xavier da Silveira
Modified: 2013-06-25 16:55 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
vpxenc plus recommended flags (vpxenc-hq,324 bytes, text/plain)
2011-01-25 03:00 UTC, Luis Fernando Schultz Xavier da Silveira
Details
Does the real encoding. (vpx-encode-2pass-hq,366 bytes, text/plain)
2011-01-25 03:02 UTC, Luis Fernando Schultz Xavier da Silveira
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luis Fernando Schultz Xavier da Silveira 2011-01-25 02:58:27 UTC
I have been using the recommended set of flags to vpxenc to encode videos in 2-pass mode with high quality (scripts attached), except perhaps for --token-parts, but since I am not using threading, this shouldn't matter.

The program is doing very poor bit allocation. The frames in the beginning of the resulting video are allocated very few bits, which results in very poor quality. The later frames are allocated enough bits and have good quality. One could say the quality increases as the video approaches the end.

I have tested this with two videos. The first was a 8GB video which I tried to compress to 2GB. The second video was dragon ball kai episode 89 (720p from freeze subs), which is 343MB. I tried to compress it to 100MB for testing purposes.

I realize that most likely this is a configuration mistake, but since I have just copied the flags from http://www.webmproject.org/tools/encoder-parameters/ (2-Pass Best Quality VBR Encoding), I belive their arguments may not be sensible defaults.

Reproducible: Always

Steps to Reproduce:
1. Encode a big video with the attached scripts.
Actual Results:  
Video is allocated very few bits in early frames.

Expected Results:  
Video is allocated enough bits in all frames.

Portage 2.1.9.25 (default/linux/amd64/10.0/no-multilib, gcc-4.4.4, glibc-2.11.2-r3, 2.6.36-gentoo-r5 x86_64)
=================================================================
System uname: Linux-2.6.36-gentoo-r5-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T6400_@_2.00GHz-with-gentoo-2.0.1
Timestamp of tree: Mon, 24 Jan 2011 13:30:22 +0000
app-shells/bash:     4.1_p9
dev-lang/python:     2.6.6-r1, 3.1.2-r4
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1-r1
sys-apps/openrc:     0.7.0
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13, 2.65-r1
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.4-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.30-r1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -Wall"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/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="-march=native -O2 -pipe -Wall"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news nodoc noinfo parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://gentoo.c3sl.ufpr.br/gentoo/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
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"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acpi alsa amd64 amr ass bash-completion berkdb branding bzip2 cairo cdda cjk cli corefonts cracklib crypt cups cxx dga djvu dot dri dv dvd dvdnav dvi exif faac faad ffmpeg fftw flac fortran gdbm gif glitz gmp gpg graphviz gs gsm iconv imagemagick ipv6 jpeg jpeg2k kpathsea lame latex lcdfilter lzma mmx mng modules mp3 mpeg ncurses nptl nptlonly offensive ogg openal openexr opengl openmp pam pdf png pnm pop postscript pppd pvr quicktime raw readline schroedinger sdl session smp smtp speex sse sse2 ssl ssse3 startup-notification svg sysfs tcpd theora tiff truetype twolame udev unicode v4l2 vim-pager vim-syntax vorbis vpx wifi x264 xanim xcb xorg xpm xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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 cgi cgid 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" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Luis Fernando Schultz Xavier da Silveira 2011-01-25 03:00:51 UTC
Created attachment 260624 [details]
vpxenc plus recommended flags
Comment 2 Luis Fernando Schultz Xavier da Silveira 2011-01-25 03:02:16 UTC
Created attachment 260625 [details]
Does the real encoding.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2011-01-25 16:07:08 UTC
Please substitute the entire category/pkg-version in the Summary, and paste the output of `emerge --info category/pkg' in a comment.
Comment 4 Luis Fernando Schultz Xavier da Silveira 2011-01-25 16:45:39 UTC
> Please substitute the entire category/pkg-version in the Summary, and paste the
> output of `emerge --info category/pkg' in a comment.

Portage 2.1.9.25 (default/linux/amd64/10.0/no-multilib, gcc-4.4.4, glibc-2.11.2-r3, 2.6.36-gentoo-r5 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.36-gentoo-r5-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T6400_@_2.00GHz-with-gentoo-2.0.1
Timestamp of tree: Mon, 24 Jan 2011 13:30:22 +0000
app-shells/bash:     4.1_p9
dev-lang/python:     2.6.6-r1, 3.1.2-r4
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1-r1
sys-apps/openrc:     0.7.0
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13, 2.65-r1
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.4-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.30-r1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -Wall"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/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="-march=native -O2 -pipe -Wall"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news nodoc noinfo parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://gentoo.c3sl.ufpr.br/gentoo/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
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"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acpi alsa amd64 amr ass bash-completion berkdb branding bzip2 cairo cdda cjk cli corefonts cracklib crypt cups cxx dga djvu dot dri dv dvd dvdnav dvi exif faac faad ffmpeg fftw flac fortran gdbm gif glitz gmp gpg graphviz gs gsm iconv imagemagick ipv6 jpeg jpeg2k kpathsea lame latex lcdfilter lzma mmx mng modules mp3 mpeg ncurses nptl nptlonly offensive ogg openal openexr opengl openmp pam pdf png pnm pop postscript pppd pvr quicktime raw readline schroedinger sdl session smp smtp speex sse sse2 ssl ssse3 startup-notification svg sysfs tcpd theora tiff truetype twolame udev unicode v4l2 vim-pager vim-syntax vorbis vpx wifi x264 xanim xcb xorg xpm xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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 cgi cgid 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" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2011-01-25 19:04:40 UTC
I don't see a media-libs/vpxenc in the tree. Are you sure that this isn't from an overlay?
Comment 6 Luis Fernando Schultz Xavier da Silveira 2011-01-25 19:14:58 UTC
(In reply to comment #5)
> I don't see a media-libs/vpxenc in the tree. Are you sure that this isn't from
> an overlay?

Very sorry. I have fixed the package name. It is libvpx.
Comment 7 Alexis Ballier gentoo-dev 2013-06-25 16:55:06 UTC
well, you should really report this upstream, either so that they fix their documentation or fix the encoder, there's not much we as gentoo can do unfortunately