See
http://www.srcf.ucam.org/~cjk32/dvdid/
The dvdid project provides a library and executable for calculating dvdids, as returned by Windows' IDvdInfo2::GetDiscID() method. It is available as source code, which should compile on Windows and any POSIX compliant platform.