Determine DVD+R write capability in Ubuntu


I’m writing some software to assess the state of optical drives for a hardware recycling program. It’s written in Python and will be running on Ubuntu 9.10.

I’ve found cdrkit to be useful, specifically ‘wodim dev=/dev/sr0 -prcap’ to list the drive’s capabilities, but it doesn’t tell whether or not a drive is DVD+R capable, only DVD-R.

Does anybody know a good way to determine whether a drive can write DVD+R, either with a command line tool, or by examining something in /proc, or similar? This is one of the first things that the program needs to do as we want to recycle drives that are not capable instead of reusing them.


Bump. I still haven’t been able to figure out how to query the drive to determine DVD+R write capability, other than maybe to just try to do it with ‘wodim’ and see if it fails? Any help?

Figures, 5 minutes after I post in frustration, I do just a couple more Google searches before giving up for a while and find something new.

In Ubuntu, at least:

hal-find-by-capability --capability storage.cdrom

to get a UDI

lshal -u [udi]

reveals the drive’s capabilities one by one, including plusr, dvdram, etc. Dunno about lightscribe.

See also