2007-11-17 11:35:36

by Tobias

[permalink] [raw]
Subject: [REQUEST] Option for skipping unreadable blocks on Video DVD

If you are accessing a scratched Video DVD and the device cannot read it, the
process ends.
What about a more tolerant way to handle unreadable blocks.
Especially on Video DVDs single blocks are not that important than on data
dvds.

So is there a way that the kernel tells the device to skip these bad blocks?

Tobias


2007-11-18 04:58:32

by Robert Hancock

[permalink] [raw]
Subject: Re: [REQUEST] Option for skipping unreadable blocks on Video DVD

Tobias wrote:
> If you are accessing a scratched Video DVD and the device cannot read it, the
> process ends.
> What about a more tolerant way to handle unreadable blocks.
> Especially on Video DVDs single blocks are not that important than on data
> dvds.

If the DVD player process ends from this, I'd say that's the fault of
the player software not handling errors properly.

I think that if they are using the normal block layer accesses on the
DVD device, there may be some retries that occur which are likely
undesirable in this case since they will just stall playback. If they
are using SG_IO to feed raw requests into the drive (which I imagine
they need to do for CSS authentication, etc. anyway), then all error
handling is passed up to the user application.

>
> So is there a way that the kernel tells the device to skip these bad blocks?

We don't know they're bad until we try and read them. How long the drive
will stall trying to read that sector before giving up and returning an
error is up to the drive. I'm not sure if the MMC command set allows any
way to tell the drive to give up more quickly or not..

--
Robert Hancock Saskatoon, SK, Canada
To email, remove "nospam" from [email protected]
Home Page: http://www.roberthancock.com/

2007-11-18 22:34:35

by Tobias

[permalink] [raw]
Subject: Re: [REQUEST] Option for skipping unreadable blocks on Video DVD

Am Sunday 18 November 2007 schrieben Sie:
> Tobias wrote:
> > If you are accessing a scratched Video DVD and the device cannot read it,
> > the process ends.
> > What about a more tolerant way to handle unreadable blocks.
> > Especially on Video DVDs single blocks are not that important than on
> > data dvds.
>
> If the DVD player process ends from this, I'd say that's the fault of
> the player software not handling errors properly.
>
> I think that if they are using the normal block layer accesses on the
> DVD device, there may be some retries that occur which are likely
> undesirable in this case since they will just stall playback. If they
> are using SG_IO to feed raw requests into the drive (which I imagine
> they need to do for CSS authentication, etc. anyway), then all error
> handling is passed up to the user application.

Normal apps like cp are ending because of Input/Output error.
I did some researches and
dd if=/dev/hdc of=image.iso conv=noerror,sync bs=1M
does everything I want for whole Video Dvds. It skips unreadable blocks.
But I get recorded tv shows from friends and there is the same as with
scratched dvds. Now the problem is that there are several .avi files on it.
So I cannot use dd.

> > So is there a way that the kernel tells the device to skip these bad
> > blocks?
>
> We don't know they're bad until we try and read them.
> How long the drive will stall trying to read that sector before giving up
>and returning an error is up to the drive.

It would be enough that the drive does not report it as a error. If it would
be a warning it may be skipped.

> I'm not sure if the MMC command set allows any
> way to tell the drive to give up more quickly or not..

How can I figure this out? The best way would be a special command that all
user apps can use which tells the drive to skip all of these bad blocks. With
this you could turn it on if you want to watch movies where single bytes are
not that important or turn it off if you want to have a identical copy of the
dvd.

By the way, I am surprised that I am the only one who has problems with this.

Tobi

2007-11-26 12:16:45

by Pavel Machek

[permalink] [raw]
Subject: Re: [REQUEST] Option for skipping unreadable blocks on Video DVD

Hi!

> > I think that if they are using the normal block layer accesses on the
> > DVD device, there may be some retries that occur which are likely
> > undesirable in this case since they will just stall playback. If they
> > are using SG_IO to feed raw requests into the drive (which I imagine
> > they need to do for CSS authentication, etc. anyway), then all error
> > handling is passed up to the user application.
>
> Normal apps like cp are ending because of Input/Output error.
> I did some researches and
> dd if=/dev/hdc of=image.iso conv=noerror,sync bs=1M
> does everything I want for whole Video Dvds. It skips unreadable blocks.
> But I get recorded tv shows from friends and there is the same as with
> scratched dvds. Now the problem is that there are several .avi files on it.
> So I cannot use dd.

dd works with files.


--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html