View Full Version : Get DVD-Video disc DVDid and then scrape metadata info and artwork online for it?
Is there a way to get the dvd disc title or any other metadata, since this
System.DVDLabel is not getting anything maybe only works in Xbox.
maybe something like this app. (http://www.meedios.com/forum/viewtopic.php?p=47909) can be port in xbmc
more info (http://msdn.microsoft.com/en-us/library/ms785496.aspx)
more info (http://dvdxml.com/news.php)
more info (http://www.e-home.no/metaservices/search.aspx)
Gamester17
2009-06-18, 18:09
Does TheMovieDB.org (TMDb) (http://www.themoviedb.org), IMDb.com (IMDb) (http://www.imdb.com), or any other online movie database list DVDid? ???
Does TheMovieDB.org (TMDb) (http://www.themoviedb.org), IMDb.com (IMDb) (http://www.imdb.com), or any other online movie database list DVDid? ???
no that I know, but dvdxml have an API here (http://api.dvdxml.com/documentation.txt)
that could work and would be great see the same mods under movies and tvshows library on any dvd disc inserted in XBMC.
ultrabrutal
2009-06-19, 10:08
dvdxml is charging $20 for a user account plus their data is obtained in an illegal way I'm told, so it's probably not the best way to go.
MyMovies.dk on the other hand has these dvdid's in the data base and they are obtained in a legal way since all the data is user submitted.
You could talk to Brian from MyMovies about gaining access to their powerful webservice. MyMovies users who have 2500 contribution/donation points already have free access. Non contributing users could probably get past by donating $20.
MyMovies.dk is also WAY faster than for example themoviedb.org (because money coming in is used on fast servers and internet access) and the database is very complete including dvd covers, hddvd/bluray covers, posters and backdrops.
I was just bring in the idea because am not on that level of programming at all I mean writing a service or a plugin/addon to do this..
So it would be better if someone with more knowledge talk with Brian to make this happen and be able to use that service .
Gamester17
2009-06-19, 15:51
MyMovies.dk on the other hand has these dvdid's in the data base and they are obtained in a legal way since all the data is user submitted.
You could talk to Brian from MyMovies about gaining access to their powerful webservice.You should then IMHO instead request the MyMovies authors/admins to submit (donate/contribute) this DVDid metadata information to TheMovieDB.org (TMDb) (http://www.themoviedb.org) for movies, and to TheTVDB.com (http://www.thetvdb.com) for TV Shows.
Both these two sites are community driven and used both practically all open source media center and media manager software, as well as quite a few commercial media center and media manager software as well.
It would be much better for all if this information was collected in one or two places that share this data for free through an on API for open source applications, such as TheMovieDB.org (http://www.themoviedb.org) and TheTVDB.com (http://www.thetvdb.com) does.
You should then IMHO instead request the MyMovies authors/admins to submit (donate/contribute) this DVDid metadata information to TheMovieDB.org (TMDb) (http://www.themoviedb.org) for movies, and to TheTVDB.com (http://www.thetvdb.com) for TV Shows.
Both these two sites are community driven and used both practically all open source media center and media manager software, as well as quite a few commercial media center and media manager software as well.
It would be much better for all if this information was collected in one or two places that share this data for free through an on API for open source applications, such as TheMovieDB.org (http://www.themoviedb.org) and TheTVDB.com (http://www.thetvdb.com) does.
Indeed..!
I know that these functions can be overlook since almost nobody use discs anymore, I notice because the other day i insert a dvd movie and it just show the word "DVD" no even the dvd label that have the name in it, but it would be a great addition to xbmc.
ultrabrutal
2009-06-19, 19:51
Gamester, MyMovies is community driven also? Perhaps a scraper for it will turn up. ;)
I coded the reading of mymovies.xml files but they are only stored if you use the mymovies client and/or server. If data is needed without a pc/server, then the webservice could be opened and used from a "scraper".
When you have a server you really don't want to use a scraper but rather just have the server do the id of the media and download the metadata correctly and without your intervention. Mymovies uses the discid from Windows to figure out which media is inserted. It can even rip movies to disk automaticly (if anydvd is installed).
A WHS is great since mymovies has a version for it, if anyone is looking for a NAS. I exchanged my 2 NAS'es with a HP MediaSmart WHS.
I sound like a commercial lol. Better stop now
ultrabrutal
2009-06-19, 20:07
oh any by the way, there is a difference between a movie (themoviesdb.org, imdb etc) and a movie release (dvd, dvd special edition, hd-dvd, blu-ray, etc). MyMovies has data for the latter...
Gamester, MyMovies is community driven also? Perhaps a scraper for it will turn up. ;)
I coded the reading of mymovies.xml files but they are only stored if you use the mymovies client and/or server. If data is needed without a pc/server, then the webservice could be opened and used from a "scraper".
When you have a server you really don't want to use a scraper but rather just have the server do the id of the media and download the metadata correctly and without your intervention. Mymovies uses the discid from Windows to figure out which media is inserted. It can even rip movies to disk automaticly (if anydvd is installed).
A WHS is great since mymovies has a version for it, if anyone is looking for a NAS. I exchanged my 2 NAS'es with a HP MediaSmart WHS.
I sound like a commercial lol. Better stop now
I was using My Movies in my WHS back then when I use VMC, but I change to XBMC but my media still in WHS.
What would be the best method to approach this python plugin, script, add-on, built-in function, ect.. ?
ultrabrutal
2009-06-19, 20:36
reaven, why did you stop using MyMovies then? I use MyMovies on WHS with XBMC because I coded support in XBMC to read mymovies.xml files and MyMovies has now even real support for XBMC NFO files... So it works for both existing collections and new ones. I have seen no scraper match the correctness and speed of MyMovies plus you even have the PC application to fix any mistakes
ultrabrutal
2009-06-19, 20:38
dvdid is available on Windows OS. How to do it is a secret so you need to reverse engineer MS' code to be able to implement it in Linux etc. However I know how to obtained already reverse engineered code but it cannot be used without permission
dvdid is available on Windows OS. How to do it is a secret so you need to reverse engineer MS' code to be able to implement it in Linux etc. However I know how to obtained already reverse engineered code but it cannot be used without permission
but that code isn't in C# ?
reaven, why did you stop using MyMovies then? I use MyMovies on WHS with XBMC because I coded support in XBMC to read mymovies.xml files and MyMovies has now even real support for XBMC NFO files... So it works for both existing collections and new ones. I have seen no scraper match the correctness and speed of MyMovies plus you even have the PC application to fix any mistakes
laziness maybe, the change was not like that before I use XBMC my WHS broke on me and I has to rebuild my whole library I lost half of my music collection and all my tv shows library at that time I didn't find the time to install all the necessary again and then I switch to XBMC.
I even forget many things about MyMovies like the only thing I need to make it work with XBMC is My Movies for WHS and a client, which one, client only or client server ?
ultrabrutal
2009-06-19, 20:53
reaven, nope c/c++
mymovies, well you install whs version or server or client. make it point to your collection(s), setup any additional file extensions. iso's and folders of dvd's and bluerays are identified automaticly and correctly based on the dvdid. for other movies it looks for imdb id in nfo file, uses the foldername etc.
I think less than 5 out of my 450 movies were identified incorrectly - much better than when I used IMDB scraper :)
Give it a go again. I can highly recommend it!
well you install whs version or server or client.
thats what I mean which version? all my media is in WHS my everyday machine is a Vista laptop and my XBMC machine is a Mac, besides what will MyMovies will do for me all my media is in .mkv am using MIP(Media Info Plus)
How to do it is a secret so you need to reverse engineer MS' code
I didn't know that was secret, is in their MSDN
I will try to make a sample C app. to get the id I know a little C
IDvdInfo2::GetDiscID
ultrabrutal
2009-06-19, 22:40
if you have a WHS then use the WHS version :)
MyMovies will automate and give you better results than MIP (at least when I compared them back then). MIP even wasted all my own NFO's. MyMovies does not do that.
MSDN contains the source code for the GetDiscID function? Remember XBMC is crossplatform so Windows only is not very nice (I will use Ubuntu on a ION soon)
MSDN contains the source code for the GetDiscID function?
http://msdn.microsoft.com/en-us/library/dd376453(VS.85).aspx
well it have the C/ C++ code to make it work.
if you have a WHS then use the WHS version
so thats include a client program to control it or you configure the version that is install in WHS?
Binnerup
2009-06-20, 10:17
reaven: What ultrabrutal is trying to say is that the GetDiscId function you refer to there is a Windows API call.
This means that it cannot be used on the other platforms that XBMC runs on.
ohhhhhhhhhhhhhhhh, ok now I get it the solution would be find out how IDvdInfo2::GetDiscID calculate the crc64 id so you dont have to use the windows API
Dont know if this is the same http://code.activestate.com/recipes/259177/
ultrabrutal
2009-06-20, 13:50
reaven, far from :) I have seen the code (am programmer myself) and it does a whole lot more than that
reaven, far from :) I have seen the code (am programmer myself) and it does a whole lot more than that
well am out of ideas then ....:sad:
anyway why System.DVDLabel is not working? is that just for the xbox ?
at least with that most of the time you get the movie title.
ultrabrutal
2009-06-21, 02:09
reaven, like I said... It might be possible to use the reverse engineered code if we ask for permission, however you need to get a developer interested and then I'll work on getting the code needed for discid on all platforms
reaven, like I said... It might be possible to use the reverse engineered code if we ask for permission, however you need to get a developer interested and then I'll work on getting the code needed for discid on all platforms
permission from who? Microsoft... that would be fun!
you mean an XBMC developer..I can make a feature request ticket in trac maybe that would get the attention of the developers, and you could let them know you can make that possible, maybe comment it in the request. I will make the request and post the ticket here so you can go to the page and commented.
anyway here it is.
http://xbmc.org/trac/ticket/6800
ultrabrutal
2009-06-21, 17:18
Permission from the guy who reverse engineered the Microsoft code and asked not to pass it on. I have the code in my possession!
Permission from the guy who reverse engineered the Microsoft code and asked not to pass it on. I have the code in my possession!
mhhhhhhhh...we are getting somewhere then...if you know the guy well ask him by all means !!
ultrabrutal, does the reversed source require a dvd/iso or can it generate the crc64 based on the contents of teh VIDEO_TS folder?
voidunknown
2009-07-08, 22:42
dvdxml is charging $20 for a user account plus their data is obtained in an illegal way I'm told, so it's probably not the best way to go.
This is most incorrect. The DVDID's on the site are user contributed. Where would we find DVDIDs to steal from if we are the largest DVDID database? That's just silly. Proper credit is also given for meta data sources and several Microsoft employees regularly use and contribute to DVDxml.com.
ultrabrutal, does the reversed source require a dvd/iso or can it generate the crc64 based on the contents of teh VIDEO_TS folder?
I'm not Ultrabrutal, but I can answer this for you. The CRC64 data requires the ORIGINAL DVD. If you have a copied, burned, ISO'd or ripped DVD, it changes the CRC64. You MUST have the original disc.
ultrabrutal
2009-07-09, 00:58
ultrabrutal, does the reversed source require a dvd/iso or can it generate the crc64 based on the contents of teh VIDEO_TS folder?
Well, CRC is calculated from stuff like file datetime and content of some of the files. So if these are kept intact you can do it without the original disc.
Now, some of these files can be encrypted with CSS and therefore give you a wrong checksum, if CSS has been removed from your files, but afaik mymovies gets by this by having multiple discid's and it's own algorithm for this.
So mymovies recognizes your backup's too - and so could XBMC, if mymovies webservice is used. I know this because I tested with both DVD and Blu-ray backup's I had done
if the copy is a 1:1 I dont see any problem at all,
BTW whats the word Ultra you haven't receive any answer about this on the trac?
Well, CRC is calculated from stuff like file datetime and content of some of the files. So if these are kept intact you can do it without the original disc.
Now, some of these files can be encrypted with CSS and therefore give you a wrong checksum, if CSS has been removed from your files, but afaik mymovies gets by this by having multiple discid's and it's own algorithm for this.
So mymovies recognizes your backup's too - and so could XBMC, if mymovies webservice is used. I know this because I tested with both DVD and Blu-ray backup's I had done
Thanks for the info. Ran Process Monitor against it and it definately reads a pattern of offsets in VIDEO_TS.IFO among other things.
Is this ID the same ID as the DVD serial number ?
see http://lists.mplayerhq.hu/pipermail/dvdnav-discuss/2009-January/000963.html
ultrabrutal
2009-07-09, 09:55
BTW whats the word Ultra you haven't receive any answer about this on the trac?
He never replied, so I'm afraid it's a dead end for now. :(
Maybe someone else can reverse engineer the function?
ultrabrutal
2009-07-09, 10:06
This is most incorrect. The DVDID's on the site are user contributed. Where would we find DVDIDs to steal from if we are the largest DVDID database? That's just silly. Proper credit is also given for meta data sources and several Microsoft employees regularly use and contribute to DVDxml.com.
Yes, the DVDID's might be user contributed, but the meta data is obtained from Microsoft's service for MCE. This data comes from AMG (All Movie Guide) which Microsoft has a license for. Now you don't have to use MCE or even Windows to view this data without having any software or license yourself. Examples:
http://dvdxml.com/download/view.php?xml_id=47610
http://dvdxml.com/download/view.php?xml_id=47636
http://dvdxml.com/download/view.php?xml_id=47968
Notice that "..., All Movie Guide" at the end of the overviews?
Do DVDXML.COM have a license for AMG? That's the question to be answered.
I'm not Ultrabrutal, but I can answer this for you. The CRC64 data requires the ORIGINAL DVD. If you have a copied, burned, ISO'd or ripped DVD, it changes the CRC64. You MUST have the original disc.
The files used for the calculation must be unchanged yes. But like I write in another post, there are ways around that when using mymovies instead of DVDXML.com :)
ultrabrutal
2009-07-09, 10:10
Is this ID the same ID as the DVD serial number ?
see http://lists.mplayerhq.hu/pipermail/dvdnav-discuss/2009-January/000963.html
No I don't think so without looking at what mplayer refers to as DVD serial number. DVDID is also refered to as CRC64.
Do you post mean you are interested in this automatic and correct identification of movies? ;)
ultrabrutal
2009-07-09, 10:11
Thanks for the info. Ran Process Monitor against it and it definately reads a pattern of offsets in VIDEO_TS.IFO among other things.
Sound's like you are on the right track to reverse engineer this yourself :)
He never replied, so I'm afraid it's a dead end for now. :(
Maybe someone else can reverse engineer the function?
you could maybe pm one of the developer so you can submit a patch for that ticket since you have the solution.
ultrabrutal
2009-07-09, 10:22
you could maybe pm one of the developer so you can submit a patch for that ticket since you have the solution.
I cannot give out this code sorry. Someone else needs to reverse engineer the code for XBMC use. Not even Wine has this function implemented to loan from :(
ultrabrutal
2009-07-09, 11:28
DvdId only works for dvd's and not blu-ray/hd-dvd's. Of course it would be nice to have proper matching of DvdId against mymovies/dvdxml to get metadata, but wouldn't we rather be able to match all different kinds of media?
I suggest we develop a new Open ID which we get users to submit to all the different meta data databases. If we are even cleaver enough, this ID can cover containers also (MKV for example).
Databases
How do we get interest for users to submit our open id to databases and how do we get database owners to add support for our id? Well the benefit for automatic correct matching of movies speaks for itself. No more need to search titles and end up with automatic picking a wrong title and having to manually correct this in the library.
TheMovieDB only has movie data and not info about releases.
MyMovies has info about releases (DVD, Blu-ray, HD DVD) and initial movie support (Posters and some of the data).
DVDXML has movie data.
I believe that MyMovies provides the best data and will give the best result in a media center. It has a huge dedicated following and a very big and complete database. The service is blazing fast compared to TMDB for example.
Uniqueness
Now what can uniquely identify a media? This is the really tricky part.
We know from CDDB that "chapter" length's are not enough to get a unique hit. This means we cannot use the chapters in a movie - solely.
A movie can be in wide or full screen, but still have the same chapters. This is not a problem if you scrape movie data (info not specific to the release, and using a poster), but if you scrape media data (eg. want the data from the DVD cover and the DVD cover it self depicted in the gui), it's not good enough.
If we use the resolution this will hit rips in containers since black bars are cropped off and resolution might also be lowered. DVD's have the same resolution for full-/widescreen but a flag to indicate 4:3/16:9.
Any ideas guys?
Concerning MM and DVDId, I looked and it is calling IDvdInfo2::GetDiscID through managed code. Blu-ray/HD-DVD identification is standard and easily to replicate.
I can probably reverse GetDiscID based on what process monitor is telling me it accesses. But, this is a big but, I don't DEV for XBMC. I work on Open Media Library. Since I'm windows only the only benifit of reversing GetDiscID for me is if it can be used against a VIDEO_TS folder (and process monitor is telling me this doesn't look promising). If you can tell me otherwise I'll spend the time to reverse.
As far as OpenId is concerned, an alternate approach to having TVDB and TMDB support OpenId would be to have a secondary lookup repository. My logic for this is;
1. You are not tied to a specific source for meta
2. You will have many formats and releases for a single movie tied to one meta resource (mkv, dvd, etc.)
As far as generating the OpenId, I almost suggest extending the CRC64 logic to whatever format the media is in. As in do a checksum "fingerprint" of the main video file.
The above is based on two assumptions. We are either talking about direct rips of DVD/Blu-ray discs to the FS or we are talking about scene releases. If we are talking about Joe Blow's provate rip of Full Metal Jacket from Blu to avi, there really wouldn't be anything to match against.
ultrabrutal
2009-07-09, 20:57
Concerning MM and DVDId, I looked and it is calling IDvdInfo2::GetDiscID through managed code. Blu-ray/HD-DVD identification is standard and easily to replicate.
I can probably reverse GetDiscID based on what process monitor is telling me it accesses. But, this is a big but, I don't DEV for XBMC. I work on Open Media Library. Since I'm windows only the only benifit of reversing GetDiscID for me is if it can be used against a VIDEO_TS folder (and process monitor is telling me this doesn't look promising). If you can tell me otherwise I'll spend the time to reverse.
Well if you reverse GetDiscID the algorithm can be shared with Wine and XBMC developers, right? CRC64 uses stuff like file datetime stamps and hashes of file content. Don't know if you can get all that from process explorer or if the DLL must be disassembled.
But still DiscID only works for DVD's, so it might not be a good idea to even spend time on this. Open ID is the solution if we can define a standard which all parties can agree on (huge undertaking I know).
As far as OpenId is concerned, an alternate approach to having TVDB and TMDB support OpenId would be to have a secondary lookup repository. My logic for this is;
1. You are not tied to a specific source for meta
2. You will have many formats and releases for a single movie tied to one meta resource (mkv, dvd, etc.)
As far as generating the OpenId, I almost suggest extending the CRC64 logic to whatever format the media is in. As in do a checksum "fingerprint" of the main video file.
The above is based on two assumptions. We are either talking about direct rips of DVD/Blu-ray discs to the FS or we are talking about scene releases. If we are talking about Joe Blow's provate rip of Full Metal Jacket from Blu to avi, there really wouldn't be anything to match against.
Of course we are never talking about scene releases. Open ID should work on DVD, Blu-ray and HD-DVD, but if cleaver enough then if you rip your own media to for example a MKV and keep the properties needed for Open ID calculation in the container (chapters and video info or whatever), you will be able to get a 100% match on your MKV file. Open ID could of course also be tagged into the MKV which could be used instead of calculating a new one (speed or if properties are missing). Ripper software should support Open ID so it could be embedded automatically.
Well if you reverse GetDiscID the algorithm can be shared with Wine and XBMC developers, right?
Right, if I end up going that route (and am actually successful), what I do is open source. I wouldn't be providing you guys a patch, but as I said it is open source.
But still DiscID only works for DVD's, so it might not be a good idea to even spend time on this. Open ID is the solution if we can define a standard which all parties can agree on (huge undertaking I know).
As I mentioned above, the identifier for HD-DVD and Blu-ray used by MM is easy to replicate. A DiscID is valuable because it is an identifier that has already been assigned meta.
Open ID should work on DVD, Blu-ray and HD-DVD, but if cleaver enough then if you rip your own media to for example a MKV and keep the properties needed for Open ID calculation in the container (chapters and video info or whatever), you will be able to get a 100% match on your MKV file. Open ID could of course also be tagged into the MKV which could be used instead of calculating a new one (speed or if properties are missing). Ripper software should support Open ID so it could be embedded automatically.
Don't get me wrong here, I think the idea is great. It just doesn't seem like a realistic solution. You are relying on either rippers to maintain consistent info in the container or rippers to generate the id from the disc and add it to the container.
As I mentioned above, the identifier for HD-DVD and Blu-ray used by MM is easy to replicate. A DiscID is valuable because it is an identifier that has already been assigned meta.
even when almost everyone media library its digital now days this is still a good idea now or then you can pop up a disc a rental or whatever movie in disc format and still get almost all the benefits of a digital one, this is the whole purpose of this "patch". why would you want openid, discid or dvdid to stick to the movie if you rip it you have the scraper for that anyway.
this is not a high priority "patch" but is a must have to still have one of the best media center !
ultrabrutal
2009-07-09, 23:29
why would you want openid, discid or dvdid to stick to the movie if you rip it you have the scraper for that anyway.
Why? Well here are two points:
1. Scrapers don't match a rip on anything but the Title or IMDB ID. This means you get movie meta data and not media meta data.
2. You get a 100% match instead of a likely match. Scraper will search for title and it might get 50 back from the server. From this list it must pick the most likely, and it can go wrong here. Also if the title is not 100% correct then you will get a faulty result or perhaps none at all.
well two good points indeed !
Trouble is if you rip a DVD it'll be decrypted, and therefore the contents of the files (which dvdinfo relies on) will be changed too. It sounds like a useful function but certainly not worldendingly so!
Anyway i'll look into it, i'm certainly not up for begging someone to release code when it'll be an hour max to do it myself.
Trouble is if you rip a DVD it'll be decrypted, and therefore the contents of the files (which dvdinfo relies on) will be changed too. It sounds like a useful function but certainly not worldendingly so!
Anyway I'll look into it, I'm certainly not up for begging someone to release code when it'll be an hour max to do it myself.
yep this is only to get support for those who have a bluray/dvd player in their HTPC and wants to get all the functions and features possible with XBMC !
linuxluemmel
2009-07-15, 12:10
Is there a way to get the dvd disc title or any other metadata, since this
System.DVDLabel is not getting anything maybe only works in Xbox.
maybe something like this app. (http://www.meedios.com/forum/viewtopic.php?p=47909) can be port in xbmc
more info (http://msdn.microsoft.com/en-us/library/ms785496.aspx)
more info (http://dvdxml.com/news.php)
more info (http://www.e-home.no/metaservices/search.aspx)
Yes in Linux you could use the command lsdvd
I give you a python example .... because this I made inside my script ....
################################################## #####
# Parameter #
# dvd_device device for dvd-access #
# dvd_dir rip-directory #
# name default name 'change-me.iso #
# #
# Returns name of inserted dvd or 'change-me.iso #
#############3#################################### #####
def get_disc_name(dvd_device,dvd_dir,default_name):
complet_command = 'volname ' + dvd_device + ' > ' + dvd_dir + '/NAME'
sys.platform.startswith('linux')
status = os.system("%s" % (complet_command))
print 'executed command volname to get dvd-name .....'
# In the case the command volname is not installed ... #
# the function recturns 'change-me.iso #
volume_path = dvd_dir + '/NAME'
stat_info = os.stat(volume_path)
file_of_volume = stat_info[stat.ST_SIZE]
if (file_of_volume != 0):
print 'we found a name of the inserted dvd :'
f = open(volume_path,'r')
name = f.readline()
f.close
# erase NAME
os.remove(volume_path)
print name + '\n'
name = string.strip(string.lower(name))
return name
else:
print 'volume name can not be read .... or command volname not found ....'
return default_name
################################################## #####
ccrocker
2009-07-18, 23:34
Here is the code I use in the Meedio DVDID plugin. I'm surprised no one asked... The dvdid code uses the directshowlib found here: http://sourceforge.net/project/showfiles.php?group_id=136334&package_id=155643
public static string GetDVDID(string Drive)
{
long id = 0;
int hr;
object comobj = null;
DirectShowLib.Dvd.AMDvdRenderStatus status;
DirectShowLib.Dvd.IDvdGraphBuilder dvdGraph = (DirectShowLib.Dvd.IDvdGraphBuilder)new DirectShowLib.DvdGraphBuilder();
hr = dvdGraph.RenderDvdVideoVolume(null, DirectShowLib.Dvd.AMDvdGraphFlags.None, out status);
DsError.ThrowExceptionForHR(hr);
hr = dvdGraph.GetDvdInterface(typeof(DirectShowLib.Dvd. IDvdInfo2).GUID, out comobj);
DsError.ThrowExceptionForHR(hr);
DirectShowLib.Dvd.IDvdInfo2 dvdInfo = (DirectShowLib.Dvd.IDvdInfo2)comobj;
//comobj = null;
dvdInfo.GetDiscID(Drive + ":\\VIDEO_TS", out id);
const int HEXADECIMAL = 16;
String HexID = Convert.ToString(id, HEXADECIMAL);
return HexID;
}
Take a look at,
http://www.srcf.ucam.org/~cjk32/dvdid/
dvdid-0.1.tar.gz contains the source code for a library to calculate dvdids, and an associated executable. The API will either allow you to pass in a path to the dvd media, or to supply the necessary information directly. On windows, the project definition files provide a dll, a static library and a standalone executable. On unix-like platforms, it uses the stadard ./configure, make, make install, which provides a shared/static library as appropriate and a dependent executable.
There is some API documentation included, but do read the comments throughout the code for more detail, particularly with regards issues on which timestamps get used, and on the limited accuracy of some timestamps.
There is also an older utility and associated source code.
Regards,
Christopher Key