Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 01 Sep 2001 13:42:14 -0400
From:      Jason Andresen <jandrese@mitre.org>
To:        Nick Sayer <nsayer@freebsd.org>
Cc:        freebsd-multimedia@freebsd.org
Subject:   Re: Slow DVD?
Message-ID:  <3B911DF6.F3CBADE@mitre.org>
References:  <200108312000.f7VK06d00646@morpheus.kfu.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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: <PIONEER DVD-ROM DVD-303 1.09> 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




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