views:

543

answers:

4

I'd like to add dvd burning functionality to my .Net app (running on Windows Server 2003), are there any good components available? I've used the NeroCOM sdk that used to come with Nero but they no longer support the sdk in the latest versions of Nero. I learned that Microsoft has created an IMAPI2 upgrade for Windows XP/2003 and there is an example project at CodeProject but not having used it myself I can't say how easy/reliable it is to use.

I'm not really worried about burning audio/video to DVD as this is for file backup purposes only.

+1  A: 

At my last job I was tasked with finding a cross platform and preferably free way to write our application specific files to cd/dvd. I quickly found that writing CD's wasn't hard on windows, but I couldn't write DVD's easily, and that only worked on windows.

I ended up writing a wrapper around cdrecord cdrecord is an open source project that builds easily with cygwin. I would create a staging directory where I added the files that needed to be written, called mkisofs on that directory to make a cd iso, and then called cdrecord to burn the image. This may not be the best solution if you have a strictly windows audience, but it was the only thing I could find that did window, Linux, and OS X.

Another option worht checking out is the StarBurn SDK, I download the trial and used it, it worked well, but in the end it wasn't free so it was too expensive for my purposes.

snctln
A: 

Did your cdrecord methodology support dvd burning? And is there an easy way to redistribute/install cygwin with an application? StarBurn looks pretty good at first glance, although I'm a little hesitant to go with unproven libraries that have to handle something this complicated (especially with the number of types of media out there now) and the StarBurn portfolio page is a bit on the fluffy side.

Luke
+1  A: 

My cdrecord method did support dvd burning, I just looked over the code, and boy did I forget how much time and effort I put into that class.

cdrecord has no problem burning just about any type of media you throw at it, but since it is a stand alone application, I had to do a lot of parsing to get useful information. I can dig up the flags and different calls I used if you are interested, but unfortunately I cannot share the source as it was developed for a commercial project.

While looking over the code I was also reminded that I switched form cdrecord (cdrtools) to wodim (cdrkit). wodim is a branch of cdrecord made a few years ago by the debian team because cdrecord dropped the GPL license.

Like I said before this was released as part of a commercial application, our interpretation of the GPL was that you can call external binaries from your program without a problem as long as your program can run without the external binaries (if cdrecord wasn't found we popped up a dialog informing the user that burning capabilities were not available) and we also had to host the source for cdrkit and cygwin and include a copy of the GPL with our distributed program. So basically we would not make "derivative works", we would compile the cdrkit code exactly as it was, and then use the produced binaries.

As far as StarBurn SDK, I demoed it, but I didn't use it for a shipped product so I can't really give a recommendation or say much more than it does work

snctln
+2  A: 

I've used the code from the codeproject article and it works pretty well. It's a nice wrapper around the IMAPI2, so as longs as IMAPI2 supports what you need to do, the .NET wrapper will do it.

Matt Warren