From owner-freebsd-questions@FreeBSD.ORG Sun Oct 12 16:05:41 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E2A0C16A4B3 for ; Sun, 12 Oct 2003 16:05:41 -0700 (PDT) Received: from areandor.numenor.net (areandor.numenor.net [69.55.237.153]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD75443FA3 for ; Sun, 12 Oct 2003 16:05:39 -0700 (PDT) (envelope-from mentat@numenor.net) Received: from mentat by areandor.numenor.net with local (Exim 3.36 #1) id 1A8iTx-000Anm-00; Sun, 12 Oct 2003 08:50:09 -0700 Date: Sun, 12 Oct 2003 08:50:09 -0700 From: Nathan Kay To: jason dictos Message-ID: <20031012155009.GA86452@numenor.net> References: <200310110859.49702.jason@dictos.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200310110859.49702.jason@dictos.com> cc: freebsd-questions@freebsd.org Subject: Re: #1 reason why mplayer is choppy? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Oct 2003 23:05:42 -0000 Why is mplayer choppy? Could be lots of reasons. I'll list most of the ones I've encountered; any one of these might help, there's no reason to be worried about them all, and in many cases, unless you have a serious performance tweaking hobby, they won't be important to your use of FreeBSD. If you're trying to stream over the network, the connection could be too slow, you might need more network buffers. If playing from hard disk, is the disk fast enough to read out all the data to mplayer quickly? Setting the following in /boot/loader.conf might help: hw.ata.atapi_dma="1" hw.ata.ata_dma="1" Is the CPU fast enough? Is Mplayer giving messages about "your cpu is too slow"? If so, have you followed the recomendations that mplayer outputs? Do you have other heavy tasks running? Mozilla? OpenOffice? Is anything compeating with mplayer for hiding the mouse cursor (running mplayer and unclutter at the same time with using -reset for unclutter will make mplayer act really choppy). Have you tried (as root) running mplayer from rtprio: /usr/sbin/rtprio 30 mplayer (Read the man page for rtprio if you're curious about what it does. Not available on older FreeBSD versions.) If you've a lot of memory, and a slow CPU or hard drive, does copying the file you're playing to a memory backed filesystem first help at all? (See the FreeBSD handbook for details of mounting /tmp as a memory filesystem.) How was mplayer compiled? If built from ports, did you use "WITH_OPTIMIZED_CFLAGS=yes" when you ran make? (As in, cd /usr/ports/multimedia/mplayer;make WITH_OPTIMIZED_CFLAGS=yes install) What video output driver is being used? (-vo in mplayer) Have you tried building SDL (/usr/ports/devel/sdl12) then rebuilding mplayer to use SDL, and then using -vo sdl -ao sdl to force mplayer to play files with SDL rather than xv? Do you have "options CPU_ENABLE_SSE" in your kernel, if you have a CPU with SSE in it? Check dmesg: CPU: Mobile Intel(R) Pentium(R) 4 - M CPU 2.20GHz (1196.48-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0xf27 Stepping = 7 Features=0xbfebf9ff Do you have any CFLAGS set in /etc/make.conf to force extra bits of compiler related optimization? That can help sometimes. Is XFree86 optimized for your video card? Is direct rendering available and turned on? Are AGPMode and AGPFastWrite enabled in XFree86? -- Nathan Kay Numenorean Networks http://www.numenor.net PGP Public Key: http://www.numenor.net/~mentat/pgp.asc "Unix is like a Vorlon: It's incredibly powerful, gives terse, cryptic answers, and has a lot of things going on in the background."