View Full Version : How to (batch) check VOB integrity?
MikeTR
16th March 2009, 12:08
Since my HTPC's HDD crashed I've encoutered some corrupted DVD rips (CRC type failure).
Is there a method (preferably with a batch option) to do an integrity check on all VOB's present on the drive?
It would take me forever to manually play through all the content and check for errors.
setarip_old
16th March 2009, 19:14
Hi!
Regardless of the discovery method, the end result would be the same - namely, if the hard drive copy is corrupted,you'll have to re-rip your original DVD.
Therefore, I'd suggest that the simplest, least time consuming method would be to only concern yourself with discovering such problems when you are viewing a (hard drive copy) DVD.
Once discovered, make a new backup from your original, commercial DVD...
MikeTR
16th March 2009, 19:27
:thanks:, but I was kinda hoping to find a way to avoid being confronted with a corrupt rip just when I sit down to watch a movie (with the popcorn al ready and done) :D.
pc_speak
16th March 2009, 21:00
Perhaps you could copy the files to nowhere.
From a command prompt;
c:\MYdvds\TGE>copy VTS_01_1.VOB NUL
If the copy is successful then the file is OK. i.e. no CRC error.
I have not tested this.
Save the following 2 lines with notepad as a batch file, say test.cmd in the root folder of the VOBs. Run test.cmd by double left clicking on it. All VOBs in that folder and subfolders will be copied. Then the batch file will pause.
for /R %%a in ("*.VOB") do copy %%a NUL
pause
You will have to watch the screen for success/failure as I don't think the batch file will halt if a CRC error is found.
Perhaps a fellow member will know, or expand on the batch file. :)
p.s. If you're still using the HDD that crashed then chances are good that you have bad sectors on it. I've found this to be the most common cause of CRC errors.
TinTime
16th March 2009, 23:48
As a slight expansion of pc_speak's script try...
@echo off
for /R %%A in ("*.VOB") do call :sub1 "%%A"
pause
exit /b 0
:sub1
copy %1 NUL
if %errorlevel% neq 0 echo %1>>error_file.txt
exit /b 0
This should output the names of any files that fail the copy command to error_file.txt in the directory you run the script from. I'm assuming that copy will return a non-zero code if it encounters a CRC error.
MikeTR
17th March 2009, 10:20
Thanks for the reply & script guys. Suddenly had an idea myself (yes it happens).
Way back in the early CD days, I remember using CD Check to verify questionable burns. Dug up an old version, lo and behold, it seems to work.:D
At least, it returned a CRC error on two files I knew to be corrupted and read several others just fine.
I'll check the entire disk and if it fails I still have the scripts to try out.:thanks: To be on the safe side , I'll test the disk surface itself too.
fibbingbear
24th March 2009, 22:37
Although the original poster solved the problem, I'm curious pc_speak, how would your version detect errors? Doesn't copy just do a byte-for-byte copy without any error checking?
pc_speak
24th March 2009, 23:24
Aah. Now you've got me thinking.
Is it copy or xcopy?
CRC errors DO occur and the error condition IS displayed.
It's one or the other.
Research time. I'll get back to you. :)
pc_speak
25th March 2009, 01:58
I'm running Windows XP Pro with all patches.
Had to go through a lot of backup CDs and approximately 200,000 files before I got an error.
I started in the year 2007 and went backwards. Probably should have started in 1999 and gone forward.
This is from a 'CMD' prompt (DOS box):
M:\Olympiade\DOCS\1 Brochures 2005>xcopy "olympiade2.mpg" c:\a
M:olympiade2.mpg
File creation error - Data error (cyclic redundancy check).
M:\Olympiade\DOCS\1 Brochures 2005>copy "olympiade2.mpg" c:\a\
Data error (cyclic redundancy check).
0 file(s) copied.
M:\Olympiade\DOCS\1 Brochures 2005>
___________________________________________________________________________
This is from a 'COMMAND' prompt (DOS box):
M:\OLYMPI~4\DOCS\1BROCH~2>xcopy olympiade2.mpg c:\a
M:olympiade2.mpg
File creation error - Data error (cyclic redundancy check).
M:\OLYMPI~4\DOCS\1BROCH~2>copy olympiade2.mpg c:\a\
Data error (cyclic redundancy check).
0 file(s) copied.
M:\OLYMPI~4\DOCS\1BROCH~2>
It's not a a byte-for-byte copy without any error checking!?
(I hate making statements like that. I tend to suffer from foot & mouth disease.)
Cheers!
fibbingbear
25th March 2009, 03:37
Are these CRCs embedded in the MPG2 files, or are they apart of the Windows NTFS system?
If they're embedded in MPG2, and copy is smart enough to extract and check them, that's pretty crazy.
pc_speak
25th March 2009, 05:33
There you go!
http://en.wikipedia.org/wiki/Cyclic_redundancy_check
Clear as mud. I got lost in translation. Have no idea.
;) :rolleyes: :D
kypec
25th March 2009, 07:34
IIRC copy/xcopy commands do not perform any special checksum verification apart from the functions provided by OS/host controller interface of media reader. The OS requests the contents of the file (be it MPG, VOB or whatever else) via its FS (Filesystem). FS driver layer communicates with the host controller (DVD drive SATA/PATA, HDD SATA/PATA, Flash storage USB...) which further asks its internal firmware to retrieve data off the physical media itself (sectors on DVD/HDD surface, flash cells...) This firmware must ensure the data read are reliable (some CRC mechanisms/parity checks might be performed on these single blocks of data). Should the reading fail the firmware reports such error to the host which further propagates it to the OS. And that's when copy command fails with some ERROR CODE as being unable to fetch data contained in the particular file.
fibbingbear
25th March 2009, 17:51
Hey Kypec. So you're saying in this case, the CRC might be in the hardware level (at the hard drive)? That would make sense to me.
It's my understanding that MPG2 has its own checksum that can be embedded in the format (to do software-level verification), but it looks like copy/xcopy is not touching that.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.