From owner-freebsd-questions@FreeBSD.ORG Thu Jul 1 08:55:21 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2641116A4CE for ; Thu, 1 Jul 2004 08:55:21 +0000 (GMT) Received: from fw.farid-hajji.net (fw.farid-hajji.net [213.146.115.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 625CE43D1F for ; Thu, 1 Jul 2004 08:55:19 +0000 (GMT) (envelope-from cpghost@cordula.ws) Received: from fw.farid-hajji.net (localhost [127.0.0.1]) by fw.farid-hajji.net (Postfix) with ESMTP id CA2AF4AC9C for ; Thu, 1 Jul 2004 10:57:12 +0200 (CEST) From: Cordula's Web To: freebsd-questions@freebsd.org X-Mailer: Emacs-21.3.1/FreeBSD-5.2.1-RELEASE Message-Id: <20040701085712.CA2AF4AC9C@fw.farid-hajji.net> Date: Thu, 1 Jul 2004 10:57:12 +0200 (CEST) Subject: Reading a DVD with a scratch X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: cpghost@cordula.ws List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2004 08:55:21 -0000 Hi, I've got a DVD with a 1.2cm scratch nearly parallel to the track. This doesn't prevent mounting, and mplayer can play all other .vob files. The scratch happens to be in the middle of a single .vob file, so when mplayer reaches it, it freezes and a lot of READ BIG messages appear on the console (as expected). Now the question: is there a way to read up to the scratch, seek forward to skip that region, and then to continue reading? The idea is to dd as much of the .vob file as possible up to the scratch; skip (how much? how to find out? reading the file backwards?) then dd the rest of the file, and cat both parts. The problem probably boils down to: how can a process detect beginning and end of the scratch, without freezing in read(2)? Any ideas how to do it? Thanks, -cpghost. -- Cordula's Web. http://www.cordula.ws/