While encoding audio from mpeg movie on 37 minute and on 41 minute (after I released memory closing firefox) ffmpeg2theora captured about 70% of memory. Tell me how to debug pls. anton@localhost /movies/Outside Providence 1999 Dvdrip (SiRiUs sHaRe) $ fg ffmpeg2theora -v 10 Outside\ Providence\ 1999\ Dvdrip\ \(SiRiUs\ sHaRe\).avi 0:37:07.00 audio: 73kbps video: 93kbps [1]+ Stopped ffmpeg2theora -v 10 Outside\ Providence\ 1999\ Dvd rip\ \(SiRiUs\ sHaRe\).avi anton@localhost /movies/Outside Providence 1999 Dvdrip (SiRiUs sHaRe) $ top top - 17:39:28 up 1 day, 44 min, 3 users, load average: 4.84, 3.97, 2.87 Tasks: 83 total, 1 running, 80 sleeping, 1 stopped, 1 zombie Cpu(s): 2.0%us, 1.0%sy, 0.0%ni, 26.5%id, 69.2%wa, 0.3%hi, 1.0%si, 0.0%st Mem: 443104k total, 435924k used, 7180k free, 1056k buffers Swap: 1004052k total, 501832k used, 502220k free, 29004k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 6648 root 15 0 99380 12m 2644 S 1.7 2.9 33:35.34 X 14436 anton 15 0 285m 40m 6660 S 1.3 9.3 8:56.00 firefox-bin 17853 anton 16 0 10644 1328 984 R 0.3 0.3 0:00.02 top 1 root 15 0 2692 260 240 S 0.0 0.1 0:00.93 init 2 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0 3 root 34 19 0 0 0 S 0.0 0.0 0:00.02 ksoftirqd/0 4 root 10 -5 0 0 0 S 0.0 0.0 0:00.40 events/0 5 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 khelper 6 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kthread 8 root 10 -5 0 0 0 S 0.0 0.0 0:01.45 kblockd/0 9 root 10 -5 0 0 0 S 0.0 0.0 0:00.12 kacpid 129 root 10 -5 0 0 0 S 0.0 0.0 0:00.02 kseriod 132 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 khubd 234 root 15 0 0 0 0 S 0.0 0.0 0:30.10 kswapd0 235 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 aio/0 238 root 19 -5 0 0 0 S 0.0 0.0 0:00.00 shpchpd 848 root 19 -5 0 0 0 S 0.0 0.0 0:00.00 kpsmoused top - 17:39:46 up 1 day, 44 min, 3 users, load average: 3.66, 3.76, 2.82 Tasks: 83 total, 1 running, 80 sleeping, 1 stopped, 1 zombie Cpu(s): 0.7%us, 0.3%sy, 0.0%ni, 94.0%id, 4.6%wa, 0.0%hi, 0.3%si, 0.0%st Mem: 443104k total, 435856k used, 7248k free, 1060k buffers Swap: 1004052k total, 501832k used, 502220k free, 29128k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 17447 anton 17 0 394m 269m 808 T 0.0 62.2 32:06.56 ffmpeg2theora 14436 anton 15 0 285m 40m 6664 S 0.0 9.3 8:56.01 firefox-bin 6648 root 15 0 99380 12m 2644 S 0.3 2.9 33:35.39 X 6992 anton 15 0 129m 5008 2460 S 0.3 1.1 0:18.01 gnome-terminal 6796 anton 15 0 104m 4716 2272 S 0.0 1.1 0:52.32 wnck-applet 6776 anton 15 0 62384 4588 3112 S 0.0 1.0 1:13.66 metacity 6780 anton 15 0 127m 3816 2060 S 0.0 0.9 0:19.97 gnome-panel 6830 anton 15 0 112m 2900 1864 S 0.0 0.7 0:01.77 clock-applet 6812 anton 15 0 112m 2744 1752 S 0.0 0.6 0:30.26 stickynotes_app 6802 anton 15 0 97928 2588 1664 S 0.0 0.6 0:04.28 gnome-netstatus 6819 anton 16 0 88940 2100 1472 S 0.0 0.5 0:30.06 multiload-apple 6816 anton 15 0 89320 2056 1684 S 0.0 0.5 0:07.00 cpufreq-applet 17428 anton 15 0 182m 1876 1460 S 0.0 0.4 0:02.27 nautilus 6832 anton 15 0 108m 1828 1472 S 0.0 0.4 0:05.53 mixer_applet2 6800 anton 15 0 106m 1784 1428 S 0.0 0.4 0:03.46 gnome-keyboard- 6814 anton 15 0 87440 1732 1444 S 0.0 0.4 0:02.51 battstat-applet 6828 anton 15 0 101m 1668 1376 S 0.0 0.4 0:01.54 notification-ar anton@localhost /movies/Outside Providence 1999 Dvdrip (SiRiUs sHaRe) $ ls -lh итого 737M -rw-r--r-- 1 anton users 692M Авг 13 07:52 Outside Providence 1999 Dvdrip (SiRiU s sHaRe).avi -rw-r--r-- 1 anton users 45M Авг 13 17:38 Outside Providence 1999 Dvdrip (SiRiU s sHaRe).ogg -rw-r--r-- 1 anton users 47 Авг 13 05:18 Torrent downloaded from Demonoid.com. txt anton@localhost /movies/Outside Providence 1999 Dvdrip (SiRiUs sHaRe) $ fg ffmpeg2theora -v 10 Outside\ Providence\ 1999\ Dvdrip\ \(SiRiUs\ sHaRe\).avi 0:41:09.04 audio: 73kbps video: 91kbps anton@localhost /movies/Outside Providence 1999 Dvdrip (SiRiUs sHaRe) $ totem Ou tside\ Providence\ 1999\ Dvdrip\ \(SiRiUs\ sHaRe\).ogg anton@localhost /movies/Outside Providence 1999 Dvdrip (SiRiUs sHaRe) $ ls -lh итого 741M -rw-r--r-- 1 anton users 692M Авг 13 07:52 Outside Providence 1999 Dvdrip (SiRiU s sHaRe).avi -rw-r--r-- 1 anton users 49M Авг 13 17:51 Outside Providence 1999 Dvdrip (SiRiU s sHaRe).ogg -rw-r--r-- 1 anton users 47 Авг 13 05:18 Torrent downloaded from Demonoid.com. txt
ffmpeg2theora-0.16 Portage 2.1.1_pre5 (default-linux/amd64/2006.0, gcc-3.4.6, glibc-2.4-r3, 2.6.17-suspend2-r3 x86_64) ================================================================= System uname: 2.6.17-suspend2-r3 x86_64 AMD Turion(tm) 64 Mobile Technology MT-32 Gentoo Base System version 1.12.4 Last Sync: Sat, 12 Aug 2006 14:30:07 +0000 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.18.1 sys-devel/autoconf: 2.13, 2.60 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.17 sys-devel/gcc-config: [Not Present] sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.16 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=athlon64 -msse3 -fomit-frame-pointer -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /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/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/terminfo /etc/texmf/web2c" CXXFLAGS="-O2 -march=athlon64 -msse3 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="ru_RU.UTF-8" LINGUAS="ru" 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" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 X a52 acpi alsa avi beagle bitmap-fonts bzip2 cairo cdr cli crypt dbus djvu dlloader dvd dvdr dvdread dvi eds elibc_glibc emboss encode fat ffmpeg firefox foomaticdb fuse gcc64 gif glibc-omitfp gnome gpm gstreamer gtk gtk2 hal howl imagemagick imlib immqt input_devices_evdev input_devices_keyboard input_devices_mouse isdnlog java jpeg kde kdeenablefinal kdehiddenvisibility kernel_linux libnotify linguas_ru lzw lzw-tiff mad mjpeg mono mp3 mpeg musicbrainz mysql nautilus ncurses nforce2 nls nptl ntfs nvidia ogg opengl pam pcre pdf pdflib perl pmu png postgres pppd python qt3 qt4 quicktime readline reflection reiserfs sdl session sndfile spell spl sqlite ssl svg tagwriting tcpd theora tiff truetype truetype-fonts type1-fonts unicode usb userland_GNU vcd video_cards_nv video_cards_nvidia video_cards_vesa video_cards_vmware vorbis xfs xine xorg xpm xv xvid zlib" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Memory getting used != memory leak; do you get the memory back when encoding has finished?
Encoding never finished. The process locked the system. I assumed it was memory leak since the memory consumtion was increasing by the time. I don't know anything about ffmpeg2theora's algorithm. Total memory I have: 432MB
I have seen the related-aspect of this bug mentioned in comment #3, where encoding never finishes 4 times now. I don't know if this is so much a memory leak, or ffmpeg2theora-0.16 getting into an infinite loop, and then slowly eating memory in a "normal" way.
Try ffmpeg2theora-0.18. I couldn't reproduce anykind of leaking, in fact, xfce4-mixer-plugin took more memory. ;-) As for the machine freezing.. if you have OOM Killer enabled in your kernel make sure you have enough swap reserved..
I noticed twice that after a while ffmpeg process was gradually occupying my memory (1gb). Strange but in both cases I ended up with 3gb of converted video. This time I converted .vob to .dv Is that normal? I will be testing 0.18 now.
I mean, ffmpeg process usually used ~22mb. After a while the consumption was gradually growing up to 80% of 1gb of RAM.
No problems with 0.18 encoding "The Sandlot". Will try later on "Outside Providence" video.
(In reply to comment #8) > No problems with 0.18 encoding "The Sandlot". > Will try later on "Outside Providence" video. > I've removed 0.16 from tree. I don't see anything left in this bug for us..