Portage 2.1-r2 (default-linux/amd64/2006.0, gcc-3.4.6, glibc-2.3.6-r4, 2.6.17-gentoo-r4 x86_64) ================================================================= System uname: 2.6.17-gentoo-r4 x86_64 AMD Athlon(tm) 64 Processor 3200+ Gentoo Base System version 1.12.4 app-admin/eselect-compiler: [Not Present] dev-lang/python: 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.13-r3 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=k8 -pipe -fomit-frame-pointer -mmmx -msse -msse3 -m3dnow" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo " LANG="de_DE.utf8" LINGUAS="de" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="amd64 X aac alsa avi berkdb bitmap-fonts cdr cli crypt cups dlloader dri dvd dvdread eds emboss encode ffmpeg foomaticdb fortran gif gimp gnome gpm gstreamer gtk gtk2 imagemagick imlib ipv6 isdnlog jack jpeg kde lzw lzw-tiff mad mp3 mpeg ncurses nls nptl nptlonly nsplugin nvidia opengl oss pam pcre pdflib perl png ppds pppd python qt qt3 qt4 quicktime readline reflection sdl session spell spl ssl tcpd tiff truetype-fonts type1-fonts unicode usb userlocales v4l v4l2 xorg xpm xv xvid zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux linguas_de userland_GNU video_cards_nv video_cards_nvidia video_cards_v4l" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS ****************************************************************************** I have installed: media-video/ffmpeg-0.4.9_p20051216 media-video/mplayer-1.0_pre8 At a two-pass encoding following error was produced: "[mpeg4 @ 0xa60390]Error: 2pass curve failed to converge" Relating problems from www see: http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/34234 http://itdp.fh-biergarten.de/mplayer-users/2006-08/msg00210.html There is also something like a patch at, but I don't know how to use it: http://article.gmane.org/gmane.comp.video.mencoder.user/3706
Same with: media-video/ffmpeg-0.4.9_p20051216 media-video/mplayer-1.0_pre8-r1
update ffmpeg and mplayer and report back. the currently masked snapshot are in p.mask just because the other programs hadn't update x264 bindings...
Same with: media-video/ffmpeg-0.4.9_p20051216 media-video/mplayer-1.0_pre20060810 (masked by package.mask and ~amd64 keyword) In reply to Comment #2: Do you mean the mplayer version above? In my opinion the problem is located in ffmpeg. Therefore I will test now the other versions of ffmpeg wich I can find in the actual portage tree.
Same with: media-video/ffmpeg-0.4.9_p20050226-r3 media-video/mplayer-1.0_pre20060810 (masked by package.mask and ~amd64 keyword)
Same with: media-video/ffmpeg-0.4.9_p20060302 media-video/mplayer-1.0_pre20060810 (masked by package.mask and ~amd64 keyword)
Now I have tested the patch from www (see above). With that the function abs() should change to a better one: fabs(). I had tested some modifications but nothing was successfully. Allways the same error: "Error: 2pass curve failed to converge" Last I have modified the patched line to : "if (1>10) {...}" but the error persist. Summary: The patch don't modify the right line.
Created attachment 95508 [details] patch for testing the reason of error
(In reply to comment #6) > Summary: The patch don't modify the right line. Yes and that's because mplayer (I'm used for testing) don't use the ffmpeg-librarys as link but his own included ffmpeg sources during compile! Ok, now I have made a look into the file "ratecontrol.c" of mplayer and find out that the abs-> fabs patch is allways there. Now I had make my own patch file (see attachement). After applying this patch you will see that the error-string is absolutly correct: curve don't converge In my case "expected_bits/all_available_bits" is "0.193" but it should be near "1". I don't know why the curve should converge. Also I don't know about the background of the complete problem. Even though I had removed the line with "return -1". Therfore the second pass now will finished successfully.
Created attachment 95635 [details, diff] a short patch with does it on my amd64 try it out
Changed topic to mplayer it has its own ffmpeg-version and is not related to ffmpeg-ebuild.
the patch is for mplayer version: media-video/mplayer-1.0_pre20060810
(In reply to comment #11) > the patch is for mplayer version: > > media-video/mplayer-1.0_pre20060810 Thank you for your patch, but this solves only the reaction of the problem, not the problem itself. Of course, the process dont interrupt now (see also my shorter patch ;o}). But in my opinion the result can't be a valid videofile (I know it will be played correctly with mplayer). Functions are defined as: * int abs ( int n ); (n -> integer) [http://www.cplusplus.com/ref/cmath/abs.html] * double fabs ( double x ); (x -> double) [http://www.cplusplus.com/ref/cmath/fabs.html] I have attached a file with outputs of a incorrect converge and a correct converge (generated with my testing-patch).
Created attachment 95668 [details] bad and good converge (using test-patch)
(In reply to comment #10) The contens of the directory "libavcodec" looks nearly same in mplayer and ffmpeg. Therefore I'm suggesting open a new bug for ffmpeg after testing the same with ffmpeg and the same file. I can do it, but I,m not trained with ffmpeg. Do someone send me the commandline wich equal with mencoder 2-pass encoding?
(In reply to comment #9) The error exist on "amd64" and the same on "x86", I have tested.
Created attachment 95669 [details, diff] patch for amd64 and x86 - plot a warning Not smaller :O[ , but better ;o} Inform the user with two possibilities, but don't interrupt. At me tested with mplayer-1.0_pre8. Should also work with versions above.
(In reply to comment #14) > (In reply to comment #10) Today I'm testing the ffmpeg-0.4.9_p20051216. I was first exposed there is no bug. I looked into the sources to understand what's better in ffmpeg-ratecontrol. It's not better! There is the abs-bug in it. After that I make the patch doing the fabs and also the warning like mpeg-patch above. Then I test with that patched version the mpeg4-code and get the message. Now I'm sure the same bug is inside the ffmpeg-code. ffmpeg -t 4 -pass 1 -i Infile.avi -vcodec mpeg4 -s 352x144 OutFilep1.avi ffmpeg -t 4 -pass 2 -i Infile.avi -vcodec mpeg4 -s 352x144 OutFilep2.avi The problem don't exist anymore if I remove the -s Option. In my opinion in that case the higher bitrate correlate better to framesize (704x288).
*** Bug 146017 has been marked as a duplicate of this bug. ***
Please move this discussion to upstream, something similar will added to the rc1.