1

Maybe this is a stupid question....I'm looking at a project that would require me to burn a video to DVD in such a way that a traditional DVD player could play it. I've found several '3rd party tools' that do this, which is great and the direction I'll probably take.

But, I can't, for the life of me, fathom how to sit down and write a video to DVD.

I know this is largely academic (Just use the available libraries!) still, I'd really like some direction on how I would/could go about doing this myself.

Rob P.
  • 14,921
  • 14
  • 73
  • 109

2 Answers2

6

If you want to talk directly to Windows then you're going to have to run through the Image Mastering API (IMAPI). Some people have written wrappers for it. IMAPIv2 was released for Vista so I'm not 100% sure of its progression to Windows 7.

But that will just allow you to write files to disk. To understand how to burn a video DVD to disk you'll have to understand video encoding, the MPEG-2 spec, the UDF bridge file format and a couple of other things. I would highly recommend looking into a command-line video converter that can create the VIDEO_TS file structure for you and then use the Windows API to write that to disk.

EDIT

Here's another wrapper.

Chris Haas
  • 53,986
  • 12
  • 141
  • 274
  • This is commonly referred to as "Authoring" a DVD. Authoring from raw video is not a trivial task as Chris has pointed out. – Casey Wilkins May 04 '11 at 16:47
  • IMAPIv2 is available as an optional download for XP and ships with Win7. http://support.microsoft.com/kb/932716 – Gabe May 07 '11 at 03:06
2

I would recommend looking at a project like SharpRecorder and understanding its code as a start.

Since there is no native support in .NET for writing a DVD video file you'll need to look at the DVD specification and start from the ground up. That is why looking at a library or using one is a great start (why reinvent the wheel?).

Frazell Thomas
  • 6,031
  • 1
  • 20
  • 21
  • 1
    I think OP is hoping to use built-in Windows APIs (first-party libraries). – Gabe May 04 '11 at 15:56
  • 1
    @Gabe Is there a first party API for writing a DVD-Video disc? – Frazell Thomas May 04 '11 at 15:57
  • 2
    @Gabe IMAPI will enable him to write an image to the disk, but he would still need to construct a compliant DVD-Video Image first. – Frazell Thomas May 04 '11 at 16:20
  • 1
    No, IMAPI lets you create a DVD-Video image just by giving it the individual MPEG-2 and other files. Of course it doesn't create the video and menu files for you, but neither does SharpRecorder. – Gabe May 04 '11 at 19:46