[MPlayer-users] Dumping VOBSub

Larry Reznick lreznick at idistream.com
Mon Jul 23 19:07:32 CEST 2007


Dominik 'Rathann' Mierzejewski wrote:
> On Saturday, 21 July 2007 at 09:39, RC wrote:
>   
>> On Fri, 20 Jul 2007 11:37:03 -0700
>> Larry Reznick <lreznick at idistream.com> wrote:
>>
>>     
>>> My DVD drive can't keep up when playing directly  from it. 
>>>       
>> That is... _extremely_ strange.  All DVD players should handle at least
>> 1X playback, and most DVDs stay well below the 1X max.  
>>     
>
> Definitely. Looks like DMA for that drive is disabled.
>
> Regards,
> R.


I agree that it's unusual. It seemed strange to me when I first got the 
notebook. One of my typical first moves is to check hdparm on all drives 
& be sure they're set to 32-bit with DMA on. I remember that I had some 
trouble with it when I first got it, but I was more concerned with 
getting the graphics driver & wireless network operation running 
properly at the time. However, when I checked, the DVD drive had only 
16-bit & DMA was off. So, I must have forgotten to get back to that. I 
set the 32-bit, but the DMA won't set to on:

# hdparm -Iv /dev/dvd

/dev/dvd:
 IO_support   =  1 (32-bit)
 unmaskirq    =  0 (off)
 using_dma    =  0 (off)
 keepsettings =  0 (off)
 readonly     =  0 (off)
 readahead    = 256 (on)
 HDIO_GETGEO failed: Inappropriate ioctl for device

ATAPI CD-ROM, with removable media
        Model Number:       SONY DVD+/-RW DW-Q58A                  
        Serial Number:     
        Firmware Revision:  UDS2   
Standards:
        Supported: CD-ROM ATAPI-2
Configuration:
        DRQ response: 50us.
        Packet size: 12 bytes
Capabilities:
        LBA, IORDY(cannot be disabled)
        DMA: mdma0 mdma1 mdma2 udma0 udma1 *udma2
             Cycle time: min=120ns recommended=120ns
        PIO: pio0 pio1 pio2 pio3 pio4
             Cycle time: no flow control=240ns  IORDY flow control=120ns
Commands/features:
        Enabled Supported:
           *    PACKET command feature set
           *    DEVICE_RESET command
           *    Mandatory FLUSH_CACHE

What surprised me is that the DMA goes no higher than UDMA2, but when I 
checked another DVD drive on one of my test systems, it showed going no 
higher than UDMA2 as well and that drive, a Toshiba SD-R5372, accepted 
turning DMA on, so UDMA2 is not the problem. Here's what the attempt to 
turn DMA on for the Sony drive reports:

# hdparm -d1 /dev/dvd

/dev/dvd:
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Operation not permitted
 using_dma    =  0 (off)

So, the notebook system's Sony drive just won't accept turning DMA on. 
Could be a problem with the Linux driver and that drive, or the drive 
design is simply too crippled. BTW, interestingly, my notebook's hard 
drive, a Samsung HM160JI, supports UDMA5 but doesn't let me check it and 
doesn't let me change it from 16-bit to 32-bit:

# hdparm /dev/sda

/dev/sda:
 IO_support   =  0 (default 16-bit)
 readonly     =  0 (off)
 readahead    = 256 (on)
 geometry     = 19457/255/63, sectors = 312581808, start = 0

# hdparm -c1 -d1 /dev/sda

/dev/sda:
 setting 32-bit IO_support flag to 1
 HDIO_SET_32BIT failed: Invalid argument
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Inappropriate ioctl for device
 IO_support   =  0 (default 16-bit)

# hdparm /dev/sda

/dev/sda:
 IO_support   =  0 (default 16-bit)
 readonly     =  0 (off)
 readahead    = 256 (on)
 geometry     = 19457/255/63, sectors = 312581808, start = 0

Yet, I get no delays associated with playing the dumped VOB from the 
hard drive.

Setting 32-bits on the DVD drive did seem to resolve some of the 
problem. Using a cache helped a bit more. When I use a cache the problem 
goes away until the system starts accessing the disk drive. With a 
"-cache 20480" that happens about 8m30s into the movie. Once the disk 
drive access starts the video jumps frequently; looks like frame 
dropping. If I use a larger cache, the drive access to fill the cache 
while the video plays causes the frame dropping. So, adding -cache-min 
99 seems to stave off a lot of this problem if I make the -cache setting 
huge. Still, eventually the cache runs out enough that disk access will 
kick in again to cause frame dropping. With 2G of memory, I threw an 1G 
(max allowed) cache at the problem, which takes quite some time to load, 
and even that started accessing the disk after about 14m20s.

--Larry



More information about the MPlayer-users mailing list