Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Oct 2003 08:50:09 -0700
From:      Nathan Kay <mcnate@numenor.net>
To:        jason dictos <jason@dictos.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: #1 reason why mplayer is choppy?
Message-ID:  <20031012155009.GA86452@numenor.net>
In-Reply-To: <200310110859.49702.jason@dictos.com>
References:  <200310110859.49702.jason@dictos.com>

next in thread | previous in thread | raw e-mail | index | archive | help
	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 <file>
	(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<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,
  CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>

	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."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031012155009.GA86452>