From owner-freebsd-multimedia Sat Sep 1 10:42:22 2001 Delivered-To: freebsd-multimedia@freebsd.org Received: from smtpproxy1.mitre.org (smtpproxy1.mitre.org [129.83.20.90]) by hub.freebsd.org (Postfix) with ESMTP id 46BEF37B406; Sat, 1 Sep 2001 10:42:18 -0700 (PDT) Received: from avsrv1.mitre.org (avsrv1.mitre.org [129.83.20.58]) by smtpproxy1.mitre.org (8.11.3/8.11.3) with ESMTP id f81HgHc28260; Sat, 1 Sep 2001 13:42:17 -0400 (EDT) Received: from MAILHUB2 (mailhub2.mitre.org [129.83.221.18]) by smtpsrv1.mitre.org (8.11.3/8.11.3) with ESMTP id f81HgGf14633; Sat, 1 Sep 2001 13:42:16 -0400 (EDT) Received: from dhcp-105-164.mitre.org (128.29.105.164) by mailhub2.mitre.org with SMTP id 7612632; Sat, 01 Sep 2001 13:42:14 -0400 Message-ID: <3B911DF6.F3CBADE@mitre.org> Date: Sat, 01 Sep 2001 13:42:14 -0400 From: Jason Andresen Organization: The MITRE Corporation X-Mailer: Mozilla 4.75 [en]C-20000818M (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Nick Sayer Cc: freebsd-multimedia@freebsd.org Subject: Re: Slow DVD? References: <200108312000.f7VK06d00646@morpheus.kfu.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-multimedia@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Nick Sayer wrote: > > I have been disappointed so far with just about all the DVD playback options > available, but I believe I have an explanation now. > > I have a relatively old DVDROM drive. The virtue of it is that it's > regionless. Here's what the kernel has to say: > > cd1 at ahc0 bus 0 target 5 lun 0 > cd1: Removable CD-ROM SCSI-2 device > cd1: 20.000MB/s transfers (20.000MHz, offset 8) > > If someone were to "rip" a movie using a particularly naughty piece of > software, it turns out that xine and vlc can both play the resulting mpg file > perfectly. > > If someone were to use naughty versions of xine or vlc, one would find that > the playback skipped a lot of frames and looked basically crappy, but the CPU > is 60% idle. > > These two circumstances tell me that perhaps the drive itself is the > bottleneck. Does anyone know of any magic sysctls I might try on cam to speed > things up? I've noticed this too. The problem is in the "naughty" versions of vlc and xine. They both do this: while ( not_end_of_dvd() ) { read_block() decipher_block() decode_block() display_block() } The problem is that this isn't multithreaded, so the drive sits idle while the code is busy descrambling and MPEG2 decoding the block, and the descrambing code sits idle while you seek and read the next DVD block. People with big read buffers on their DVDs probably aren't seeing this, but Pioneer is notorious for putting small read buffers on DVD drives. If you want to do something about it, the relevant code is in libdvdcss, but be warned that working on this code may violate local laws. :( -- \ |_ _|__ __|_ \ __| Jason Andresen jandrese@mitre.org |\/ | | | / _| Network and Distributed Systems Engineer _| _|___| _| _|_\___| Office: 703-883-7755 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message