Creating .iso from DVD problem ( looking for alternatives / suggestions )

I want to be able to copy DVD disks directly to an ISO file from the command line (via bash script).

I have such a script that I have refined over time that works quite well about 80% of the time.

About two DVD's out of ten will not burn to an iso file, and the script hangs on one of the commands.

A larger percentage shows some sort of error at the beginning, indicating a problem, but eventually it
does create the .iso file.

---
For these DVD's I really need an alternative, hopefully something I can run on the command line.
I am not looking for a GUI replacement where I would be required to click. I am looking to make an
exact and complete image of the DVD for backup purposes.

The problem does not lie with the DVD but with the software used to create the .iso file. I have
tried getting another DVD (exact one), and it hangs in the exact same place, I have tried up to
four DVD's at one time returning each one to the store where I purchased it saying that it was "not playable".

In truth it was playable in a DVD player, but I could not rip it to a .iso file.

What are my alternatives here? Is there anyone out there maintaining these utilities that could fix the bugs?

I have even tried putting the same DVD into a windows box and having HandBrake read it, but even HandBrake
cannot read the DVD.

They are clearly bugs and when I search on the error messages they have been reported many, many, many, many
times and the utilities remain outdated.

---
These are the commands I am using in my script (if there are better/updated utils or even alternatives that would give me the same output, please advise):

To get the DVD title (that I use later in as a variable to mkisofs):

TITLE="$lsdvd /dev/sr0 | head -1 | awk '{print $3}')"
The above command works most of the time.  On older DVD's it consistently returns "DVD_VIDEO" or sometimes nothing at all, but most of the time it returns something meaningful.

To mount the DVD:

mount /mnt/dvd0
This is the entry in my fstab file:
/dev/sr0 /mnt/dvd0 iso9660 noauto,user,ro,unhide 0 0
\(any suggestions with the above entry?\)

To copy the DVD onto disk:

vobcopy -m -l -i /dev/sr0
This creates a directory with the name of the video onto my hard disk drive.  Ideally would like to go straight to .iso if that would be
quicker, but not sure how to skip this step, if anyone is aware of alternatives, please let me know.

I then unmount the DVD

umount /dev/sr0

I then eject the DVD (but many times the tray will not stay open - I want it to stick open, but it retracts and closes (any ideas here?)

eject -r /dev/sr0

The last step is to create the .iso file from the folder that was created, then I delete the folder

mkisofs -quiet -dvd-video -V"${TITLE}" -o ${TITLE}.iso ${TITLE}

After this command completes, I usually have my .iso ( 8 out of 10 times)

rm -rf $TITLE

---
Errors:

Much of the time, the script simply starts creating the directory on disk and then hangs. Sometimes my machine will reboot (using the latest version of CentOS).

The last thing I see in the terminal window is something like:
454MB of 1024MB written ( 44.4% ) and it will sit there overnight and go no further.

I have purchased an advanced DVD cleaner, purchased the DVD new \(multiple times\) and get the same message each and every time with every DVD.

The above is the more common case.

Less common is an error message from libdvdread:

*** libdvdread: CHECK_VALUE failed in /builddir/build/BUILD/libdvdread-4.1.4/src/ifo_read.c:1147 ***
	*** for data + sizeof(ptt_info_t) <= vts_ptt_srpt->last_byte + 1 + 4 ***
It repeats the above over and over and then craps out.

any ideas on a replacement for 'libdvdread' that is being maintained?

Sometimes I get this:

libdvdread: Using libdvdcss version 1.2.11 for DVD access
	Please send bug report - no VTS_TMAPT ??
This message \( "Please send bug report..."\) gets repeated over and over and has been logged countless times with no remedy.

I have thought of learning how to program to pick up this project and fix the issue.  It would be pointless to report the problem at this point.
At this point I am looking for an alternative.

I get various errors from time to time, but the offender seems to be 'libdvdread' and it's libraries. I have updated my system and am on the latest/greatest rpm's specifically
for my Linux version.

If there are utilities that I can run from the command line as a libdvdread alternative, or you have any suggestions, please advise.

If you require ISO's only (the copy part), considering using dd

dd if=/dev/sr0 of=/folder/dvd.iso

That does not work. I tried that before posting. Do you have any other ideas?

I would have thought that an entry of

/dev/sr0 /mnt/dvd0 auto ro,user,unhide   0      0

or similar would be more appropriate as many DVDs are not in iso9660 format.

that sounds good, will give that a try and see if that makes a difference, I think I picked that up from googling how to mount a dvd, but did not realize the difference (just copied the line into the file).

thanks