Read dvd-rom optimum transfer Length

I want to read a DVD-ROM through the cdb read command from the mmc specification opcode 28h. I issue the command through DeviceIoControl and SCSI_PASS_THROUGH_DIRECT. I am unsure what’s the optimum transfer length in the cdb command for fastest reading. When I look at isobuster with bushound they read 32 sectors at a time before issuing the next command. But I also see DVD-ROM-Readers with a maximum transfer capacity of 131.072 Bytes (2048 Bytes * 64 sectors). What’s best?

My next question is related to the problem. If I read more than one sector at a time for example 32 sectors, what will happen if one of that 32 sectors is unreadable. Will the complete output buffer (32 sectors) be corrupted or will only the unreadable sector be zeroed out, if the buffer was memset with zero before? Or will the buffer be good till the position of the sector and there after be defective or zero? Sorry for my noob questions. But I can’t find answers on the net and in the mmc docs.


Some of the answers are in the mmc docs. DVDs use ECC blocks. One ECC block = 16 sectors (2048 = one sector) or 32K sized blocks. So the minimum transfer buffer must be 32K. It can also be bigger (much) but it has to be in multiples of 32K i.e. 64K, 128K, etc.

The optimum transfer length is something you can play with to determine but it’s always limited by what your system’s HA can tranfer in one go. In SPTI, I use IOCTL_STORAGE_QUERY_PROPERTY, StorageAdapterProperty. The “MaximumTransferLength” field returns the limit. So with DVDs you can play
around between the min & max to see what gets you the fastest reads.

If you are dealing with video, there are some good open source programs that might help. My favorite is VideoLan’s VLC at It works great to play movies. I haven’t looked at the source but they must be doing something right.


Thanks for the help. But I tested with DeviceIoControl and had some other results on this. The optimum size seems to be 32 sectors at a time. A multiple of this doesen’t seem to be faster.

If in the buffer (32 sectors size) occurs a read error, the complete buffer is empty. So best is to re-read the block sectorwise.

There’s an error in the above! If an read error occurs it is not good to read sectorwise. It’s good to read the same sectors but 16 sectors at a time. I gives the best error correction possible.

But for the sake of anyone who might read this thread in future, a good DVD read routine involves a half donzen (at least) mmc device commands to get “optimal” read performance. And that’s just data. Add another half dozen for video.

If a Read10 with 32K chunks gets you everything you need then great. You’ve saved yourself a lot of time, study and hair pulling :wink:


I find out that if you can’t read the 16 sector block, because some sectors are bad, it can be good to read the block again sector after sector to get those sectors which are good. I analysed isobuster with bushound and it seems they read 32 sectors at a time, if an error occurs they read the 32 sectors again, after that they read 3 times every single sector of the block. I get a better read result when I do this thing for more than 3 times. Some discs respond after having read more than 6 times the same sector. Isn’t there anyone who programmed this for best performance and error correction on data DVD’s and can give me tips?